Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by jake-ruman · Jul 12, 2017 at 08:56 AM · unity 5errorios

UnityInitApplicationNoGraphics cause EXC_BAD_ACCESS on IOS

  • Description

I have a workspace which integrated iOS with unity, it works good when i using Xcode 8.3.3, but error happened after i switch to Xcode 8 beta 3. So i create a new project to make a test.

  • Environments

Xcode 9 beta 3 Unity 5.6.2f1 Mac OSX Sierra 10.12.5 (16F73)

  • Operation I created a new Unity project, and created a new scene with one cube in it. Switch to iOS platform and build. It worked if i open Unity-iPhone.xcodeproj and run.

screenshot-1

And I create a new workspace and a new project cuz i want to do some native operation, so i integrate iOS with unity according to This Link.

But when I run i after solve build error, it crash.

screenshot-2

  • Code

AppDelegate

 #import "AppDelegate.h"
 
 @interface AppDelegate ()
 
 @end
 
 @implementation AppDelegate
 
 
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
     
     self.window.backgroundColor = [UIColor redColor];
     self.unityController = [[UnityAppController alloc] init];
     [self.unityController application:application didFinishLaunchingWithOptions:launchOptions];
     
     return YES;
 }
 
 - (void)applicationWillResignActive:(UIApplication *)application {
     [self.unityController applicationWillResignActive:application];
 }
 
 
 - (void)applicationDidEnterBackground:(UIApplication *)application {
     [self.unityController applicationDidEnterBackground:application];
 }
 
 
 - (void)applicationWillEnterForeground:(UIApplication *)application {
     [self.unityController applicationWillEnterForeground:application];
 }
 
 
 - (void)applicationDidBecomeActive:(UIApplication *)application {
     [self.unityController applicationDidBecomeActive:application];
 }
 
 
 - (void)applicationWillTerminate:(UIApplication *)application {
     [self.unityController applicationWillTerminate:application];
 }
 
 - (UIWindow *)unityWindow {
     return UnityGetMainWindow();
 }
 
 - (void)showUnityWindow {
     [self.unityWindow makeKeyAndVisible];
 }
 
 - (void)hideUnityWindow {
     [self.window makeKeyAndVisible];
 }
 
 @end
 

ViewController

 #import "ViewController.h"
 #import "AppDelegate.h"
 
 @interface ViewController ()
 
 @end
 
 @implementation ViewController
 
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view, typically from a nib.
     
     self.view.backgroundColor = [UIColor blueColor];
     
     UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
     [button setTitle:@"Show Unity" forState:UIControlStateNormal];
     button.frame = CGRectMake(0, 0, 100, 44);
     button.center = self.view.center;
     [button addTarget:self action:@selector(showUnity) forControlEvents:UIControlEventTouchUpInside];
     [self.view addSubview:button];
 }
 
 - (void)showUnity {
     [(AppDelegate *)[UIApplication sharedApplication].delegate showUnityWindow];
 }
 
 - (void)didReceiveMemoryWarning {
     [super didReceiveMemoryWarning];
     // Dispose of any resources that can be recreated.
 }
 
 
 @end

screen-shot-2017-07-12-at-41401-pm.png (117.0 kB)
screen-shot-2017-07-12-at-44618-pm.png (161.9 kB)
Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image arkchililabs · Sep 19, 2017 at 10:51 AM 0
Share

have you found a solution?

avatar image jake-ruman arkchililabs · Sep 19, 2017 at 11:11 AM 0
Share

Yeah, I found solution finally. Here is the link

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by jake-ruman · Nov 08, 2017 at 05:30 AM

@sdullaghan Yeah I found solutions finally.

You can check this link

If the link above not solve your problem, try add:

  • -DINIT_SCRIPTING_BACKEND=1

  • -DRUNTIME_IL2CPP=1

in Other C Flags of your project's build settings.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by HyunMok_Moon · Apr 16, 2021 at 05:17 AM

Hi, Unity 2018.3 and Xcode 11.5 I met this same issue.

When I build framework with Static Library Mach-O type, then this EXC_BAD_ACCESS error occured in UnityInitApplicationNoGraphics()

When Dynamic library, it's not happened.

@jake-ruman did you fix this problem?

I added this pre-defined flags to "Other C Flags", it didn't resolve this issue.

Thank you.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

169 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

xCode pods problem when building for iOS 1 Answer

Xcode "Make Directory Error" (UNITY ADS) 0 Answers

IOS Crash during build on Mac for Unity 5.3.4 0 Answers

Unity iOS and Android content download from url 0 Answers

iOS (8) - sporadic microphone.start failure. 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges