gpt4 book ai didi

ios - libMobileGestalt MobileGestalt.c :890: MGIsDeviceOneOfType is not supported on this platform

转载 作者:行者123 更新时间:2023-11-30 11:06:29 25 4
gpt4 key购买 nike

我使用的是 Xcode 9,当我加载应用程序时,我不断收到此错误

libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.

如何阻止它?

最佳答案

我正在通过一本旧书学习使用 ObjC 进行 iOS 开发(出于个人原因),当我从 AppDelegate.m 重写 didFinishLaunchingWithOptions 时,发生了这个错误,所以我通过设置全局导航 Controller 来解决,如下所示:

 -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

// Override point for customization after application launch.

self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];

RootController *rootController = [[RootController alloc] init];

UINavigationController *navController = [[UINavigationController alloc]initWithRootViewController:rootController];

self.window.rootViewController = navController;

[self.window makeKeyAndVisible];

[rootController release];

[navController release];

return YES;
}

Xcode 10.0 (10A255)

适用于 iPhone 和模拟器(iPhone 7 - iOS 12)

关于ios - libMobileGestalt MobileGestalt.c :890: MGIsDeviceOneOfType is not supported on this platform,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52655901/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com