I received this error while validating my app in Xcode archives. During that time, I was very new to iOS development and I still remember, It took me around 3 hours to solve Code Signing ‘PaymentSDK.framework’ failed error. So, to avoid wasting your hours of time, please head on to the solution below.
What causing Code Signing ‘PaymentSDK.framework’ failed error?
- In my case, I was getting this issue when I tried to integrate the Paytm SDK in my iOS project. But this problem is common with all fat libraries or frameworks.
- To make payments smoothly while testing on simulators, they generally bundle a build for simulators as well.
- Xcode don’t recognise these builds. So, it fails to validate it as well.
Solved – CoreData error: Failed to call designated initializer on NSManagedObject class
Solution – PayTm SDK Code Signing Error
- Just a quick note. This solution will work for all the other libraries as well that contains builds for simulators. (x86_64) and (i386).
Please follow the below steps
- Copy PaymentsSDK.framework in your Mac’s Downloads folder.
- Open Terminal and move to the Downloads folder of your mac.
cd /Users/<Your Mac's User Name Here>/Downloads
- Run these commands to strip the x86_64 and i386 builds from your binary.
lipo -remove x86_64 PaymentSDK.framework/PaymentSDK -o PaymentSDK.framework/PaymentSDK
lipo -remove i386 PaymentSDK.framework/PaymentSDK -o PaymentSDK.framework/PaymentSDK
- That’s it. Now you have stripped out all the unnecessary builds from your binary.
- Now-Again. Copy Payments.sdk from your Downloads folder and replace it from the previous binary. Now, it will be validated successfully without any issues.
Final Words
With the above solution, you can strip any fat binary before validating it on the Xcode Archive. If you still face any issues the do comment below. I will try to solve it as soon as possible.
Leave a Reply