How can I test my Mac App Store App on earlier system versions ?

Hello,


I am experiencing the problem described in this note:


https://developer.apple.com/library/content/qa/qa1884/_index.html


It Appears that I will not be able to test my application unless I export it with a Developer ID code signing.


Is this true ? I don't understand the recommendations very well, is there an easy way to test app store applications


on another mac or virtual machine ? I need to test the in-app purchase so I would not like to sign the app with a Developer ID identity.


Thanks,


Alfonso Tesauro

Italy

Replies

It depends a bit on what kind of testing you want to do.


To test the in-app purchase (and receipt validation) parts of your code, you need to use an iTunes Connect sandbox (test) user. You run your built app once outside Xcode, while you are not logged in to Mac App Store. In that debug environment, when your app starts, you will be asked to log in to the sandbox environment, and a purchase receipt is fetched and added to the app bundle. After that, you can build and run your app from Xcode, because it has the receipt in its bundle.


That means you can debug and test in-app purchases, again in the sandbox environment. The trick here is to isolate the parts of your app that need the testing environment, so that the testing can be simple and exhaustive. (For example, you probably don't need the sandbox environment to test most of the UI for in-app purchase, just the parts that actually interact with the Mac App Store servers.)


Ideally, you don't need to test the parts that interact with MAS servers on another Mac.

As noted, for IAP testing you'll need to sandbox - see this recent thread for issues/discussion:


https://forums.developer.apple.com/thread/70418