当我从主viewController重定向到另一个viewController时,我得到了这个
错误:
延迟加载NSBundle MobileCoreServices.framework, 装载MobileCoreServices.framework, 用于/Users/develop/Library/Developer/CoreSimulator/Devices/083C0102-C85F-463A-96F4-CA1B9AC7919D/data/Containers/Shared/SystemGroup/路径的系统组容器是systemgroup.com.apple.configurationprofiles systemgroup.com.apple.configurationprofiles
我的密码是..。
应用程序.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...
}发布于 2017-09-27 16:11:15
您拥有的消息来自Xcode 9。Xcode 8中的等效消息是:
用于/Users/develop/Library/Developer/CoreSimulator/Devices/083C0102-C85F-463A-96F4-CA1B9AC7919D/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles路径的MC系统组容器为systemgroup.com.apple.configurationprofiles
注意[MC]:它是一条系统消息。这个消息可以安全地被忽略。
若要隐藏此类消息,请遵循https://stackoverflow.com/a/42140442/1033581中的解决方案


发布于 2017-09-27 05:55:47
更新应用程序委托中的代码。
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];
}https://stackoverflow.com/questions/46439892
复制相似问题