Build Success : Step By Step (Updated)
by Sven Bergström · in iTorque 2D · 10/22/2009 (10:18 am) · 29 replies
So , i downloaded T2D_iPhone_Beta_1_0 and wanted to see how easily i can get it to build. I decided to make a step by step approach of the steps i have taken, in order to achieve a working build - both on device and in the simulator.
Building For iPhoneOS 2.0, 2.1, 2.2.1, 2.x: ONLY SUPPORTS GCC 4.0! NOT 4.2
Building for iPhoneOS 3.x + : Supports Gcc 4.2, excludes all 2.x users from your game.
First up (section A) - System Specs :
Platform : 2007 iMac
OSX Version : 10.5.7
XCode Version : 3.1.4
iPhone SDK : 3.1.2 sdk for leopard
iTGB Version : T2D_iPhone_Beta_1_0 (aka iTGB 1.3 beta)
Devices tested on : iPod Touch 1st Gen/2x iPod Touch 2nd Gen / Simulator ( 2.2.1, 3.0, 3.1, 3.1.2 )
Second - Build Configuration :
Open Torque2D.xcodeproj :

Check that the settings are what i am hoping for :

Check the compiler version :

Check the SDK im using :

The results (the image shows the iTGB Optimized one, i tested both targets the same way) :
Testing on Device :
I got 1 error on build for device :

So i go and rectify this by setting my proper provisioning profiles accordingly :
I first set the app identifier inside the properties (info.plist file) of the target :

I then set the properties of the code signing authority on the Build tab :

I will test snow leopard soon, and report back with the same workflow.
For those who have succeeded
If you have had SUCCESS building and using iTGB, please post "section A" above, with your system specs.
Note : Has anyone on Snow leopard succeeded so far?
For those who have not
if you have NOT had success building the games, please also post "section A" with your own system specs, and if you have not - try the above (it might seem obvious but settings in xcode get applied the minute you change them). And, if possible make sure you have the latest versions of the software for iphone development (though, still never had problems with previous versions of the SDK's, the tools are YARDS better in 3.1.2).
Goals
Please do not spam this thread with negativity and useless complaints. Do that in another thread and lets keep this one for good reference :) iPhone development is a challenge on many aspects, and the tools are only starting to get better recently (XCode, and aspects of using the SDK were horrific at first). The goal is to pinpoint the problems in a sea of possible errors that have to do with the environment you are building on, the setup you have created and the tools you use. If we can make a nice list of "watch out for's" we will be a lot better of in the very near future.
With my current setup i have had no issues working with iTGB overall (excluding the issues with code bugs etc), and if we can find where the problems are creeping in the problems can be eliminated by being documented thoroughly and extensively.
Update : SDK 3.0 / GCC 4.2 build info!
The following information had been made known to me thanks to Tim from maxgaming.Building For iPhoneOS 2.0, 2.1, 2.2.1, 2.x: ONLY SUPPORTS GCC 4.0! NOT 4.2
Building for iPhoneOS 3.x + : Supports Gcc 4.2, excludes all 2.x users from your game.
First up (section A) - System Specs :
Platform : 2007 iMac
OSX Version : 10.5.7
XCode Version : 3.1.4
iPhone SDK : 3.1.2 sdk for leopard
iTGB Version : T2D_iPhone_Beta_1_0 (aka iTGB 1.3 beta)
Devices tested on : iPod Touch 1st Gen/2x iPod Touch 2nd Gen / Simulator ( 2.2.1, 3.0, 3.1, 3.1.2 )
Second - Build Configuration :
Open Torque2D.xcodeproj :

Check that the settings are what i am hoping for :

Check the compiler version :

Check the SDK im using :

The results (the image shows the iTGB Optimized one, i tested both targets the same way) :
Testing on Device :
I got 1 error on build for device :

So i go and rectify this by setting my proper provisioning profiles accordingly :
I first set the app identifier inside the properties (info.plist file) of the target :

I then set the properties of the code signing authority on the Build tab :

