Solved : SDK4.0 Build&Run : Missing XCode 3.1 Error Mess

Hi,

how do I get SDK4.0 work with Unity iPhone ?

Here is one solution which is working for me:

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.

Thank you very much!
I was stuck figuring out what to do!

This is what I was looking for. Thanks!

Where do I make the change so that I don’t need to change these setting every time I build in Unity?

I’ll look around.

Inside Unity iPhone.app (show package contents), Contents>Frameworks>iPhone-Trampoline>Unity-iPhone.xcodeproj

i still get

iPhone Device 3.1.3(missing) after i update to OS4 :frowning:

c

which is correct
you can not use 3.1.3 as base sdk.
you must set the base sdk to 4.0 and set the deployment target to 3.1.3

do you ever sleep? :wink:

lesfundi

Building with ‘Targeted Device Family’ set to iPhone only (‘1’) not supported with SDK ‘Device - iPhone OS 3.2’

mmm, not easy to figure it all out :frowning:

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:

“Inside Unity iPhone.app (show package contents), Contents>Frameworks>iPhone-Trampoline>Unity-iPhone.xcodeproj”

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…

Hi,
in Player Settings you can set active iPhone SDK to “Unknown” and Unity Editor won’t change active SDK anymore.

thanks Mantas!!!
:slight_smile:

Thank you so much for this thread. It saved my day.

Thanks for the tips!

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.

Has anyone experienced this or have any advice?

Hmm, I don’t know what I did but it works now. :?

I guess banging my head on the keyboard works after all. :wink:

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.

I am pretty sure you don’t have to close and reopen xcode. I think you can just choose “Clean Targets”, then rebuild.

Hi all.

Is there a surefire way to restore buildability with this combination?

Is Unity iPhone 3.0 the answer?

Since iOS4, I have not been able to build successful apps to either iPhone 3G w/ 4.x (smiles), nor a first generation iPod with iOS 3.1.3.

The app either hangs on the “Powered by Unity\nLoading…” splash screen, or shortly thereafter.

The project has otherwise remained unchanged since a working version under previous SDK’s.

All the Project, Target and Architecture settings are correct, as per this thread.

ANY further discussion on these points would be much appreciated.

Cheers,

Kaedmon

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.

This:

http://forum.unity3d.com/viewtopic.php?t=59722

…and this:

http://forum.unity3d.com/viewtopic.php?t=60760

…ring bells.

Have you found any workarounds for previously-functional apps?

I am not even sure it is purely a memory issue, so I don’t want to start hacking and slashing away at my levels before I know what the issue truly is.

How have individuals resolved iPhone Basic 1.7 projects that fail to run in iOS 4.x?

Unity 3.0 will not be the answer if this build toolchain is going to continue to be a tenuous house of cards.