First I tried to setup Base SDK to 3.1.3, hit build&run and then inside Xcode setup manually to SDK4.0. But - all frameworks still are red, which probably means that they are not fitting the BaseSDK I selected. But anyway - lets see what happens.
When building in Xcode I get following error:
Can’t run ‘Unity-iPhone’ - was built for ‘arm7’, but device requires ‘arm6’ or compatible architecture.
Ok, thats easy - quickly changed that in target settings (“arm7 optimized” → “Standard(arm6, arm7)”). Compiles without errors (regardless to the red marked frameworks) - BUT what’s that? After installing it to the iPhone 3G OS4.0 ( I got smile ) I get a new one :
An unknown error message ‘IncorrectArchitecture’, was received from the device.
Thats easy, too. Because you still have “arm7” selected in your quick target drop down selector (where you normaly change your target device e.g. simulator/iphone and build settings like debug/release)
So this thread is Solved. May be this helps someone out.
Quick : Setup Unity Base SDK to 3.1.3, build&run, setup Base SDK to 4.0 in Xcode, change Architechture to arm6/arm7 and select arm6 in build settings selector.
if the target is not ipad exclusive, you must set the base SDK to 4.0 (3.2 is ipad exclusive os)
Nothing else will be accepted by apple anymore at all.
you can still set the deployment target in the active target settings to 3.1.3 if you want that.
I find that I can build with os4.0 just fine, but Unity always writes over my settings when I Build&Run from Unity. I see you mention this as the solution:
I have the built .app file. I can show package contents. I don’t see a Contents or Frameworks folder. Also this seems confusing to me. I must be missing something simple because changing all those SDK settings everytime I hit Build&Run becomes time consuming and annoying, yet I hear no one else complaining. Can someone help me out? I’d greatly appreciate learning how I can fix this…
However, after installing xcode 4.0.1 and following all the instructions in this thread, my app no longer works as it did before the xcode update.
The app gets built and after xcode shows the usual message “GDB : Running” but the unity icon appears for about half a second and disappears then about 30 seconds later I get the following error message in xcode.
“Error from Debugger: The program being debugged is not being run”
It’s as if the the app only gets partially installed because if I try to run the app after I close xcode, the unity icon appears then the app quits after a second.
Restarting the device (first generation ipod touch version 3.1.3) doesn’t help.
It works because in order to commit the SDK and Deployment Target setting changes you need to close Xcode, open it again, and only then Build. If you just change the settings and try to build, your app will fail to run every time.
kaedmon. If you come as far as the loading screen the build seems to have worked. Is the debugger saying something?
Forgot the name of the typical freeze crash.
Either way, try deleting the folder you set when hitting build in unity. Close unity. Close XCode. Open unity, recompile and see if that helps.
Sounds dull but worked once in a while for me.