-2

when I am adding Paytm Plugin in my existing project getting Apple mach o linker error. I am really confused.I am giving the log.It's taking too much time. Please help me to get out from this situation.

Ld /Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Products/Debug-iphoneos/RedTaxi.app/RedTaxi normal arm64 cd /Users/tapashmollick/Documents/REDTAXI9THJUL2015/REDTAXIBRANCH export IPHONEOS_DEPLOYMENT_TARGET=7.1 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -L/Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Products/Debug-iphoneos -L/Users/tapashmollick/Documents/REDTAXI9THJUL2015/REDTAXIBRANCH/RedTaxi -F/Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Products/Debug-iphoneos -F/Users/tapashmollick/Documents/REDTAXI9THJUL2015/REDTAXIBRANCH/Pods/GoogleMaps/Frameworks -filelist /Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Intermediates/RedTaxi.build/Debug-iphoneos/RedTaxi.build/Objects-normal/arm64/RedTaxi.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -ObjC -lPods-RedTaxi-SDWebImage -lc++ -licucore -lz -framework AVFoundation -framework Accelerate -framework CoreBluetooth -framework CoreData -framework CoreGraphics -framework CoreLocation -framework CoreText -framework GLKit -framework GoogleMaps -framework ImageIO -framework OpenGLES -framework QuartzCore -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.1 -framework SystemConfiguration -framework MessageUI -framework MobileCoreServices -framework CoreFoundation -framework CoreData -framework CFNetwork -framework MessageUI -framework QuartzCore -framework MapKit -lPods-RedTaxi -lPaymentsSDK -Xlinker -dependency_info -Xlinker /Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Intermediates/RedTaxi.build/Debug-iphoneos/RedTaxi.build/Objects-normal/arm64/RedTaxi_dependency_info.dat -o /Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Products/Debug-iphoneos/RedTaxi.app/RedTaxi

duplicate symbol _OBJC_IVAR_$_Reachability.reachabilityRef in: /Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Intermediates/RedTaxi.build/Debug-iphoneos/RedTaxi.build/Objects-normal/arm64/Reachability.o /Users/tapashmollick/Documents/REDTAXI9THJUL2015/REDTAXIBRANCH/RedTaxi/libPaymentsSDK.a(Reachability.o) duplicate symbol _OBJC_IVAR_$_Reachability.reachableOnWWAN in: /Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Intermediates/RedTaxi.build/Debug-iphoneos/RedTaxi.build/Objects-normal/arm64/Reachability.o /Users/tapashmollick/Documents/REDTAXI9THJUL2015/REDTAXIBRANCH/RedTaxi/libPaymentsSDK.a(Reachability.o) duplicate symbol _OBJC_IVAR_$_Reachability.reachabilitySerialQueue in: /Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Intermediates/RedTaxi.build/Debug-iphoneos/RedTaxi.build/Objects-normal/arm64/Reachability.o /Users/tapashmollick/Documents/REDTAXI9THJUL2015/REDTAXIBRANCH/RedTaxi/libPaymentsSDK.a(Reachability.o) duplicate symbol _OBJC_IVAR_$_Reachability.reachableBlock in: /Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Intermediates/RedTaxi.build/Debug-iphoneos/RedTaxi.build/Objects-normal/arm64/Reachability.o /Users/tapashmollick/Documents/REDTAXI9THJUL2015/REDTAXIBRANCH/RedTaxi/libPaymentsSDK.a(Reachability.o) duplicate symbol _OBJC_IVAR_$_Reachability.unreachableBlock in: /Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Intermediates/RedTaxi.build/Debug-iphoneos/RedTaxi.build/Objects-normal/arm64/Reachability.o /Users/tapashmollick/Documents/REDTAXI9THJUL2015/REDTAXIBRANCH/RedTaxi/libPaymentsSDK.a(Reachability.o) duplicate symbol _OBJC_IVAR_$_Reachability.reachabilityObject in: /Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Intermediates/RedTaxi.build/Debug-iphoneos/RedTaxi.build/Objects-normal/arm64/Reachability.o /Users/tapashmollick/Documents/REDTAXI9THJUL2015/REDTAXIBRANCH/RedTaxi/libPaymentsSDK.a(Reachability.o) duplicate symbol _kReachabilityChangedNotification in: /Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Intermediates/RedTaxi.build/Debug-iphoneos/RedTaxi.build/Objects-normal/arm64/Reachability.o /Users/tapashmollick/Documents/REDTAXI9THJUL2015/REDTAXIBRANCH/RedTaxi/libPaymentsSDK.a(Reachability.o) duplicate symbol _OBJC_CLASS_$_Reachability in: /Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Intermediates/RedTaxi.build/Debug-iphoneos/RedTaxi.build/Objects-normal/arm64/Reachability.o /Users/tapashmollick/Documents/REDTAXI9THJUL2015/REDTAXIBRANCH/RedTaxi/libPaymentsSDK.a(Reachability.o) duplicate symbol _OBJC_METACLASS_$_Reachability in: /Users/tapashmollick/Library/Developer/Xcode/DerivedData/RedTaxi-egiibmwfjosmutglpukfjogeynqm/Build/Intermediates/RedTaxi.build/Debug-iphoneos/RedTaxi.build/Objects-normal/arm64/Reachability.o /Users/tapashmollick/Documents/REDTAXI9THJUL2015/REDTAXIBRANCH/RedTaxi/libPaymentsSDK.a(Reachability.o) ld: 9 duplicate symbols for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks in advance.

Bhavin Bhadani
  • 22,224
  • 10
  • 78
  • 108
Tapash Mollick
  • 135
  • 1
  • 11

2 Answers2

0

Try the following:

  1. Select your project file
  2. After that select the target of your project and got to the Build Settings tab.
  3. Here look for Search Paths and make sure Library Search Paths is empty.

enter image description here

Also check your imports, it could be there is something wrong, maybe you imported .m file

Mihai Fischer
  • 329
  • 2
  • 11
0

I would suggest to check the following things.

1) Remove all folders created for your app only from "Derived Data" folder.Make sure all required frameworks are imported correctly.

2) Make sure for Reachability classes you have enabled the ARC flags in builds settings.

3) Make sure deployment target and base target are selected correct.

4) Make sure library harder paths are correct.

5) Now clean the product.

6) Now rebuild and run.

I hope this help.

NewStackUser
  • 657
  • 5
  • 17