UIFoundation 2 slices for architecture arm64 error Xcode 7.3 - ios

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.

Related

custom framework giving error when included file was built for x86_64 which is not the architecture being linked

I have a custom framework that I created named CCServices. When I try to implement it into my project, Setec, I get the following warnings.
ld: warning: ignoring file /Users/lindsey.vastola/Desktop/Setec/iOS/Setec/Setec/Frameworks/CCServices.framework/CCServices, file was built for x86_64 which is not the architecture being linked (arm64): /Users/lindsey.vastola/Desktop/Setec/iOS/Setec/Setec/Frameworks/CCServices.framework/CCServices
ld: warning: ignoring file /Users/lindsey.vastola/Desktop/Setec/iOS/Setec/Setec/Frameworks/CCSocket.framework/CCSocket, missing required architecture arm64 in file /Users/lindsey.vastola/Desktop/Setec/iOS/Setec/Setec/Frameworks/CCSocket.framework/CCSocket (2 slices)
Then I get the following errors when I reference some controllers in the framework.
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_Conversation", referenced from:
type metadata accessor for __ObjC.Conversation in CaptionsViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How do I get rid of these? I have tried different solutions but nothing worked. Please note that CCSocket is written in Objective C and Setec is in Swift.
the framework was missing in the link binary with libraries list.

IMFPush Bluemix not working on Swift 2.2 (i386 error)

Anyone knows how to solve this error? I can't compile my project with IMFPush library =/
ld: warning: ignoring file /Users/kersul/Develop/Grabit_iOS/Pods/IMFPush/Frameworks/IMFPush.framework/IMFPush,
missing required architecture i386 in file
/Users/kersul/Develop/Grabit_iOS/Pods/IMFPush/Frameworks/IMFPush.framework/IMFPush
(2 slices) Undefined symbols for architecture i386:
"_OBJC_CLASS_$_IMFPushClient", referenced from:
type metadata accessor for __ObjC.IMFPushClient in AppDelegate.o ld: symbol(s) not found for architecture i386 clang:
error: linker command failed with exit code 1 (use -v to see
invocation)
There are a few questions around that seem to tackle this issue.
I would first take a look at Jordan's advice here
and ensure that the framework was added to your project correctly. Additionally ensure that the framework has been linked correctly
If neither fixes the issue then also see the answer posed by Allen and check to see if your .m file is listed under your compile sources.
That said, i386 architecture is what is used by the iOS Simulator. Do be aware that the Simulator cannot replicate push functionality, so even if you are able to compile IMFPush for it, it will not function correctly.

Linker Errors Facebook Parse

I added PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(launchOptions!) and I got the 9 linking errors that I feel like many people have gotten before.
First time working with Facebook in an app and I added every framework, the header, and filled in the info.plist
I had to unwrap launchOptions so can someone help me out on how to get rid of these Mach-O Linker errors.
Updated with error log
ld: warning: directory not found for option '-F(1)'
ld: warning: Auto-Linking supplied '/Users/fabricemulumba/Documents/FacebookSDK/FBSDKShareKit.framework/FBSDKShareKit', framework linker option at /Users/fabricemulumba/Documents/FacebookSDK/FBSDKShareKit.framework/FBSDKShareKit is not a dylib
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_PFFacebookUtils", referenced from:
__TMaCSo15PFFacebookUtils in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Maybe you are using the old version of the Facebook's framework? I've just checked the library out that it does not have
ParseFacebookUtils(PFFacebookTokenCachingStrategy.o) class.
To check that you could use
otool -L ParseFacebookUtilsV4.framework/ParseFacebookUtilsV4 -arch arm64
or
otool -L libParseFacebookUtilsV4Lib.a -arch arm64
the output will be like this
libParseFacebookUtilsV4Lib.a(PFFacebookUtils.o):
libParseFacebookUtilsV4Lib.a(PFFacebookAuthenticationProvider.o):
and I've checked out all dependencies libraries they also dont have any FBRequest and FBSession classes.
Try to use newest versions of sdk or link dependencies by CocoaPods.

CocoaPods not linking with the project

I have a project that uses CocoaPods. It was working but something got broken.
It does compile if I target the simulator, but If I target the devise (Build or Archive) it throws a linker error.
ld: warning: ignoring file /Users/myuser/ios/share/share/libPods.a, file was built for archive which is not the architecture being linked (armv7s): /Users/myuser/ios/share/share/libPods.a
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_AFHTTPRequestOperationManager", referenced from:
objc-class-ref in BackendProxy.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I really need some help because I am really stucked.
Thanks!
EDIT: i deleted that libPods.a, that was an old one, and now it's giving me:
ld: library not found for -lPods
But only on Archive or Build for iosDevice, this is still working on the simulator.
Try removing armv7s from valid architectures section.
Build Settings -> Architectures -> Valid Architectures

Crash when using lib file in proj

I have followed this tutorial LINK
but i get a linker error when i added the lib and its .h to the project.
i searched google and i found that -ObjC and -all_load should be addd in setting i did it but the error couldn't be solved.The error is as follows:
ld: warning: ignoring file /Users/techvedika/Desktop/RND/MathTest/MathTest/iCodeBlogsMathLibrary/libICodeMathUtils.a, missing required architecture i386 in file /Users/techvedika/Desktop/RND/MathTest/MathTest/iCodeBlogsMathLibrary/libICodeMathUtils.a (3 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MathFunctions", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
how do i solve this?
Can you please check lipo -info libICodeMathUtils.a on terminal. If it is not listing architecture i386 that means your library is not build for simulator. And it will not work on simulator
obviously, this is not a crash , it's just a link error, your project lack of i386 version libICodeMathUtils.a, so you should first add libICodeMathUtils.a to your project.
The MathFunctions class is missing. Either from your application project or from the SimpleLibrary.a that you use. Make sure it is part of the compilation and linking steps of your build.

Resources