So I finally got impatient enough waiting to test my game on my actual iphone.. that I went and bought a second hand mac mini! It's pretty cool :)
I've finally got xcode 4.2 loaded up on it, and am trying to load up a simple "Hello World" type app which I've created on my windows machine.
When I try to build the app in xcode, I get the following warnings:
Ld /Users/john/Library/Developer/Xcode/DerivedData/iPhone-fxlajhqnytnxtqagiuifcwxohika/Build/Products/Debug-iphonesimulator/iPhone.app/iPhone normal i386
cd "/Users/john/Dropbox/Game dev/Zombie Heads/code/glbasic/iphonetest/distribute/iPhone/XCode"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/john/Library/Developer/Xcode/DerivedData/iPhone-fxlajhqnytnxtqagiuifcwxohika/Build/Products/Debug-iphonesimulator "-L/Users/john/Dropbox/Game dev/Zombie Heads/code/glbasic/iphonetest/distribute/iPhone/XCode/Lib" -F/Users/john/Library/Developer/Xcode/DerivedData/iPhone-fxlajhqnytnxtqagiuifcwxohika/Build/Products/Debug-iphonesimulator -filelist /Users/john/Library/Developer/Xcode/DerivedData/iPhone-fxlajhqnytnxtqagiuifcwxohika/Build/Intermediates/iPhone.build/Debug-iphonesimulator/iPhone.build/Objects-normal/i386/iPhone.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -lstdc++ -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=30000 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework AudioToolbox -framework CoreLocation -framework OpenAL -lGLBasiciPhone-egl -lpng-gf -lPROGRAM -framework MediaPlayer -o /Users/john/Library/Developer/Xcode/DerivedData/iPhone-fxlajhqnytnxtqagiuifcwxohika/Build/Products/Debug-iphonesimulator/iPhone.app/iPhone
ld: warning: ignoring file /Users/john/Dropbox/Game dev/Zombie Heads/code/glbasic/iphonetest/distribute/iPhone/XCode/Lib/libGLBasiciPhone-egl.a, file was built for archive which is not the architecture being linked (i386)
ld: warning: ignoring file /Users/john/Dropbox/Game dev/Zombie Heads/code/glbasic/iphonetest/distribute/iPhone/XCode/Lib/libpng-gf.a, file was built for archive which is not the architecture being linked (i386)
ld: warning: ignoring file /Users/john/Dropbox/Game dev/Zombie Heads/code/glbasic/iphonetest/distribute/iPhone/XCode/Lib/libPROGRAM.a, file was built for archive which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
"_isIphone", referenced from:
_main in main.o
"_GLB_iPhone_call_main", referenced from:
_main in main.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Not sure why it's doing stuff for architecture i386.. any suggestions? Sorry, I'm brand new to xcode!
*edit: attached a .zip containing what my project looks like, which includes the distribution/xcode folder.
[attachment deleted by admin]
It looks like you might be building for the simulator? You need to build for an actual device which needs to be connected with a dev provisioning profile installed. Have you signed up to be an Apple Developer and paid them the $100? I think you need to do that before you can start provisioning your devices (its been quite a while since I did that stuff though).
Oh ok.. can I not run my apps in the simulator?
Nope.
Oh ok.. well awesome, yeah I got a bunch of warnings saying xcode had internal errors.. but I kept clicking "continue" and it looks like it runs on my app :) now to see if I can get my actual game opened in xcode..
Wow, just played my game on my iphone.. I'm so excited! Now to figure out all this provisioning stuff so I can get help from friends in testing on their idevices..
You were able to play your game on the simulator?
no on my phone :) don't care about the simulator anymore :D This is so awesome!
That's quite a moment, seeing your game running for the first time on a mobile device. Good luck!
Do not try to do it, you will not be able to do it.
PM me your email and I will sent you a step by step book, and I mean book (thanks Ian for this)
I found compiling for iOS the first time to be like solving a puzzle from Riven, except without the pretty visuals and sound. ::)
Compiling for iOS is a fecking nightmare. Apple should be shot for making it as hard as possible to get something up and running on their hardwares. The whole process is totally user unfriendly.
Yawn, just waking up.. was up all night trying to figure out this damn distribution provisioning... oi.. makes my head spin.
At least I can sign my app with my developer certificate, which lets me play it on my own iphone, but it won't let me sign it with my distribution profile.. even though it seems to show up under my Organizer->Devices->Provisioning Profiles. I've read so many articles and posts and cries for help that I'm not even sure where I went wrong..!
I'm just trying to get an ad-hoc distribution profile set up so that I can use a service like testflight (http://www.testflight.com) or Diawi (http://www.diawi.com/) to handle the actual distribution. This is too complicated ;p
*edit: annnnd hours later, finally! got my provisioning woes sorted.. I've got my first couple installs through the Testflight service. Nice and streamlined, really awesome :) Don't have to force people to muck around with provisioning info or device id's as testflight handles it all. Top notch free service.
Overall though getting everything setup with all this certificates and keys and blah.. I feel like I've won a war, lol..!