iOS - file does not contain an armv7s slice - ios

I cannot build and test on devices because Xcode gives me this error:
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /.../Classes/AddThis/libAddThis.a for architecture armv7s
How do I update this library to support armv7s?

Try setting the Build Active Architecture Only to 'YES' in the Project Build settings.

libAddThis.a needs to be built for the armv7s architecture. If you don't have control over this then you will need to remove armv7s from valid architectures as you did.

I did this by changing valid architecture from build setting.
I am attaching a screenshot for your help.
Thanks,
Cp

Add armv7s to the Valid Architectures setting in the Build Settings for the library's project/target.

Related

VALID_ARCHS = arm64 armv7 armv7s not generating any armv7s

I'm having a question about the compilation on iOS. I'm generating a framework and it used to generate arm64, armv7 and armv7s (+ simulators with lipo and fun).
The thing is, armv7s is not present in the binary anymore.
Architectures in the fat file are: i386 x86_64 armv7 arm64
But I clearly asks in my XCConfig for VALID_ARCHS = arm64 armv7 armv7s. I verified that the XCConfig was indeed used and not overridden.
I tried various google search but most of the time we find people not understanding why their app is not compiling with the wrong version of the lib.
So now, I'm coming here, the last chance to understand why no armv7s lib is being created for my framework. Maybe it's as simple as "it's not possible anymore".
XCode has dropped support for armv7s since XCode 6 I think, the ${ARCHS_STANDARD} now only include armv7, arm64 and simulator will include i386, x86_64, so your fat static library/framework will only include them.
To support armv7s, add it under ${ARCHS_STANDARD} in Architectures field and build again.

missing required architecture x86_64 in ...libMumbleKit.a (3 slices)

I am trying to include MumbleKit as a library instead of having to compile it each time by following the suggestion of a member of this forum. Yet when I try to compile on the simulator I get:
missing required architecture x86_64 in …libMumbleKit.a (3 slices)
I think I added all the necessary versions to MumbleKit before generating the library:
arm64 armv7 armv7s armv7k arm7s x86_64 i386
notwithstanding, when I execute:
lipo -info libMumbleKit.a
I get:
Architectures in the fat file: libMumbleKit.a are: armv7 armv7s arm64
as well as configuring Build Active Architecture to NO.
I generated the library for MumbleKit both using the Generic iOS device and a iOS 9 physical device.
When I try to archive using the Generic iOS Device option after having extracted the Mumble library in the same way, I instead get error:
ld: bitcode bundle could not be generated because
'/Users/fbartolom/Documents/cocoa
applications/inArrivoHD/MumbleKit/libMumbleKit.a(CryptState.o)' was
built without full bitcode. All object files and libraries for bitcode
must be generated from Xcode Archive or Install build for architecture
armv7
Same when using my physical device after also generating the library in the correspondent way:
ld: bitcode bundle could not be generated because
'/Users/fbartolom/Documents/cocoa
applications/inArrivoHD/MumbleKit/libMumbleKit.a(CryptState.o)' was
built without full bitcode. All object files and libraries for bitcode
must be generated from Xcode Archive or Install build for architecture
arm64
And finally the installation on my iOS 9 iPhone 6S went fine with just the same contents in the warning:
ld: bitcode bundle could not be generated because
'/Users/fbartolom/Documents/cocoa
applications/inArrivoHD/MumbleKit/libMumbleKit.a(CryptState.o)' was
built without full bitcode. All object files and libraries for bitcode
must be generated from Xcode Archive or Install build for architecture
arm64
CryptState.cpp if a c++ file in the library.
Check architectures it has with lipo tool. Open terminal, navigate to folder where your library is and do:
lipo -info yourlib.a
If you don't have x86_64, than you should find/compile lib that will have it.
x86_64 is an architecture for Simulator, not for generic iOS device.
I applied the suggestion at:
Xcode 7 'CrashReporter does not contain bitcode' linker error
by adding option -fembed-bitcode to the other linker flags field. And now the problem has moved to a c file: band.c, notwithstanding of course I have added this option for the c and c++ files.
ld: bitcode bundle could not be generated because
'/Users/fbartolom/Documents/cocoa
applications/inArrivoHD/MumbleKit/libMumbleKit.a(bands.o)' was built
without full bitcode. All object files and libraries for bitcode must
be generated from Xcode Archive or Install build for architecture
arm64
What might be still missing?
I aborted the attempt. There must be something faulty in the original mumble kit project not allowing to import its library into another project, or I do not know how to do it anyway.

missing required architecture x86_64 in file

When linking an iOS app I have the following issue:
(null): Ignoring file /Users/…../my_Lib.a, missing required
architecture x86_64 in file /Users/…/my_Lib.a (2 slices)
Seeing the message it seems like there is an issue with my_Lib.a.
After reading about similar problems on the net, I haven’t found any working solution at this point.
One detail I want to add is that I have a second project using this exact same library (my_Lib.a), which is perfectly working.
So there is nothing wrong with the library itself, only some settings are not right, probably inside the project.
Further more looking at the architecture settings on the two projects, they look pretty much the same.
When running lipo -info I get the following:
$ lipo -info my_Lib.a
Architectures in the fat file: my_Lib.a are: armv7 arm64
So what can I be doing wrong?
Please make the project settings as follows:
Architectures: Standard architectures (armv7, arm64)
and
Valid architectures: arm64 armv7s armv7

file is universal (3 slices) but does not contain a(n) armv7s slice

I'm getting following error while running in iOS6.1 with xcode 4.5. Also i removed armv7s from the project (target) "Build Settings" / "Valid Architectures" and set Set the "Build Active Architecture Only" setting to YES. I have this file inside www folder phonegap-1.3.0.js. But why i'm getting below error:
file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/PhoneGap for architecture armv7s
I guess you are using some third party library. The error reminds you to update your third party lib,which is xxx.a file in your project. If the lib is open source, putting the code in your project is strongly suggested.

file was built for archive which is not the architecture being linked (armv7s)

I'm using the new OData4ObjC framework for IOS 6, but when I try to run it keeps telling me this error.
I have followed the instructions found here https://github.com/ElizabethDuncan/OData4ObjC.
I also changed the framework to an older one to see if that is the problem. I don't know if I'm missing something.
In the future, to check what architectures a library/executable is compiled for you should use the lipo -info command. Like so:
mitchellge$ lipo -info /Users/mitchellge/Downloads/libMSODataLib.a
--> Architectures in the fat file:
/Users/mitchellge/Downloads/libMSODataLib.a are: armv6 armv7
As you can see, the library (libMSODataLib.a) that is bundled with OData4ObjC is compiled for the armv6 and armv7 architectures and not the armv7s. One fix is to go into your project's build settings and change Valid Architectures from armv7 armv7s to just armv7

Resources