IPhone - How can I detect that an adhoc build of my application is running on the device at runtime

I want to use different APIs when running adhoc deployments of my application compared to deploying appstore. Is it possible to find out at runtime? I know that I can use #if TARGET_IPHONE_SIMULATOR and #if DEBUG when working with xcode, but I also want adhoc detection to be detected. Any ideas?

+6
source share
2 answers

Make sure that "../iTunesMetadata.plist" exists in your NSDocumentDirectory.

This file is present only in the lines of the application store - and it is located in the root directory of your application, therefore it is safe to represent the application store.

+3
source

Add a preprocessor macro to configure AdHoc in the build settings. #if ADHOC // do something

+1
source

Source: https://habr.com/ru/post/916343/


All Articles