Search code examples
iosobjective-cxcode7paytm

Paytm library 2.1 integration with iOS Linker Error?


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.


Solution

  • 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.