4
votes

I am implementing PayTm PayTm payment gateway into my app. On simulator it works fine but when i tried to install it on device it shows error. I am sharing error details please suggest some solution

warning: ignoring file /Users/..../libPaymentsSDK.a, missing required architecture arm64 in file /Users/..../libPaymentsSDK.a (2 slices)

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_PGTransactionViewController", referenced from: objc-class-ref in SubscribeMagzineVC.o "_OBJC_CLASS_$_PGOrder", referenced from: objc-class-ref in SubscribeMagzineVC.o "_OBJC_CLASS_$_PGMerchantConfiguration", referenced from: objc-class-ref in SubscribeMagzineVC.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

enter image description here

Architectures in the fat file: /Users/.../libPaymentsSDK.a are: armv7 i386 x86_64 arm64

enter image description here

1
1. can you share screen shot linked libraries? 2. Have you enabled bitcode?Arasuvel
check updated ques. where to enable bitcode?Abhinandan Pratap
You can find it under Build Settings-> Build Options -> Enable BitcodeArasuvel
yes i enable but not workingAbhinandan Pratap
Disable bitcode and try it.Arasuvel

1 Answers

4
votes

Seems like libPaymentsSDK.a has 2 slices and my guess they're i386 and x86_64, arm64 is probably not one of them, first you can check which slices are there by running

xcrun -sdk iphoneos lipo -info libPaymentsSDK.a

You basically need to rebuild libPaymentsSDK with arm64 support too.

The best way I would recommend is to integrated it with Cocoapods into your projects, then everything will build properly, if you don't want to do that, simply rebuild the libPaymentsSDK yourself but make sure arm64 is present.

An easier way is to just use the provided one from the SDK found here simply download and replace your old one with that file

To use the lipo command you simply need to open terminal.app and then find the exact location of the libPaymentSDK.a file, you can do that by going into xcode, selecting the file from the left pane, then on the right pane you will see the file details in the file inspector, just copy it's path, it'll be something like:

/Users/myUsername/Projects/exampleAPP/myAppLibs/libPaymentSDK.a

Then you simply add that path to the end of the command to be:

xcrun -sdk iphoneos lipo -info /Users/myUsername/Projects/exampleAPP/myAppLibs/libPaymentSDK.a

Hope this solves your issue, good luck!