Merge pull request #1653 from vector-im/unexpected_logout

Should fix spontaneous logout.
This commit is contained in:
giomfo
2017-11-15 16:27:03 +01:00
committed by GitHub
2 changed files with 16 additions and 12 deletions
+16
View File
@@ -310,6 +310,22 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
#pragma mark - UIApplicationDelegate
- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions
{
// Set the App Group identifier.
MXSDKOptions *sdkOptions = [MXSDKOptions sharedInstance];
sdkOptions.applicationGroupIdentifier = @"group.im.vector";
// Redirect NSLogs to files only if we are not debugging
if (!isatty(STDERR_FILENO)) {
[MXLogger redirectNSLogToFiles:YES];
}
NSLog(@"[AppDelegate] willFinishLaunchingWithOptions");
return YES;
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
#ifdef DEBUG
-12
View File
@@ -17,20 +17,8 @@
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
#import <MXLogger.h>
int main(int argc, char * argv[]) {
@autoreleasepool {
// Set the App Group identifier.
MXSDKOptions *sdkOptions = [MXSDKOptions sharedInstance];
sdkOptions.applicationGroupIdentifier = @"group.im.vector";
// Redirect NSLogs to files only if we are not debugging
if (!isatty(STDERR_FILENO)) {
[MXLogger redirectNSLogToFiles:YES];
}
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}