200+ errors on xcode build?!?!?!?

After working for months, you can imagine my near-depression when I built my Unity iOS project to Xcode, and went to play it on my iPhone the first time, only to see 6 warnings and over 200 errors?? Any clue on how, and why I need to tackle this??:(:(:(:(:frowning:

/Users/caine/Desktop/TaneliTest1/Unity-iPhone.xcodeproj
Missing SDK in target Unity-iPhone-simulator: iphoneos4.0
/Users/caine/Desktop/TaneliTest1/Classes/AppController.mm
Enumeration values ‘kScreenOrientationUnknown’, ‘autorotation’, and ‘kScreenOrientationCount’ not handled in switch
Incompatible pointer types passing ‘UIView *’ to parameter of type ‘EAGLView *’
ld: warning: directory not found for option ‘-L"/Users/caine/Desktop/TaneliTest1"’

ld: warning: directory not found for option ‘-L"/Users/caine/Desktop/TaneliTest1/Libraries"’

ld: warning: ignoring file /Users/caine/Desktop/TaneliTest1/Libraries/libiPhone-lib.a, missing required architecture i386 in file

“UnityParseCommandLine(int, char**)”, referenced from:

“UnityUse32bitDisplayBuffer()”, referenced from:

“UnityGetTargetResolution()”, referenced from:

“UnitySetInputScaleFactor(float)”, referenced from:

“UnityUseOSAutorotation()”, referenced from:

“UnityIsRenderingAPISupported(int)”, referenced from:

“UnityGetDesiredMSAASampleCount(int)”, referenced from:

“UnityRequestedScreenOrientation()”, referenced from:

“UnityFinishRendering()”, referenced from:

“UnityKeyboardOrientationStep1()”, referenced from:

“UnitySetScreenOrientation(ScreenOrientation)”, referenced from:

“UnityPlayerLoop()”, referenced from:

“UnityKeyboardOrientationStep2()”, referenced from:

“UnityInputProcess()”, referenced from:

“UnityInitApplication(char const*)”, referenced from:

“KeyboardOnScreen::Init()”, referenced from:

“UnityPause(bool)”, referenced from:

“UnityCleanup()”, referenced from:

“UnityDidAccelerate(float, float, float, double)”, referenced from:

“ConvertToUnityScreenOrientation(UIInterfaceOrientation, EnabledOrientation*)”, referenced from:

“UnityIsOrientationEnabled(EnabledOrientation)”, referenced from:

“UnitySendTouchesBegin(NSSet*, UIEvent*)”, referenced from:

“UnitySendTouchesEnded(NSSet*, UIEvent*)”, referenced from:

“UnitySendTouchesCancelled(NSSet*, UIEvent*)”, referenced from:

Been working on it, and trying crazy things, and somehow got it down to 1 error:

Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1

and clue??

ARG!!! I haven’t seen this anywhere is documentation - and I read A LOT! Scripts cannot start with numbers??? Ugh, that’s over 10 scripts for me to rewrite and find the references to. not happy at the work, happy I may have found an answer…

http://forum.unity3d.com/threads/113155-xcode-compiler-error

I believe you are using Xcode 4.2 with Unity older than 3.4.2. I strongly recommend to upgrade to Unity 3.4.2, because it has many important fixes for iOS 5.0 devices and building with Xcode 4.2.
Current your problems are related to having selected wrong build target in Xcode 4.x toolbar, please choose “Unity-iPhone” target instead of “Unity-iPhone-simulator”. Also don’t forget to select “latest” iOS SDK on Player Settings tab in Unity Editor.

Am I the only one who gets very nervous about upgrading things like Unity or XCode, especially when being close to bringing a product to market? The last thing I want to do is impact development time with correcting for new engine or compiler versions.

Try it on a VM first and make backups.

I have the same problem when try to build for iPhoneSimulator target. Anybode can help me to solve this problem?

Had the same, and always build directly to the device instead. Was also fine for me, as you can then see everything the way it REALLY is, not how it is simulated.

Did you change Settings for iOS (in PlayerSettings) in Unity?

In Settings for iOS->Other Settings->Optimization->SDK Version, change “iOS latest” to “iOS Simulator latest”, or so.