Wenn ich von main viewController zu einem anderen viewController Umleite, bekomme ich das
Error:
Lazy loading NSBundle MobileCoreServices.framework,
Geladenes MobileCoreServices.framework,
Systemgruppencontainer für systemgroup.com.Apple.configurationprofiles Pfad ist /Users/develop/Library/Developer/CoreSimulator/Devices/083C0102-C85F-463A-96F4-CA1B9AC7919D/data/Containers/Shared/SystemGroup/ systemgroup.com.Apple.configurationprofiles
Mein Code lautet ...
Appdelegate.m
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"HasLaunchedOnce"]) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"HasLaunchedOnce"];
[[NSUserDefaults standardUserDefaults] synchronize];
NSLog(@"Launched first time");
} else {
NSLog(@"Already launched");
[self getData];
}
viewDidLoad
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"HasLaunchedOnce"]) {
dispatch_async(dispatch_get_main_queue(), ^{
LoginPageViewController *lpvc = [self.storyboard instantiateViewControllerWithIdentifier:@"LPVC"];
[self.navigationController pushViewController:lpvc animated:NO];
});
} else {
// My code...
}
Die Nachricht, die Sie haben, stammt von Xcode 9 ..__ Die entsprechende Nachricht in Xcode 8 lautet:
[MC] Systemgruppencontainer für systemgroup.com.Apple.configurationprofiles Pfad ist /Users/develop/Library/Developer/CoreSimulator/Devices/083C0102-C85F-463A-96F4-CA1B9AC7919D/data/Containers/Shared/SystemGroup/systemgroup.com .Apple.Konfigurationsprofile
Beachten Sie den [MC]
: Es handelt sich um eine Systemmeldung. Diese Nachricht kann ignoriert werden.
Um diese Art von Nachrichten auszublenden, folgen Sie der Lösung unter https://stackoverflow.com/a/42140442/1033581 :
Aktualisieren Sie den Code in Ihrem App-Delegierten.
if (![[NSUserDefaults standardUserDefaults] boolForKey:"HasLaunchedOnce"]){
LoginPageViewController *lpvc = [self.storyboard instantiateViewControllerWithIdentifier:@"LPVC"];
self.window.rootViewController = lpvc;
NSLog(@"Launched first time");
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"HasLaunchedOnce"];
[[NSUserDefaults standardUserDefaults] synchronize];
}else {
MainViewController *mainVC = [self.storyboard instantiateViewControllerWithIdentifier:@"MainVC"];
self.window.rootViewController = mainVC;
NSLog(@"Already launched");
[self getData];
}