Archived

July 25, 2017 ยท View on GitHub

This project has been archived and is no longer supported by The Blindsight Corporation/Amazon.

BSMobileProvision

A category for parsing your iOS app's embedded.mobileprovision at runtime. Use it to, among other things, determine at runtime whether your app is being distributed as dev, release, ad hoc, app store, or enterprise.

Usage

#import "UIApplication+BSMobileProvision.h"

NSString *releaseModeString = @"UNKNOWN";
UIApplicationReleaseMode releaseMode = [[UIApplication sharedApplication] releaseMode];
switch (releaseMode) {
	case UIApplicationReleaseAdHoc: releaseModeString = @"AdHoc"; break;
	case UIApplicationReleaseDev: releaseModeString = @"Dev"; break;
	case UIApplicationReleaseAppStore: releaseModeString = @"AppStore"; break;
	case UIApplicationReleaseEnterprise: releaseModeString = @"Enterprise"; break;
	// case UIApplicationReleaseUnknown: releaseType = @"UNKNOWN"; break;
}
NSLog(@"LAUNCHED WITH RELEASE TYPE: %@",releaseModeString);

Notes

If you want something less hacky, you should go with something like:

This was made in part possible due to the following references:

Somewhat related, Jin Budelmann notes that even when an app (such as one released through the app store) does not have an embedded.mobileprovision, the application binary will still be signed, and that that could be another source of information: