Created
June 13, 2014 10:13
-
-
Save neilco/a4ca2a314b392b7cd4ec to your computer and use it in GitHub Desktop.
HOW-TO: Detect ad-hoc release builds at runtime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Foundation/Foundation.h> | |
| FOUNDATION_EXPORT BOOL NCIsAdHocReleaseBuild(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "NCAdHocUtils.h" | |
| #ifdef DEBUG | |
| static BOOL NCDebugBuild = YES; | |
| #else | |
| static BOOL NCDebugBuild = NO; | |
| #endif | |
| BOOL NCIsAdHocReleaseBuild() { | |
| return !NCDebugBuild && [[NSBundle mainBundle] pathForResource:@"embedded" ofType:@"mobileprovision"]; | |
| }; |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add
#import "NCAdHocUtils.h"to your.pchand you can callNCIsAdHocReleaseBuildfrom anywhere in your app.