libMobileGestalt MobileGestalt.c:890:此平台不支持MGIsDeviceOneOfType [英] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform

查看:489
本文介绍了libMobileGestalt MobileGestalt.c:890:此平台不支持MGIsDeviceOneOfType的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Xcode 9,在加载我的应用程序时不断出现此错误

I am using Xcode 9 I kept getting this error when I load my app

libMobileGestalt MobileGestalt.c:890:此平台不支持MGIsDeviceOneOfType.

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

如何阻止呢?

推荐答案

我正在阅读一本旧书(出于个人原因)使用ObjC进行iOS开发,并且当我覆盖 didFinishLaunchingWithOptions 时发生了此错误>来自 AppDelegate.m ,因此我通过设置全局 Navigation Controller 来解决,如下所示:

I'm studying iOS development with ObjC by an old book(for personal reasons), and this error happened when I override the didFinishLaunchingWithOptions from AppDelegate.m so I Solved by setting a global Navigation Controller, like this:

 -(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)

Xcode 10.0 (10A255)

曾在iPhone和模拟器上工作(均为iPhone 7-iOS 12)

Worked on iPhone and Simulator(Both iPhone 7 - iOS 12)

这篇关于libMobileGestalt MobileGestalt.c:890:此平台不支持MGIsDeviceOneOfType的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