Merge pull request #1672 from vector-im/riot_1643

Should fix spontaneous logout
This commit is contained in:
giomfo
2017-11-24 17:20:51 +01:00
committed by GitHub
+8
View File
@@ -312,6 +312,14 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions
{
// Check whether the content protection is active before going further.
// Should fix the spontaneous logout.
while(![application isProtectedDataAvailable])
{
NSLog(@"[AppDelegate] willFinishLaunchingWithOptions: wait for protected data");
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.5f]];
}
// Set the App Group identifier.
MXSDKOptions *sdkOptions = [MXSDKOptions sharedInstance];
sdkOptions.applicationGroupIdentifier = @"group.im.vector";