1

I tried to google for the solution. I tried to delete the DerivedData folder but it still doesn't work... Why is this still happening? I am using Xcode version 6.2. Thanks.

Edit: Under the one error has 70 different errors saying various things. There is a warning saying ld: warning: ignoring file /Users/Kevin Chen/Desktop/Parking Director/Libraries/libiPhone-lib.a, missing required architecture arm64 in file /Users/Mushrooms4Eva/Desktop/Parking Director/Libraries/libiPhone-lib.a (2 slices)

All of the following links and solutions did not work for me:

https://teamtreehouse.com/forum/apple-macho-linker-error-xcode-61

Apple Mach-O Linker Error when compiling for device

Community
  • 1
  • 1
Kevin Chen
  • 13
  • 1
  • 8

1 Answers1

1

Sounds like your library libiPhone-lib.a is not compiled for arm64, but your project is set to be compiled for this architecture.

I think all the errors are triggered by this "warning" as the library is ignored, and therefore you may have a lot of missing references.

Your options:

  1. Get a version of the lib compiled for arm64, or do it yourself, if you have the code
  2. Remove arm64 architecture from your project (which I don't recommend, as you'll need to provide an 64bit build for the App Store, but that's another story)

enter image description here

How to make 64bit builds (available from Unity 4.6.2+)

  1. iOS platform
  2. Other Settings
  3. Scripting Backend => IL2CPP
  4. Architecture => Universal (to target both 32 and 64 bit)

How to build for simulator

  1. Player Settings
  2. iOS platform
  3. SDK Version => Simulator SDK
d4Rk
  • 6,622
  • 5
  • 46
  • 60
  • I don't know how to do the lib thing. Can you explain it? Thanks – Kevin Chen Mar 25 '15 at 07:42
  • Where did you get the library (libiPhone-lib.a) from? – d4Rk Mar 25 '15 at 07:43
  • I have no idea... I just built a game from unity and opened the project up and it gave me that error... – Kevin Chen Mar 25 '15 at 07:44
  • Ok, if you're doing all this, just for testing / learning, and don't want to deliver this project to the App Store, you should be fine to go with option 2. I will attach a screenshot, where to do this. – d4Rk Mar 25 '15 at 07:50
  • But I need to distribute it to the AppStore – Kevin Chen Mar 25 '15 at 07:51
  • Can you explain option 1 for me if that works for distributing to the AppStore? – Kevin Chen Mar 25 '15 at 07:54
  • Does option 2 work for distribution to the AppStore? – Kevin Chen Mar 25 '15 at 08:14
  • no, not if you hand in a new app, for updates it should be possible to hand in 32bit builds until june or so, not 100% sure about that.. check this out https://developer.apple.com/news/?id=10202014a – d4Rk Mar 25 '15 at 09:01
  • Do you want the scripts of my unity project or my whole file – Kevin Chen Mar 25 '15 at 10:06
  • Sorry, misundertood your comment.. I thought you're using a third party lib.. check your unity build settings (see updated answer) – d4Rk Mar 25 '15 at 10:36
  • Which Unity version do you use? 64 bit support of Unity is quite new, so I recommend to use unity 4.6.3 for that. – d4Rk Mar 25 '15 at 16:58
  • I upgraded unity and the error is gone! thanks! But when I build it to a simulator, it says my game does not have an architecture that iPhone 5 can execute. How do I fix that problem? – Kevin Chen Mar 26 '15 at 06:53
  • Good to hear, you got it working.. I updated my answer according to the simulator builds. – d4Rk Mar 26 '15 at 07:55