Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[expo-application][ios] Post-review fixes
- Loading branch information
Showing
13 changed files
with
95 additions
and
93 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright 2015-present 650 Industries. All rights reserved. | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface EXClientReleaseType : NSObject | ||
|
||
+ (NSString *)clientReleaseType; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright 2015-present 650 Industries. All rights reserved. | ||
|
||
#import "EXClientReleaseType.h" | ||
#if __has_include(<EXApplication/EXProvisioningProfile.h>) | ||
#import <EXApplication/EXProvisioningProfile.h> | ||
#endif | ||
|
||
@implementation EXClientReleaseType | ||
|
||
+ (NSString *)clientReleaseType | ||
{ | ||
// The only scenario in which we care about the app release type is when the App Store release of | ||
// the Expo development client is run on a real device so the development client knows to restrict | ||
// projects it can run. We always include expo-application in the App Store release of the | ||
// development client, so we correctly return "APPLE_APP_STORE" in the aforementioned scenario. | ||
// | ||
// In all other scenarios, we don't restrict the projects the client can run and can return either | ||
// the actual release type or "UNKNOWN" for the same behavior, so it doesn't matter whether | ||
// expo-application is linked. | ||
#if __has_include(<EXApplication/EXProvisioningProfile.h>) | ||
EXAppReleaseType releaseType = [[EXProvisioningProfile mainProvisioningProfile] appReleaseType]; | ||
switch (releaseType) { | ||
case EXAppReleaseTypeUnknown: | ||
return @"UNKNOWN"; | ||
case EXAppReleaseSimulator: | ||
return @"SIMULATOR"; | ||
case EXAppReleaseEnterprise: | ||
return @"ENTERPRISE"; | ||
case EXAppReleaseDev: | ||
return @"DEVELOPMENT"; | ||
case EXAppReleaseAdHoc: | ||
return @"ADHOC"; | ||
case EXAppReleaseAppStore: | ||
return @"APPLE_APP_STORE"; | ||
} | ||
#else | ||
return @"UNKNOWN"; | ||
#endif | ||
} | ||
|
||
@end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.