3

Following linker error with duplicate symbol showing while integrating Paytm library for iOS. Here is few line of error :

duplicate symbol _OBJCIVAR$_Reachability.reachabilityRef in : Library/Paytm/libPaymentsSDK.a(Reachability.o) ld: 9 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Please help me out to fix this issue .

*Note 1 - When i wrote to discussion forum i got reply :

"issue is your Reachability class has same name as of paytm Reachability class so simply solution is to change the name of your Reachability class "

but the problem is to change the reachability class name in the entire project is not a feasible solution .

*Note 2 :-

Using Xcode7.2 along with Mac OSX 10.11.2 (Objective C - Language )

*Note 3 :-

in Paytm library there is a header file having name : PaymentsSDK.h which have

//Reusable Class Redefines to avoid name clashes
//#define Reachability PGReachability

when i uncomment above line .. still it is giving error ??

Any help will be greatly appreciated. Thanks.

Shobhakar Tiwari
  • 7,862
  • 4
  • 36
  • 71

3 Answers3

2

Use the latest version of the PG SDK library from Paytm. They have fixed the problem. Recently few merchants had reported that issue. So they have fixed it by renaming that class so that it does not clash with yours.

Pradeep K
  • 3,671
  • 1
  • 11
  • 15
  • need to use Paytm library not PG SDK – Shobhakar Tiwari Feb 02 '16 at 07:30
  • well , the latest version m using is 2.1 from here i downloaded https://github.com/Paytm-Payments/Paytm_iOS_App_Kit. Please suggest me url to download the lastest one . version 2.1 is pushed 18 days ago . i guess . – Shobhakar Tiwari Feb 02 '16 at 07:47
  • I also tried to uncomment to //Reusable Class Redefines to avoid name clashes #define Reachability PGReachability this in paytm lib . – Shobhakar Tiwari Feb 02 '16 at 07:59
  • If you are a registered merchant with Paytm payments then you should contact the Paytm contact point to get the latest SDK. The latest release is 2.7. I am not sure why they have posted the old version to github – Pradeep K Feb 02 '16 at 08:30
  • well dint get sdk2.7 so used alternative way to solve this problem by simply following : Compile source - simply remove Reachability.m file . (Dint remove from the project only from compile source ) and it did the work . It may help others too. – Shobhakar Tiwari Feb 11 '16 at 06:12
  • could you please join this group http://chat.stackoverflow.com/rooms/15038/ios-developer-family – Shobhakar Tiwari Feb 18 '16 at 13:42
0

Remove the Reachability Class .m file from your Project and Run. This will work.

Go to Project Settings -> Build Phases -> Compile Sources -> Select Reachability.m -> Delete it.

This won't delete the file from the system, only from the compilation. The header will be used and the implementation won't be duplicated.

(Also You can remove the file from Paytm SDK thourgh terminal.)

Nitin
  • 19
  • 2
-1

SOLVED..!!!

I have deleted my own "Reachability" class and used "SCNetworkReachability". And modified all my old reachability methods with the new class.

https://cocoapods.org/pods/SCNetworkReachability

Suhas Arvind Patil
  • 1,732
  • 1
  • 19
  • 31