Domanda

I am trying to build an app (with ARC) that uses the facebook_ios_sdk (the latest version on github). As recommended by Facebook, I used the build script to create a static library and then added it to the project. Now when I build the project for an iPhone 5.1 Simulator, it works fine. However, on running it for an actual device (which is running 5.1), it gives the following build error -

ld: in ../facebook-ios-sdk/libfacebook_ios_sdk.a, file is universal but does not contain a(n) armv7 slice for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any suggestions on how to resolve this?

È stato utile?

Soluzione

You could modify the build script for static library (which was too complicated for me), or just skip the library approach:

  • add the Facebook sources from SDK to your project

  • if using ARC, go to "target->build phases->compile sources" and mark all the Facbook source files with the
    --fno-objc-arc flag

That's it, works for me.

Altri suggerimenti

One work around that worked was to change the Valid Architectures from"armv6 armv7" to just armv6

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top