Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

IOS 9 issues - black screen on startup

Discussion in 'iOS and tvOS' started by monark, Sep 21, 2015.

  1. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    I've just updated to IOS 9 on my test iPad Air2 and iPad3 and now find that any existing Unity IOS app just displays a black screen immediately after launch.

    I downloaded the latest patch version 4.6.8.p2 and that got me to the point of being able to compile for IOS 9 again, however the black screen on startup persists.

    The only odd thing I see in the Xcode console is this

    No idea what that is, didn't see it before and don't know if it's the cause of the problem. Anyone else seeing this black screen issue or have any idea how to debug it or fix it. Google hasn't thrown up anyone else obviously reporting such a major issue with Unity.
     
  2. epit

    epit

    Joined:
    Oct 2, 2012
    Posts:
    32
    Same here. My build was working fine just over the weekend. Today I updated to the final IOS 9 after the GM Release and now I get a black screen. No debug output. Nothing.
     
  3. epit

    epit

    Joined:
    Oct 2, 2012
    Posts:
    32
    A follow up to my first reply. There is definitely an issue here.
    I grabbed another iPad that was running 8.4.1 and ran my app without any issues.
    So something happened with the most recent IOS 9 update. I'm pretty sure I was able to run this app on the GM release, but today I got a popup to update to IOS 9 (I guess the GM wasn't the same) and after that, my app will not run on the IOS 9 iPad, but it will run fine on the 8.4.1 iPad. All I get under IOS 9 is a black screen with no console output.
     
  4. ksiUnity

    ksiUnity

    Joined:
    Mar 18, 2015
    Posts:
    2
    Maybe it is because of the AppTransport security thing on xcode 7. Try adding this on your info.plist : NSAppTransportSecurity with type Dictionary and inside this add NSAllowArbitraryLoads with type boolean and set it to YES
     
  5. mark71

    mark71

    Joined:
    Jun 14, 2015
    Posts:
    41
    I updated my iPad Mini 2 to iOS 9 yesterday and I don't have such issues.
    Sometime ago I forced the graphics api to OpenGLES2 to fix a black screen at startup for Android. I am using Unity 5.2.0p1.
     
  6. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    Anyone put in a bug report yet?
     
  7. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    My iPad mini 2 and mini 3 is also ok.... so it's something just effecting the larger iPads, for me anyway.
     
    Last edited: Sep 22, 2015
  8. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    Forcing the opengl to OpenGLES2 or 3 does seem to do the trick, but I want to be able to use metal. Damn.
    Also seems to have broken internet connection...
     
    Last edited: Sep 22, 2015
  9. epit

    epit

    Joined:
    Oct 2, 2012
    Posts:
    32
    How do I force it use use OpenGLES2 or 3? I'm looking in the Player settings and don't see an option to change that?

     
  10. epit

    epit

    Joined:
    Oct 2, 2012
    Posts:
    32
    a) Ignore my previous reply. I found where to disable Metal, but my app still goes to a black screen under IOS 9 but not under 8.4.1

    b) I created a new blank project with a UGUI block of text and solid color image, and guess what? It works fine under IOS 9. So now I have to figure out what setting is in my real project that is causing it to not work under IOS 9. This will not be fun figuring out.

    NOTE: Although my minimal test project file worked under IOS 9. I did receive 2 errors

    #1 App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

    #2 Received memory warning.

    Someone above in the thread mentioned the transport security issue, but also why am I getting a memory warning when the only thing in my test project is a UGUI text block and a solid color Image Panel? Weird stuff.
     
  11. mark71

    mark71

    Joined:
    Jun 14, 2015
    Posts:
    41
    Open the iOS tab in Player Settings.
    Select the 'Other Settings' section.
    The third setting is 'Auto Graphics API'
    Uncheck it and the 'Graphics APIs' selection option will show. By clicking the '+' and '-' icon you can add and remove APIs e.g. 'OpenGLES2'.
     
  12. epit

    epit

    Joined:
    Oct 2, 2012
    Posts:
    32
    Thanks for the reply. What wound up fixing the problem for me seemed to have nothing to do with Unity. I deleted all of my xcode related data files on my Mac and on the iPad, I removed my developer account from the xcode settings and re-added it, and now everything works on IOS 9 as well as 8.4.1

     
  13. mark71

    mark71

    Joined:
    Jun 14, 2015
    Posts:
    41
    That is good news.
    I uploaded an app (using unity 5.2.0p1) for review for iOS yesterday, I hope it's stable.
     
  14. epit

    epit

    Joined:
    Oct 2, 2012
    Posts:
    32
    Are you using IL2CPP or Mono? I noticed when I created my new project in 5.2 it defaulted to using IL2CPP in player settings instead of Mono

     
  15. mark71

    mark71

    Joined:
    Jun 14, 2015
    Posts:
    41
    I am using IL2CPP
     
  16. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @mark71

    Can you try this with the Mono scripting backend and let us know if you see the same behavior as with IL2CPP?
     
  17. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    I tried both mono and IL2CPP with the same result.
    I also tried a test project that worked correctly.
    I rebuilt my xcode project from scratch each time. Not sure what other xcode data might need to be deleted.
    I can send the project in as a bug report if that will help?
     
  18. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    When running in mono I do see this error in Xcode

    Screen Shot 2015-09-23 at 13.42.25.png
     
  19. mark71

    mark71

    Joined:
    Jun 14, 2015
    Posts:
    41
    @JoshPeterson
    I have tried my app with the mono scripting backend with unity 5.2.0p1 and it works fine on both iOS 9 (iPad) and iOS 8 (iPhone). Same result as with IL2CPP.
     
  20. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @monark

    I can't tell much from the screen shot here. It might be worth submitting a bug report for our iOS team to investigate.

    Do you see an error in Xcode with the IL2CPP build? Since the code is all C++ there (instead of assembly as with Mono), you might be able to glean more information.
     
  21. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @mark71

    Sorry, I'm confused now. Does the app work correctly with IL2CPP or not?
     
  22. mark71

    mark71

    Joined:
    Jun 14, 2015
    Posts:
    41
    Yes, it does work correctly. I haven't seen the issues mentioned here with my app on iOS. I just suggested the others to try OpenGLES2 as I forced my app to use OpenGLES2 for both Android and iOS when I had black screen issues on Android and that fixed it.
     
  23. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    Ok, thanks for clearing that up!
     
  24. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    I've put in a bug report now as I couldn't get any further with it and have just dropped down to ogl2 for now.
    (Case 729913) -e 1)
     
  25. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @monark

    Thanks, your iOS team will have a look at it.
     
  26. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    Interestingly found that since 4.6.8p3 came out I can get it to run ok by deleting the app and running from Xcode to re-install it. But as soon as I try and run it again without deleting it first then I get the black screen again on startup.
     
  27. kapitanpattimura

    kapitanpattimura

    Joined:
    Jul 17, 2015
    Posts:
    4
    Hello to everyone,

    I am facing the same issue with this setup:
    • Unity 5.2.1f1
    • iPad Mini 2, iOS 9.0.2
    • xCode 7.0.1
    • IL2CPP scripting backend
    The issue is fixed by switching to Mono2x, but this build cannot be published on App Store due to their new policies (ITMS-90086).

    I have tried forcing only OpenGLES2 by disabling Auto Graphics API and removing Metal, but still the same issue.

    Any light highly appreciated!
     
  28. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    where are the instructions for disabling metal and forcing fallback to OGLES2?
     
  29. mark71

    mark71

    Joined:
    Jun 14, 2015
    Posts:
    41
    Open the iOS tab in Player Settings.
    Select the 'Other Settings' section.
    The third setting is 'Auto Graphics API'
    Uncheck it and the 'Graphics APIs' selection option will show. By clicking the '+' and '-' icon you can add and remove APIs e.g. 'OpenGLES2'.
     
    tswalk likes this.
  30. kapitanpattimura

    kapitanpattimura

    Joined:
    Jul 17, 2015
    Posts:
    4
    I have tested today on iPhone 5s, iOS 8.4 and the same issue, any suggestion?
     
  31. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @kapitanpattimura

    This could be caused by a number of issues, so it is difficult to tell what the problem is. Do you see any errors in the Xcode console output when the application runs?

    It might also be possible to debug the generated C++ code in Xcode to see what is occurring. See this blog post for some general information about debugging the generated code:

    http://blogs.unity3d.com/2015/05/20/il2cpp-internals-debugging-tips-for-generated-code/
     
  32. kapitanpattimura

    kapitanpattimura

    Joined:
    Jul 17, 2015
    Posts:
    4
    Thanks for the reply, no errors in console but here it is the EXC_BAD_ACCESS state:



    I will follow the guide you have pointed out in the meantime!
     
  33. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @kapitanpattimura

    Initially, this does not look like it is specifically related to IL2CPP. However, since it works with the Mono scripting back end, I am still suspect of IL2CPP here. Can you try this with the "Strip Engine Code" settings disabled in the Player Settings? By default, the Mono scripting backend does not strip the engine code, so that may be the difference here. I'm not sure.
     
  34. kapitanpattimura

    kapitanpattimura

    Joined:
    Jul 17, 2015
    Posts:
    4
    It worked! Just uploaded a new version in App Store and all good.

    I am not a believer but just in case we will have your picture in the office from now on (?)



    So Josh... thanks!

     
    Last edited: Oct 22, 2015
  35. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @kapitanpattimura

    I'm glad that I could help (it was a guess at best). I doubt that you want to stare at my face too long though. :)