mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix App Store detection not working correctly when using configureWithBetaIdentifier: liveIdentifier: delegate:
This commit is contained in:
parent
197ca77719
commit
dd9980f944
@ -74,6 +74,17 @@
|
|||||||
_appStoreEnvironment = NO;
|
_appStoreEnvironment = NO;
|
||||||
_startManagerIsInvoked = NO;
|
_startManagerIsInvoked = NO;
|
||||||
|
|
||||||
|
// check if we are really not in an app store environment
|
||||||
|
if ([[NSBundle mainBundle] pathForResource:@"embedded" ofType:@"mobileprovision"]) {
|
||||||
|
_appStoreEnvironment = NO;
|
||||||
|
} else {
|
||||||
|
_appStoreEnvironment = YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if TARGET_IPHONE_SIMULATOR
|
||||||
|
_appStoreEnvironment = NO;
|
||||||
|
#endif
|
||||||
|
|
||||||
[self performSelector:@selector(validateStartManagerIsInvoked) withObject:nil afterDelay:0.0f];
|
[self performSelector:@selector(validateStartManagerIsInvoked) withObject:nil afterDelay:0.0f];
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
@ -179,18 +190,7 @@
|
|||||||
NSCharacterSet *hexSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789abcdef"];
|
NSCharacterSet *hexSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789abcdef"];
|
||||||
NSCharacterSet *inStringSet = [NSCharacterSet characterSetWithCharactersInString:_appIdentifier];
|
NSCharacterSet *inStringSet = [NSCharacterSet characterSetWithCharactersInString:_appIdentifier];
|
||||||
_validAppIdentifier = ([_appIdentifier length] == 32) && ([hexSet isSupersetOfSet:inStringSet]);
|
_validAppIdentifier = ([_appIdentifier length] == 32) && ([hexSet isSupersetOfSet:inStringSet]);
|
||||||
|
|
||||||
// check if we are really not in an app store environment
|
|
||||||
if ([[NSBundle mainBundle] pathForResource:@"embedded" ofType:@"mobileprovision"]) {
|
|
||||||
_appStoreEnvironment = NO;
|
|
||||||
} else {
|
|
||||||
_appStoreEnvironment = YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if TARGET_IPHONE_SIMULATOR
|
|
||||||
_appStoreEnvironment = NO;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_startManagerIsInvoked = NO;
|
_startManagerIsInvoked = NO;
|
||||||
|
|
||||||
if (_validAppIdentifier) {
|
if (_validAppIdentifier) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user