构建后本机iOS应用程序中的Unity崩溃

时间:2019-01-01 09:32:24

标签: ios objective-c unity3d

为在本机应用程序中构建Unity付出了很多努力。试图找出所有预构建错误,但是在构建后应用运行时会崩溃。屏幕截图

 error image  screen

我的AppDelegate代码是:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame: [UIScreen mainScreen]. bounds];
    self.window.backgroundColor = [UIColor blueColor];
   // [self.window makeKeyAndVisible];
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    ViewController *mainVC = [storyboard instantiateViewControllerWithIdentifier:@"MainIdentity"];
    UINavigationController *naVC = [[UINavigationController alloc] initWithRootViewController:mainVC];
    self.window.rootViewController = naVC;
    self.unityController = [[UnityAppController alloc] init];
    [self.unityController application:application didFinishLaunchingWithOptions: launchOptions];

    return YES;

}

1 个答案:

答案 0 :(得分:0)

尝试此步骤

1-在课程文件

中打开CrashReporter.mm

2-搜索此函数名称InitCrashHandling

3-评论此行

#if ENABLE_CUSTOM_CRASH_REPORTER 
// InitCrashReporter(); 
#endif