Game Development Community

Runs from XCode not from Device.

by rennie moffat · in iTorque 2D · 09/10/2010 (5:43 pm) · 53 replies

Hi there,
My app runs from XCode to the device but when I run it, directly from the device it crashes. Any thoughts, concerns (should I be), clues?



Thanks.




About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.

Page «Previous 1 2 3 Last »
#1
09/10/2010 (6:29 pm)
Rennie, depends on the device and version of IOS. I have the same issue with IWT - runs from xCode on the 3G iOS4 but not when I run without xCode.
#2
09/10/2010 (6:49 pm)
Ok, if I submit the app, does that little package make a difference? In other words, is it like music(sound) on iTGB, you may not hear it correctly on your computer but when run on the device it works fine. If I submit the app, will the official store bought app run ok?




I know this is a broad question.
#3
09/10/2010 (7:45 pm)
Rennie, if the app doesn't run on the device outside xCode then it wont run standalone when bought from the store. Sad to say, but you need to fix it before any sort of submission.

What version of iOS are you running?
#4
09/10/2010 (8:07 pm)
4.0.2

#5
09/10/2010 (8:40 pm)
Yep, I'm also having problems with iOS4, but only on the 3G.
#6
09/10/2010 (9:05 pm)
Strange.
#7
09/11/2010 (12:13 am)
Dumb question, but Rennie, when running it directly from the device, you are running a "Distribution" or "Shipping" build, right? I only ask because if you try to directly run a Debug or Release build, it won't work -- you must use a Shipping build and sync it with iTunes.
#8
09/11/2010 (12:18 am)
Oh. I see. So a debug only runs from XCode. A Shipping or Release can handle itself.
#9
09/11/2010 (12:28 am)
I tried running both Shipping and Release then testing straight from the device, but it again crashed.






:S
#10
09/11/2010 (12:36 am)
Yes, a Debug build only runs from XCode.

A "Release" build is basically like a "Debug" build, but optimized, which can only be run through XCode, and it will probably run about as fast as a "Shipping" build.

Depending on which version of iTorque you are using, the build that you run directly from your iPhone (by pressing the icon) is called either "Distribution" or "Shipping".

Side note: if you haven't done it, you need to go to the iOS Dev Center and create a "Distribution Provisioning Profile", so it can be run on your development iPhones.
developer.apple.com/ios/manage/provisioningprofiles/howto.action
#11
09/11/2010 (12:41 am)
It's true that the final solution that you submit to the apps store should be the final shipping build, but I think it should still work ok in debug mode also. I've always been using a debug build for testing on my devices, and so far I haven't had any problems.

BTW, as a side issue, does anyone know how to downgrade the iOS? I think that is impossible, right? I've been using OS version 3.1.3 but I made the mistake of upgrading to v4 and now it seems as though I'm stuck with it, which means I have to upgade my SDK. You'd think for a developer there would be a way to change the OS, otherwise it seems a bit rediculous. I really need to be able to test my game with different OSs. Anyone else had this problem? If so, is there any way to resolve it?
#12
09/11/2010 (12:42 am)
I'm not sure if you've done this, but the only way to run a Shipping build is to build it, drag it into iTunes, and sync it to your iPhone. If you ARE doing that, then try running a Release build, then look at the debugger and call stack to see where it could possibly be crashing or if any error messages show up in the debug output. Sometimes an uninitialized pointer will be fine in Debug, but will crash in Release or Shipping. You could also be running out of memory.
#13
09/11/2010 (2:04 am)
Hmm. actually one of my provisions did expire recently but I had set up a half dozen, just in tests. I thought I was using the latest, and that the earliest had canceled. Maybe that is it. Thanks.
#14
09/11/2010 (5:26 am)
Speaking of provisions, those things are a pain. Mine expired last week, so I updated it in precisely the same way as I have been doing for the past year, but this time I kept getting a weird error in XCode (something about security). I was stuck on this problem for two days with zero progress. I tried everything I could think of, and I even upgraded my iOS to v4 (which, turned out to be a mistake), and still no luck.

In the end, you know what the problem was? It was because I didn't delete my previous provisions profile! Even though I wasn't using it, the fact that it was still there was causing this stupid error, so I deleted it and it was fine after that. I've never deleted them before, but it seems as though Apple keeps changing things around all the time without making it clear.

#15
09/11/2010 (8:40 am)
I can normally run all three targets standalone on the device without xCode e.g. on iPhone 3GS. On the iPhone 3G the only thing that works is the DEBUG target WHEN attached to xCode and I think it is because there isn't a load time limit on a debugging session.

Rennie, try this:

- run the game on the device standalone
- wait for it to crash / exit
- now hook it back to the Mac
- goto Window->Organizer in xCode
- click your device in the left pane e.g. Rennies iPhone
- Now click the logs tab in the right hand pane, sort by date
- Click the last log from your game - that might give some information.
#16
09/11/2010 (10:06 am)
Thanks Scott will do.

@Mark. Joooobbbsss!
#17
09/12/2010 (12:03 am)
Scott,
Does the iPhone 3G behave differently compared to the iPod Touch 1st gen? I haven't tested my game using any iPhone, only iPods (1st, 2nd, and 3rd). Also, I've been focusing most of my effort using the 2nd gen, as I didn't think it was worth bothering with 1st gens. Do you get a lot of feedback from users with iPhone 3G or iPod 1st gen?
#18
09/12/2010 (12:41 am)
the iphone3g normally has less ram available than an itouch 1st gen, 10 - 20mb depending on the usage

generally though its not worth worrying about 1st gen, cause they only make < 1% of the whole install base (iphone 2g was not sold outside of the usa, itouch 1st gen didn't sell well cause already iOs 1.1.4 brought a $20 upgrade cost with it, then 2.0 another $10 and ios 3 another $5+ bucks ... I guess only devs and geeky non-americans who wanted to get an iphone 2g alike device got it)
#19
09/12/2010 (12:45 am)
Marc,
Thanks for your feedback. That's what I was hoping would be the case actually.
#20
09/12/2010 (1:03 pm)
The iPhone 3G is the ONLY device on which the next version of IWT does NOT run (well and iPhone 2G LOL!). Basically the OS kills the app during load because it takes too long to load - 21 seconds on the 3G.

Application Specific Information:
com.meyume failed to launch in time 
elapsed total CPU time (seconds): 21.750 (user 9.000, system 12.750), 96% CPU 
elapsed application CPU time (seconds): 16.960, 75% CPU

I have everything pre-compiled DSO and still Torque can't finish loading in the designated time. And this isn't my stuff running, no splash etc, this is a basic Torque load and then a run of top level main.cs - in here I call initializeProject and then immediately return - still it gets reaped for taking too long to load.

I should add that this is IOS4.02 and this I think is the culprit - there are many other (non-Torque) games as well which used to load in the time-scale on the 3G and now no longer work.

The publisher is insistent that the game must load on the 3G as they have had a lot of negative feedback (as I did with current version) from 3G users. There wasn't a way to exclude 3G but now Apple has excluded 3G from GameCenter there might be a way forward i.e. build in GC and then exclude 3G if that is possible.

Mark, I would say test on the 3G or just be prepared for negative feedback.
Page «Previous 1 2 3 Last »