- Home /
Black screen while running in iOS
I think something is funky with xCode again. After the splash screen, the screen just goes black and stays black. This happens on every device I try it on. The game works on Android, Windows and Mac just fine, and worked on iOS before Unity 3.5.1 and Xcode 4.3.2. It builds just fine with the usual errors.
This is all the ouput I get from xCode:
2012-04-12 15:04:05.390 nyancat[61761:707] -> registered mono modules 0x11d82f8 -> applicationDidBecomeActive()
I can tell none of my scripts are running because they throw out debug text like nobody's business, so it seems as if the scene isn't loading at all. I have also tried running this project with an empty scene with no luck, so I don't think any of my scripts are causing the issue. I've also tested other projects and they still run fine.
If I had to guess, it's probably something to do with the Prime31 plugins I'm using, but they are so tied into my code that removing them would be a heck of a lot of work. Does anyone have any ideas?
I realize this is something of a cop-out, but if nobody can give you leads, you might try to reproduce the issue with the simplest setup possible (ideally from a new project, introducing elements one by one until it breaks). Won't necessarily help, but could narrow down the problem.
I guess I can make a new project with all of the plugins I use to try and figure out which one is the problem. If it isn't the plugins, it's something wrong with my project.
Yes there was a post on the forums about the Etcetera plugin causing this. I believe you delete the app delegates out of the Etcetera folder in Xcode. But either way prime has updated the plugins so you can get the latest plugins and that should solve the problem.
I updated the Etcetera plugin, but it didn't seem to help. $$anonymous$$orrow morning I'll see about removing the plugin entirely and see if that helps. If it does, I'll work on it from there.
Here is a one of the forum post that tells you something to try. http://forum.unity3d.com/threads/64166-Etcetera-Plugin-Live!-Alerts-prompts-loading-views-push-localization-and-more!/page33
the only plugin that could affect the root view controller is the Etcetera Plugin and as long as you are on the latest version it will not touch that code at all. If you are using the latest version the AppControllerPushAdditions will have the following line which will conditionally compile based on the value (1 for Unity 3.5, 0 for older versions):
#define USING_UNITY_35 1
If you don't trust that the compiler is properly removed the code you can just remove the AppControllerPushAdditions.h/m file and then the only code that could ever effect the root view controller will no longer be part of your project.
Answer by james_robotsvswizards · May 14, 2012 at 06:27 PM
The etc plugin will do that if you don't delete the older files first. in your project view just type etc and make sure you delete the etc folders before importing the latest version.
Answer by replay11 · Sep 01, 2012 at 09:10 PM
I had exactly the same issue using Version 4.4.1 (4F1003) and Unity 3.5.5f3. The game played fine inside of Unity. The game build from Unity had no compiler errors. The Xcode Project compiled without any errors, but when the game was running the launch image appeared for a few seconds and then it went to a blank, black screen.
The resolve the issue I did just what was mentioned above. 1) In my Unity Project folder I did a search for "ETC" 2) I deleted the two Etcetera folders 3) I downloaded the current Etectera plugin from Prime31 4) I installed the new package into my Unity project 5) Problem Solved !!
Im having this problem as well but i don't understand what you're saying @replay11 where do i delete what files?
Answer by james_robotsvswizards · May 14, 2012 at 06:27 PM
The etc plugin will do that if you don't delete the older files first. in your project view just type etc and make sure you delete the etc folders before importing the latest version.
Answer by Revick · Jul 08, 2016 at 12:21 PM
For anyone who stumbles on this, leaving this tip for others. Black screen on iOS before Unity splash screen after successful build and no errors in Xcode.
I had a similar issue where my CPU usage would shoot to 100% and hang on black screen before the Unity splash screen.
How I debugged: Select mono in the build settings in Unity. Then when the app is running in Xcode transfer to instruments and click through to see which method is causing a potential hang.
For me it was PlayerPrefs.GetInt("Player Score") getting called in an Awake() method. Oddly enough this caused an endless loop and never let me progress to the game.