0

I got this error when trying to build via command line:

ld: file is universal (4 slices) but does not contain a(n) armv7s slice: /Users/../Framework/Realm.framework/Realm file '/Users/../Framework/Realm.framework/Realm' for architecture armv7s

Here is the command line code:

xcodebuild -scheme $SCHEME ONLY_ACTIVE_ARCH=NO ARCHS="armv7 armv7s x86_64" PROVISIONING_PROFILE=$provi PRODUCT_NAME=$AP_NAME ASSETCATALOG_COMPILER_APPICON_NAME=$AppIcon archive -archivePath ../build/$AP_NAME.xcarchive

I am using version 0.87.

Update

Realm actually doesn't support armv7s. (In my case, Realm version 0.87).

lipo Realm -info
Architectures in the fat file: Realm are: i386 x86_64 armv7 arm64

Please fix this issues Realm team!!!

Michael Alan Huff
  • 3,462
  • 3
  • 28
  • 44
sahara108
  • 2,829
  • 1
  • 22
  • 41
  • Most likely not. armv7s was pulled from the list of standard architectures recently. – borrrden Nov 10 '14 at 05:00
  • Yes, I think so. But the error gives me that Realm doesn't support. Can you please check it? – sahara108 Nov 10 '14 at 05:19
  • How should I check it? I don'T work for Realm... The real question is why do you need armv7s? There is only 1 device that I know of that uses it, and it can also run armv7. – borrrden Nov 10 '14 at 05:46
  • We need support any phone that runs iOS 8. And from this link http://stackoverflow.com/questions/6517822/do-i-need-to-add-armv6-support-when-limiting-apps-to-ios-4-0 , we need armv7s. – sahara108 Nov 10 '14 at 06:36
  • Any armv7s can run armv7 code...so you don't technically need it. [This answer](http://stackoverflow.com/a/25398898/1155387) is relevant to the discussion. – borrrden Nov 10 '14 at 06:44
  • So I only need support armv7 and arm64, don't I? – sahara108 Nov 10 '14 at 06:52

1 Answers1

3

As borrrden has indicated in his comments to the question, armv7s isn't actually required to run on any device (iPhone 5, iPhone 5c & iPad 4 were the first devices to support it, but can also run armv7 binaries) and the armv7 instruction set only has minor differences compared to armv7 which don't justify the increase in file size.

If you require specific armv7s support, feel free to build Realm from source. The cocoa binding is entirely open-source. You can also do this very easily using CocoaPods (see this SO answer).

Community
  • 1
  • 1
jpsim
  • 14,329
  • 6
  • 51
  • 68