Finally went and bought a mac! Need help building for iphone

Previous topic - Next topic

Falstaff

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:

Code (glbasic) Select

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]

AlienMenace

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).
Apps published: 3

Falstaff

Oh ok.. can I not run my apps in the simulator?

AlienMenace

Apps published: 3

Falstaff

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..

Falstaff

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..

AlienMenace

You were able to play your game on the simulator?
Apps published: 3

Falstaff

no on my phone :) don't care about the simulator anymore :D This is so awesome!

AlienMenace

That's quite a moment, seeing your game running for the first time on a mobile device. Good luck!
Apps published: 3

ampos

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)
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Wampus

I found compiling for iOS the first time to be like solving a puzzle from Riven, except without the pretty visuals and sound.  ::)

Ian Price

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.
I came. I saw. I played.

Falstaff

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 or Diawi 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..!