Complie framework only for armv7? - ios

Hi i have an App that supports armv6/armv7 architecture
My Problem is i have .framework file that was only available for armv7.
My Question is: How i can set the .framework file to compile only for arm7 architecture. I will support both architectures armv6/armv7 it is no option to set the architecture only to armv7
My Error message at the moment is:
ld: file is universal (2 slices) but does not contain a(n) armv6 slice: $(PROJECT_DIR)
error: linker command failed with exit code 1 (use -v to see invocation)

Related

UIFoundation 2 slices for architecture arm64 error Xcode 7.3

I am getting following error
ld: warning: directory not found for option
'-L/Avijit/Dogra/App/EZMCOM_LATEST 5.31.56
PM/EZMCOM_LATEST/Connect/Library/iphoneos' ld: warning: ignoring file
Connect/Library/libPods.a, file was built for archive which is not the
architecture being linked (arm64): Connect/Library/libPods.a ld: in
'/System/Library/PrivateFrameworks/UIFoundation.framework/UIFoundation',
missing required architecture arm64 in file
/System/Library/PrivateFrameworks/UIFoundation.framework/UIFoundation
(2 slices) for architecture arm64 clang: error: linker command failed
with exit code 1 (use -v to see invocation)
How to fix this error?
I had the same problem and I fixed it by removing the system library UIKit.framework (for others it might be different) from build phases which was imported automatically.
Because the one I imported is an old one and i used otool to check it's linked library, it has UIFoundation.framework inside.
I didn't check what's the difference between the old UIKit and the new one but I found this corrected the problem.
I hope this will help anyone else having the same problem.

Facebook sdk is compiling on my IOS device, but no my simulator

I've downloaded the Facebook SDK, and gotten it to work on the simulator to post from my app, but it won't even compile on my device.
clang: error: no such file or directory: '/Users/justking14/Library/Developer/Xcode/DerivedData/Descover-fqkbngyllggoxkcskmhhzgmkffxe/Build/Products/Debug-iphoneos/libPluginFacebook.a'
clang: error: no such file or directory: '/Users/justking14/Library/Developer/Xcode/DerivedData/Descover-fqkbngyllggoxkcskmhhzgmkffxe/Build/Products/Debug-iphoneos/libPluginProtocol.a'
libPluginFacebook.a and libPluginProtocol.a are in red in the Link Binary with Libraries, and when I remove them it still won't compile saying
ld: file is universal (4 slices) but does not contain a(n) armv7s slice: /Users/justking14/Desktop/IR/cocos2d/plugin/plugins/facebook/proj.ios/sdk/FacebookSDK.framework/FacebookSDK file '/Users/justking14/Desktop/IR/cocos2d/plugin/plugins/facebook/proj.ios/sdk/FacebookSDK.framework/FacebookSDK' for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The FacebookSDK you use doesn't have machine code for the architecture armv7s
That architecture WAS top of the line but now, apps mostly only use armv7 and arm64
Change your app build settings to only use those architectures (just use the default)

File does not contain an armv7 slice

I cannot build and test on devices because Xcode gives me this error:
ld: file is universal (2 slices) but does not contain a(n) armv7 slice: /Users/------/Desktop/Running APP/------/-----/YACropImage.a file '/Users/------/Desktop/Running APP/------/-----/YACropImage.a' for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If you want to remove the support for any architecture, for example, ARMv7-s in your case, use menu Project -> Build Settings -> remove the architecture from "valid architectures".
You can use this as a temporary solution until the library has been updated. You have to remove the architecture from your main project, not from the library.
Alternatively, you can set the flag for your debug configuration's "Build Active Architecture Only" to Yes. Leave the release configuration's "Build Active Architecture Only" to No, just so you'll get a reminder before releasing that you ought to upgrade any third-party libraries you're using.

Can't Archive my app before release

my app has Google Maps in it and i'm Using Parse.com as well. so in the Valid Architectures in the Build Settings i have armv7 and armv7s added together. when i archive the app, i get the following error:
ld: file is universal (2 slices) but does not contain a(n) armv7s slice: /Users/MyName/Documents/Workspace/AppName/GoogleMaps.framework/GoogleMaps for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
i searched over here for solutions and i was able to eliminate it by removing armv7s from the Valid Architectures. However, when reading through the comments i learned that armv7s let's the app have full support for iphone 5. can anybody explain that? and is there a way that i can pass both armv7 and armv7s?

Xcode : Apple Mach-O linker Error

I made the app in Xcode 4.6 and tested in device. The app is made for both iPhone and iPad. When I try to archive it to make .ipa file, I get this error :
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/admin/Desktop/appName/appName/libzbar.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How to set the architecture for this in Build Settings? Or is there some different issue?
libzbar.a library needs to be built for armv7s architecture. If you cannot do that (because you don't have source code for this library) than you should remove armv7s from valid architectures.
You can change valid architectures by following steps:
select project name from the Project Navigator
select project target
open Build Settings tab
change valid architectures field

Resources