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.

4

3 回答 3

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.

于 2016-02-02T07:09:26.570 回答
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.)

于 2016-02-02T06:58:54.923 回答
-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

于 2018-02-22T17:08:16.297 回答