AppStore iOS App Detection Detection

I need to implement custom logging in my application.

To do this, I need to determine if the current version of the application is installed from the application store or works with xcode or is a version of TestFlight.

Is there something else in the application depending on the installation source?

I do not want to have something else in the development environment.

+5
source share
2 answers

You can get part of this path by reading in the embedded.mobileprovision file from the application package:

NSString *provisionPath = [[NSBundle mainBundle] pathForResource:@"embedded" ofType:@"mobileprovision"];

If this does not exist, you are in the application store assembly.

, ad-hoc, , , .

XCode "DEBUG" Debug, Release ( AdHoc), DEBUG.

+11

, , , testflight.

, , USE_TESTFLIGHT, :

#ifdef USE_TESTFLIGHT
//do something test-flight specific
[TestFlight takeOff:kTestFlightAppToken];
#endif

, , / , ifdef .

0

All Articles