5
votes

I have Unity3D project and I built it for iOS. If I run it using XCode's simulator it works fine. But if I want to compile it for "iOS Device" or for a physical device connected to my Mac, I get lots of errors and as a result I can't create an Archive. For a testing purpose, I even created an empty Unity3D project, built it for iOS and still get the same errors, although this project does absolutely nothing. The errors are the following:

ld: library not found for -liPhone-lib

clang: error: linker command failed with exit code 1 (use -v to see invocation)

And these are the settings I use:

  • Architectures: armv7, armv7s, arm64 (also tried removing arm64 without any positive result)
  • Base SDK: iOS 7.1
  • Build active: no
  • Supported platform: iOS
  • Valid arch: armv7, armv7s, arm64

I use XCode 5.1.1 and Unity 4.5.1 (previously even tried 4.3.2)

How can I build the project and create the Archive?

1
I don't think this specifically will solve your issue, but Unity's iPhone-lib is currently only built for armv7, not armv7s nor arm64. That is, your Architectures setting must be set to only armv7 to build for device. Valid Architectures is best left at the iOS Default (when viewing Levels of settings, not Combined).Slipp D. Thompson

1 Answers

5
votes

I've run into the same issue some time ago and it was fixed by replacing quotes under library search path:

replace

"$(SRCROOT)/Libraries"

with

$(SRCROOT)/Libraries

more: http://answers.unity3d.com/questions/538363/error-when-i-updated-to-xcode-5-to-get-import-to-i.html