- Home /
Unity 4.3 - Won't Build in Xcode : __curOrientation
I've literally just upgraded my Unity to 4.3 and now I keep getting an error in Xcode when I try and build my app to my iPhone:
Undefined symbols for architecture armv7: "__curOrientation", referenced from: -[UnityAppController application:didFinishLaunchingWithOptions:] in UnityAppController.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Anyone have any ideas what might be causing this? (I'm also running the most up to date version of xcode 5.0.2) Thanks
Answer by oliver-jones · Nov 13, 2013 at 03:58 PM
For anyone else with this error, you need to find the 'iPhone_View.mm and change:
static ScreenOrientation _curOrientation = orientationUnknown;
to
ScreenOrientation _curOrientation = orientationUnknown;
And everything should work fine again. Ollie
You can automate this by changing line 367 in Assets/Editor/PostProcessBuildPlayer
if line.strip()[0:40] == 'static ScreenOrientation _curOrientation':
to
if line.strip()[0:40] == 'static ScreenOrientation _curOrientation' or line.strip()[0:40] == 'static ScreenOrientation _curOrientation':
Now there's a tab ins$$anonymous$$d of space between ScreenOrientation and _curOrientation
Thanks a lot - exactly the problem I just encountered with Unity 4.3.0f4 (building for iPhone 5s).
Solved by changing the generated code as described above.
I just got the same error in 4.5. Strange that this is not fixed yet.
Answer by DrDigg0R · Nov 17, 2013 at 07:06 PM
Thanks a lot - exactly the problem I just encountered with Unity 4.3.0f4.
Solved by changing the generated code as described above.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Unity Xcode Error : timed out to launch application 0 Answers
Set Screen Size To Only Be Wide? 1 Answer
Apple Mach-O Linker Error 4 Answers
Unity iOS development build always yields non ARC Xcode Project 1 Answer