为什么我得到延迟加载NSBundle MobileCoreServices.framework?
当我从主viewControllerredirect到另一个viewController我得到这个
错误:
延迟加载NSBundle MobileCoreServices.framework,
加载MobileCoreServices.framework,
systemgroup.com.apple.configurationprofilespath的系统组容器path为/ Users / develop / Library / Developer / CoreSimulator / Devices / 083C0102-C85F-463A-96F4-CA1B9AC7919D / data / Containers / Shared / SystemGroup / systemgroup.com.apple。 configurationprofiles
我的代码是…
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... }
您的消息来自Xcode 9.Xcode 8中的等效消息是:
[MC] systemgroup.com.apple.configurationprofilespath的系统组容器是/Users/develop/Library/Developer/CoreSimulator/Devices/083C0102-C85F-463A-96F4-CA1B9AC7919D/data/Containers/Shared/SystemGroup/systemgroup.com .apple.configurationprofiles
注意[MC]
:这是一个系统消息。 这个消息可以安全地忽略。
要隐藏这类消息,请按照https://stackoverflow.com/a/42140442/1033581中的解决scheme进行操作:
- 在Product> Scheme> Edit Scheme …> Run下,将OS_ACTIVITY_MODE环境variables设置为$ {DEBUG_ACTIVITY_MODE},如下所示:
- 转到您的项目构build设置,然后单击+添加名为DEBUG_ACTIVITY_MODE的用户定义的设置。 展开此设置并单击“debugging”旁边的“+”以添加特定于平台的值。 select下拉菜单并将其更改为“Any iOS Simulator SDK”。 然后将其值设置为“default”,如下所示:
更新您的应用程序委托中的代码。
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]; }
- Swift:展示主要和替代(login/入职)stream程的最佳方式是什么?
- 从应用程序委托获取当前的视图控制器(模态是可能的)
- 我们如何检测iOS 7上的控制中心?
- 我如何连接UITableView到我的Appdelegate.m?
- Swift – 在App Delegate中实例化没有故事板的导航控制器
- 对应用程序开发的build议iOS。 ApplicationDidEnterBackground
- 从应用程序委托使用swift打开视图控制器
- 如何在doRegisterForRemoteNotificationsWithDeviceToken以外的方法中使用设备标记?
- applicationWillEnterForeground提供一个视图控制器