I will test snow leopard soon, and report back with the same workflow.
The purpose of this thread :
For those who have succeeded
If you have had SUCCESS building and using iTGB, please post "section A" above, with your system specs.
Note : Has anyone on Snow leopard succeeded so far?
For those who have not
if you have NOT had success building the games, please also post "section A" with your own system specs, and if you have not - try the above (it might seem obvious but settings in xcode get applied the minute you change them). And, if possible make sure you have the latest versions of the software for iphone development (though, still never had problems with previous versions of the SDK's, the tools are YARDS better in 3.1.2).
Goals
Please do not spam this thread with negativity and useless complaints. Do that in another thread and lets keep this one for good reference :) iPhone development is a challenge on many aspects, and the tools are only starting to get better recently (XCode, and aspects of using the SDK were horrific at first). The goal is to pinpoint the problems in a sea of possible errors that have to do with the environment you are building on, the setup you have created and the tools you use. If we can make a nice list of "watch out for's" we will be a lot better of in the very near future.
With my current setup i have had no issues working with iTGB overall (excluding the issues with code bugs etc), and if we can find where the problems are creeping in the problems can be eliminated by being documented thoroughly and extensively.
#22
12/03/2009 (12:43 am)
Hunh, I changed the Active Build Configuration to "release" instead of "debug" and it worked on the simulator now. Cool, but any idea why?
#23
I put the first build of my iTGB game in and made it here. Suggestions on the white screen?
12/03/2009 (12:51 am)
OK, step #3 - I have now achieved the white screen I have read about in a few other posts.I put the first build of my iTGB game in and made it here. Suggestions on the white screen?
#24
a) The commonconfig.xml file resolution is set to "480 320 32" - that's correct isn't it?
b) I looked at the console and each time all it's getting to is this and no further:
[Session started at 2009-12-02 21:15:53 -0800.]
Initial Command Line
0 : /Users/Jason/Library/Application Support/iPhone Simulator/User/Applications/1E6A2610-B2FB-4E56-A327-9D01A5E9816A/v3ITD01djz.app/v3ITD01djz
Merged Command Line
0 : /Users/Jason/Library/Application Support/iPhone Simulator/User/Applications/1E6A2610-B2FB-4E56-A327-9D01A5E9816A/v3ITD01djz.app/v3ITD01djz
performing mainInit()
c) I have everything loaded into resources - all the dlls, the dsos, etc. Doesn't seem to be the issue. And I based the first build off of the behavior shooter so that I would be limiting the variables I was testing.
12/03/2009 (1:21 am)
I tried the suggestions in this thread for the white screen, but to no avail: http://www.garagegames.com/community/forums/viewthread/103469a) The commonconfig.xml file resolution is set to "480 320 32" - that's correct isn't it?
b) I looked at the console and each time all it's getting to is this and no further:
[Session started at 2009-12-02 21:15:53 -0800.]
Initial Command Line
0 : /Users/Jason/Library/Application Support/iPhone Simulator/User/Applications/1E6A2610-B2FB-4E56-A327-9D01A5E9816A/v3ITD01djz.app/v3ITD01djz
Merged Command Line
0 : /Users/Jason/Library/Application Support/iPhone Simulator/User/Applications/1E6A2610-B2FB-4E56-A327-9D01A5E9816A/v3ITD01djz.app/v3ITD01djz
performing mainInit()
c) I have everything loaded into resources - all the dlls, the dsos, etc. Doesn't seem to be the issue. And I based the first build off of the behavior shooter so that I would be limiting the variables I was testing.
#25
Have you checked the crash log? That's very important to see what is going on "underneath the blank screen". If it fails in debug, it is possible a debug assertion was thrown by the engine. Assertions won't be processed in release mode (compiled out).
The crash log is found within Xcode, go to the top menu, Windows, turn on organizer window. In Organizer, scroll down, click crash log.
Note: you have to force a synch from the iPod/iPhone to get the crash log onto your Mac (disconnect/reconnect the cable can do it).
I suggest a moderator create a new thread for helping resolve this particular issue and move our posts above - the original post by Sven was asking for specific configs, etc. that worked not to troubleshoot here. Failing that, Django please "collapse" your posts into a single (longer) post so we can help. I'm new to iTGB also Django but I'll try to pass along the little I've guessed/determined.
Note - I will be unavailable for 2 weeks (no internet access) due to travel.
12/03/2009 (10:00 am)
You may have differences in your configurations. I was able to build and run iPhoneTest in both Release and Debug.Have you checked the crash log? That's very important to see what is going on "underneath the blank screen". If it fails in debug, it is possible a debug assertion was thrown by the engine. Assertions won't be processed in release mode (compiled out).
The crash log is found within Xcode, go to the top menu, Windows, turn on organizer window. In Organizer, scroll down, click crash log.
Note: you have to force a synch from the iPod/iPhone to get the crash log onto your Mac (disconnect/reconnect the cable can do it).
I suggest a moderator create a new thread for helping resolve this particular issue and move our posts above - the original post by Sven was asking for specific configs, etc. that worked not to troubleshoot here. Failing that, Django please "collapse" your posts into a single (longer) post so we can help. I'm new to iTGB also Django but I'll try to pass along the little I've guessed/determined.
Note - I will be unavailable for 2 weeks (no internet access) due to travel.
#26
I'll collapse them into a single post, thanks.
12/03/2009 (12:32 pm)
Thanks BB. Actually I'm running these all on the simulator, so no crash log for that, right?I'll collapse them into a single post, thanks.
#27
developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_develop...
By the way, I collected what info I've been finding along with answers in a new thread called Troubleshooting iTGB 1.3: Start Here
12/03/2009 (12:59 pm)
I don't see why it wouldn't but I can't say for sure - I'm too new to it. Might find the answer here, if you do I'd appreciate knowing also:developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_develop...
By the way, I collected what info I've been finding along with answers in a new thread called Troubleshooting iTGB 1.3: Start Here
#28
Success!!!!!
What was the cause of my "white screen of death"...I didn't include the iPhoneCmdLine.txt file in the resources folder. The little file that only says "-missing -this" which is a wonderful zen joke on my last 72 hours. :)
Now everything works peachy. Have the first build of my game on my iPod Touch and working just fine. Off to optimize and build the Alpha...
12/03/2009 (5:19 pm)
I'll add my stuff over on the new thread but just to wrap things up here:Success!!!!!
What was the cause of my "white screen of death"...I didn't include the iPhoneCmdLine.txt file in the resources folder. The little file that only says "-missing -this" which is a wonderful zen joke on my last 72 hours. :)
Now everything works peachy. Have the first build of my game on my iPod Touch and working just fine. Off to optimize and build the Alpha...
#29
12/03/2009 (5:39 pm)
:) Right on - that is a great addition to the survival thread. Congrats on jumping the hoops!
Torque Owner Django Zeaman
I am now able to get the iPhone test to load onto the simulator (thanks for the help Baneblade and Sven).
The only problem is that it hangs after the iTGB logo loads and then fades. Is this what you were referring to earlier Baneblade?