13

Possible Duplicate:
file is universal (3 slices) but does not contain a(n) armv7s slice error for static libraries on iOS, anyway to bypass?

Recently upgraded Xcode and my iOS devices to the latest respective versions and i'm now unable to build an app using the Facebook SDK (version 3.0.8) for a device - building on the Simulator works fine.

Error I'm receiving whilst trying to build:

file is universal (3 slices) but does not contain a(n) armv7s slice: ....FacebookSDK.framework/FacebookSDK for architecture armv7s

I've noticed that on the iOS SDK landing page (http://developers.facebook.com/ios/) they have this peice of text..

Upgrade to 3.0 SDK. We will be adding support for the much anticipated iOS 6 integration to the SDK in the coming weeks.

So.. is that it? Am i literally unable to continue to work for potentially weeks until they support iOS6?

I'm hoping there is a quick fix for this, surely I can't be the only one in this situation.

Thanks for any help you can offer.

Community
  • 1
  • 1
user1168056
  • 401
  • 8
  • 19
  • http://stackoverflow.com/questions/12402092/file-is-universal-3-slices-but-does-not-contain-an-armv7s-slice-error-for-st – Shmidt Sep 20 '12 at 13:07
  • Already looked at that and none of those suggestions work. Besides, won't it fail to upload when it comes to submitting the app to the App Store? – user1168056 Sep 20 '12 at 13:20
  • this solution works for me, hope it helps: [file is universal (3 slices) but does not contain a(n) armv7s slice error for static libraries on iOS, anyway to bypass?][1] [1]: http://stackoverflow.com/a/12402966/1210822 – sonoshin Sep 22 '12 at 19:31
  • you need to update your facebook SDK to 3.1.1 – Mehdi Oct 18 '12 at 17:39

2 Answers2

15

For a temporary fix you can do what Sudhakar said, but the app won't run on an iPhone 5, (or atleast with my tests it didn't). You really need a properly compiled SDK.

The current Facebook SDK is build for armv6. I hear they are working on getting a new version out asap that is build for armv7.

In the meantime you can clone down the facebook SDK from github and compile the SDK to work with armv7 yourself. Below are the instructions:

  1. Download or clone a copy of the source code from the git hub page (https://github.com/facebook/facebook-ios-sdk)
  2. Open up the xcode project and in the build settings change the architecture to armv7.
  3. Save and close
  4. Navigate to /scripts and in terminal run build_all.sh

This will then compile the source and output builds/FacebookSDK.framework To get this to work I had to clone the git repository to /Desktop/iOS I replaced the FacebookSDK.framework that was within my app with the newly created version and it worked like a charm.

good luck!

KevinM
  • 1,799
  • 4
  • 28
  • 58
  • 1
    Great answer, im a big fan :) – Jef Sep 26 '12 at 13:47
  • 1
    Not compiling for armv7s should not mean the app can't run on iPhone 5 - if that were the case, then old apps built with Xcode versions prior to 4.5 (i.e. most of the apps currently on the App Store) wouldn't be able to run on iPhone 5 either, and you can easily verify that they indeed can. iPhone 5 is obviously backward compatible with armv7 - compiling for armv7s just allows for additional compile optimizations that were not available in armv7. – Martin Gjaldbaek Oct 02 '12 at 10:59
8

Click the your are Xcode Project -> in Architures tab -> valid Architures -> keep armv7 only and remove armv7s. In my case it working fine, this is only temparary solution.

Sudhakar
  • 1,517
  • 1
  • 10
  • 22
  • Yes, that's all i can find at the moment.. temporary solutions. I'm certain these temporary fixes will fail App Store submission.. we'll soon find out i guess. – user1168056 Sep 20 '12 at 14:38