iPhone app runs from Xcode, but crashes when running from device- help!

I’ve gotten my first iPhone game up and fully running (finally!), running into some last-minute issues though.

I can click “build and run” from Xcode, and everything compiles/etc fine, then runs on my (3rd Gen 8GB) iPod Touch. It does take a full minute + to load, which is crazy…might be related to issue?

The big problem is, when i try to run the game directly from my iPod, just by tapping the icon, it will show the generic “loading” for 10-20 seconds, then just crash out to the home screen. Nothing else.

Lastly, the build size is still enormous! my entire “Assets” folder is only 10mb, and i realize Unity might tack on another 10mb, but somehow this tiny little game is 47mb! I do not have Unity iPhone Pro, and it seems there is nothing I can do to reduce this…unless someone has hints there too?

If anyone could help, especially on just what might be causing this crashing issue, would be MUCH appreciated. The game is so close to finished, yet just barely hung up on this crashing problem…no clue as to why :frowning:

thanks…

likely you built for armv6 + armv7 - in that case already the app code itself is compiled 30mb

thanks dreamora, I am using armv6 + armv7. Re-building now. Using unity iPhone 3, btw. Is there a drawback to only using armv6 or armv7, which is best?

any thoughts on the crashing-when-running-from-device issue??

directly, none.

as for the crashing: stuff that works on xcode but not when running on its own might be related to taking too long to load. the console (organizer in xcode then the corresponding device if it is connected) or crash reports should give you some idea there

also ram can potentially be related to it as it runs slower when on xcode debug and thus “overfills slower”

armv6- ah, i just did some better research on this (sry, late), I always thought this meant a physical type of chip it was building for, and would only work on such…my bad. ARMV6 it is!

crashing- I was guessing something the same? It does take full minute to load, and at the build size it is…but I have downloaded a 90mb app just now to test, and it runs fine. Lemme try with that ARMV6 fix…

Thanks a ton!

a full minute would be 40s longer than you have. if the user control is locked for more than about 20s, the iOS watchdog will go out and kill your app.
make scene 0 basically empty, delay for 0.1s and then load the real scene

ahhh…thank you SO MUCH!!!

here I thought I was being super tricky, building the entire game into one scene to make things easy and fast…[fail^inf] lol.

ARMV6 compiled 15mb smaller…woot!

Next up is making a simple start scene…can’t thank you enough! Actually, yes I can…by going back to the apple site and properly reading the important docs :wink:

awesome, everything works now!

I’ll have to figure out just what that long loading time is about…it still takes a full minute to open the actual game, very strange.

big thanks!