linker command failed: duplicate symbol for architecture arm64 - ios

I am having this error while running my project. I referred so many answers and did the same but can't resolve this issue.
duplicate symbol _kReachabilityChangedNotification in:
/Users/admin/Downloads/workRepo/SafetraxApp/MAppIOS/build2/Safetrax/Build/Intermediates/Safetrax.build/Debug-iphoneos/Parent App.build/Objects-normal/arm64/Reachability.o
Pods/catapush-ios-sdk-pod/CatapushKit/libCatapushLib.a(CLIntReachability.o)
ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I assume you are using the Reachability snippet from Apple. Unfortunately, that piece of code and the accompanying constants are being used in several Cocoapods. That's what causes this error. It basically means that the symbol/constant kReachabilityChangedNotification has been defined twice in your binary: once in your Application and once in the CatapushKit pod.
The easiest way to fix is: Rename the constant in your code. The other option would be to delete the Reachbility code from your app and use the CLIntReachability implementation from CatapushKit.

Related

Adding Pollfish And PrintIO in One app having duplicate issue

In My App we need to add Following SDKs:
Pollfish
PrintIO
But I face a following
duplicate symbol _VERSION in:
/MyAppPath/Library/PrintIO/PrintIO.framework/PrintIO(BTEncryption.o)
/MyAppPath/pollfish.framework/pollfish ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Both are frameworks.
If I remove one framework then My app works fine. But I need to add both things.

Vendor Framework A is containing the same Framework B than the Project Pods

Ok, so, I have some issues between MBProgressHUD (Pod) and (Scandit) (Vendor Framework).
In fact I was using MBProgressHUB from Pods before and it was working really well.
But after installing Scandit, I have the following error message :
ld: warning: directory not found for option '-FApp'
duplicate symbol _OBJC_CLASS_$_MBBarProgressView in:
/Users/nickName/Library/Developer/Xcode/DerivedData/appName-gqhyrdejqjmsbfgnidtyhwodtfnp/Build/Products/Debug-iphonesimulator/libMBProgressHUD.a(MBProgressHUD.o)
/Users/nickName/Projects/Git/appDirectory/ScanditBarcodeScanner.framework/ScanditBarcodeScanner(SCMBProgressHUD.o)
... 10 times ...
duplicate symbol _OBJC_IVAR_$_MBRoundProgressView._annular in:
/Users/nickName/Library/Developer/Xcode/DerivedData/appName-gqhyrdejqjmsbfgnidtyhwodtfnp/Build/Products/Debug-iphonesimulator/libMBProgressHUD.a(MBProgressHUD.o)
/Users/nickName/Projects/Git/appDirectory/ScanditBarcodeScanner.framework/ScanditBarcodeScanner(SCMBProgressHUD.o)
ld: 12 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The deduction is pretty simple; Scandit is using MBProgressHUD too... The problem is; I need to use MBProgressHUD on my project but I can't use it with Pods (conflict).
There is a way to use the MBProgress Framework contained by Scandit or can I use a trick to handle the error ?
Any answer will be very appreciate.

Apple Mach-O Linker Error - duplicate symbols for architecture x86_64

I have tried all the answers available on stackoverflow but nothing seems to be working.
I get the following error whenever i create a (TCRecord)subclass of MMRecord.
Error:
duplicate symbol _MMRecordErrorDomain in:
/Users/mavericks/Library/Developer/Xcode/DerivedData/Beered-efrmoegppszsqtbcbtfrytgkdlyy/Build/Intermediates/Beered.build/Debug-iphonesimulator/Beered.build/Objects-normal/x86_64/TCRecord.o
/Users/mavericks/Library/Developer/Xcode/DerivedData/Beered-efrmoegppszsqtbcbtfrytgkdlyy/Build/Products/Debug-iphonesimulator/libPods-MMRecord.a(MMRecord.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Things i have already tried:
Tried removing the -ObjC in other linker flags
I have already checked the directory for any duplicate files
Under Compile sources there is no duplication of implementation files.
Third party library i am using :
MMRecord
https://github.com/mutualmobile/MMRecord
For now, in your project settings, search for "gcc_no" and set the flag to NO until we get the issue fixed. That should allow you to build your project.
Try deleting extra frameworks that have no use.

DocuSign iOS SDK - remove CMPopTipView from dependency

Both My project and DocuSign project are using CMPopTipView open source code. Due that I facing following error during runtime.
Build/Products/Debug-iphoneos/libPods-CMPopTipView.a(CMPopTipView.o)
duplicate symbol _OBJC_METACLASS_$_CMPopTipView in:
/Users/Mani/Library/Developer/Xcode/DerivedData/myApp-cwzhebmptltodqbylbytaqjfetaa/Build/Intermediates/myApp.build/Debug-iphoneos/myApp.build/Objects-normal/arm64/CMPopTipView.o
/Users/Mani/Library/Developer/Xcode/DerivedData/myApp-cwzhebmptltodqbylbytaqjfetaa/Build/Products/Debug-iphoneos/libPods-CMPopTipView.a(CMPopTipView.o)
ld: 34 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is there a way to remove dependency of DocuSignSDK for CMPopTipView and set it to use one present in my code base? if yes how?
Thanks,
Mani

duplicate symbols when using same third party library

I created a static library which uses AFNetworking in key role to comunicate with backend.While testing, everything works great but when I tried to use AFNetworking on the test application by importing it again, I'm getting bunch of duplicate symbols errors
duplicate symbol _OBJC_CLASS_$_AFURLSessionManager in:
(AFURLSessionManager.o)
i386/AFURLSessionManager.o
duplicate symbol _OBJC_METACLASS_$_AFURLSessionManager in:
(AFURLSessionManager.o)
i386/AFURLSessionManager.o
ld: 205 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
i tried to -force_load option to force_load the library by adding
force_load $(SOURCE_ROOT)/testLib.a
in the other linker flags instead of -ObjC but It didn't help me either.
What do i need to do in order to use it without any hacky stuff?
I found this solution here
http://atastypixel.com/blog/avoiding-duplicate-symbol-issues-when-using-common-utilities-within-a-static-library/
but It's really not practical,

Resources