<分区>
我正在使用 Xcode 9 我在加载我的应用程序时一直收到此错误
libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
如何阻止它?
<分区>
我正在使用 Xcode 9 我在加载我的应用程序时一直收到此错误
libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
如何阻止它?
最佳答案
我正在通过一本旧书学习使用 ObjC 进行 iOS 开发(出于个人原因),当我从 AppDelegate.m 覆盖 didFinishLaunchingWithOptions 时发生了这个错误,所以我通过设置全局 Navigation 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/51640360/