I meet a strange problem today. Basically I can install and run my Unity3D in a iOS device through XCode (that generated by Unity3D iOS version). But when I tap the application directly through my iPad/iPhone, it will show the loading screen and then crash (back to the iPad/iPhone interface).
I really don't have any idea why this happend? Can some one help me??
My Unity3D version:
Unity3D Pro iOS 3.1
My iPad version:
I found the problem, the loading time is far more than the iOS permission. I think when running through XCode, the iOS will not manage the app so that you can load the Game far more than 10 seconds.
This case is described in Unity Manual Troubleshooting page: http://unity3d.com/support/documentation/Manual/TroubleShooting.html#iPhoneTroubleShooting
Answer by Bampf
Dec 31, 2010 at 02:48 PM
I found a thread where someone else cleared up a similar problem by changing Xcode settings:
Basically he had a pointer to a deallocated object somewhere, but the Xcode setting NSZombie kept the object around in order to try and detect such problems.
If a vanilla Unity project generated such a problem it is probably a bug you want to submit to them, along with your project demonstrating the problem. But if you've gone in and edited the Objective-C code for some reason then look first at your edits; you might not be retaining an object that you need to.
Another tip is to look at the logs your app generates on the device. You should see them when you look at your iPad in the Organizer window. That may help you figure out where its crashing.
Thanks for your advice, I check the log and finally find the problem. It is the active time (loading time) of the App that exceed the iOS permitted time -- 10s. I think i have to optimize the scene for loading.
Glad you figured it out. Making the very first scene (your game menu?) smaller should help. If you have a big soundtrack file, replace it with a short loop. Change the import settings of any large textures you are using and set their maximum size to something smaller. Some textures can be compressed (probably are by default though). If you can combine lots of small textures into one large texture atlas, that can also help.
Answer by Mani
Dec 31, 2010 at 05:25 PM
I have the same issue at times but have found that by changing the arm under the Targets and in the main Unity iPhone xcode project I'm able to get it to work. Also this post in the Unity forum might help. http://forum.unity3d.com/threads/68443-Trying-to-build-only-for-armv6-causes-a-EXC_BAD_ACCESS
Answer by pepefirst
Jul 13, 2011 at 03:28 PM
The problem is this: if your App is big in size, Xcode kills your App due to the delay in loading it. Read the paragraph "Game runs fine when launched from Xcode and crashes on first level load when launched manually on the device" on this link:http://unity3d.com/support/documentation/Manual/android-troubleshooting.html
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
1 Person is following this question.
iphone like date pickers
Making a iOS build of a existing project
App will not appear on my iPhone! Help!
Unity modules for iOS?
What does Mprotect remapping failed mean and how do I fix it?