I've followed this tutorial to allow for my app to have builds for DEBUG
, ADHOC
testing (for my beta users), and RELEASE
. Everything works great except for my in-app purchases.
My Bundle ID
s after this setup are:
com.mycompany.myproduct.debug
com.mycompany.myproduct.adhoc
com.mycompany.myproduct
(The RELEASE
ID is the same as it was before this new setup.
Since this method changes the Bundle ID
based on the build and since In-App Purchases are tied to a specific Bundle ID
when I run my app as DEBUG
or ADHOC
my product identifiers come back as invalid when I call requestProductsWithCompletionHandler
.
I have tried adding new In-App Purchase products prefaced with the new Bundle ID
like so: com.mycompany.myproduct.debug.iapname
, but since the In-App Purchases are tied to a single Bundle ID this doesn't work.
My question is this: In order to accomplish what I'm trying to accomplish, do I have to create 2 new apps in iTunes Connect for each of my new Bundle IDs and then add In-App Purchase products to each of those for each Build Configuration? Or, is there another way to accomplish what I'm trying to accomplish?
The ad hoc method allows you to distribute your app to Test Flight and other sources and enables "designated" devices to run the app, including devices that aren't specifically registered to your Apple Developer Program account to run the app. ( think public TestFlight testing)
Description. The Step runs Xcode's xcodebuild command with the build-for-testing option. This builds your app and associated tests so that you can, for example, upload it to a third-party testing service to run your tests on a real device.
When you run an application in Xcode, the debugger is automatically started and attached to the process of the application. Click the Run button in the top left or press Command + R. From the moment the application is up and running, we can start inspecting the process and, if necessary, debug it.
To create a release build, you have to edit your current scheme (⌘<) and highlight "Run [name of application]. On the right, select "Build Configuration" and choose "Release". Build as usual.
The answer is yes, As store kit gets the in app purchases from the iTunes store the easiest way to do this is to add separate apps in iTunes connect and keep them up to date.
The other approach you could take could be to abstract store kit away from your app in your own class. Then you can check the bundleIdentifier
property of [NSBundle mainBundle]
and either ask for your products from the store if your bundleIdentifier
is the one you expect, or return mock SKProducts
that you create yourself if it is only for testing purposes.
I guess it depends on how committed you are to your testers but obviously your custom classes would be scalable to n bundle identifiers whereas dummy apps in iTunes connect isn't scalable at all
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With