Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 7.1 gives error after updating to Xcode 5.1

I have updated my Xcode to version 5.1 recently. After update, it runs fine with all simulators except iOS 7.1, in which it gives a mach-O link error. Moreover, there is only a 64-bit architecture option in 'Build setting' tab. According to me, it is the cause of all the problems & errors. Does anybody know reason for this & how to solve it?

Here are some warnings & errors I've got:

Warning :

Values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead

Error:

Symbol(s) not found for architecture x86_64

Thanks.

like image 415
demonofthemist Avatar asked Mar 13 '14 07:03

demonofthemist


2 Answers

Xcode 5.1 changed the standard project settings. Among others it now includes the arm64 architecture for the project - but a lot of 3rd party projects don't support that yet, so I recommend to remove it from the architectures settings again (leaving you with armv7 and armv7s). Keep it in the valid architectures setting, though - this specifies on which architectures it may run.

It also introduced the default activation of some extra warnings, like the typecast to long warning - same counts here, when you use quite some other libraries (as source code) you might get lots of warnings you can't (or don't want to) do much about. You can disable the warnings again for those projects, or choose not to update your project settings right away.

like image 70
TheEye Avatar answered Oct 05 '22 03:10

TheEye


Got to Build Settings -> Architectures

You probably have Standard Architectures set, right?

As of Xcode 5.1 Standard Architectures includes arm64, which you are not ready to support.

Select Other.. doubleclick $(ARCHS_STANDARD) and change it to $(ARCHS_STANDARD_32_BIT)

Note: This is a temporary fix. You are probably using some static library that didn't come with a 64-bit slice. See if there is one available and then switch Architecture back to Standard Architectures.

like image 34
Andrew Soltan Avatar answered Oct 05 '22 03:10

Andrew Soltan