Unsupported architecture issues in IPA/Archive (XCODE)
lordkiz opened this issue · 6 comments
Adding Paystack.framework to embedded libraries in xCode works well in debug and even release, but after archiving it is almost impossible for the app.ipa file to pass validation tests or upload to itunes-connect because paystack-ios supports arch x86_64 (necessary for simulator), linker issues etc.
Using this script to extract archs needed for production only does not seem to solve the problem.
The solution appears to be: removing Paystack.framework from embedded libraries when building for release. Not adding Paystack.framework to embedded libraries does not seem to affect anything. Release builds will still have paystack & RNPaystack functioning normally. And you can upload to app store without issues.
Hope this helps someone.
Hi Kizito, thanks for pointing that out. I think I can do one even better, I am leaning towards a CocoaPods flow - it is by far the easiest, if the pods are always up-to-date. The reason I added the embedded binaries bit was the Image not found
crashes I kept running into. What do you think of CocoaPods though?
Absolutely wonderful. I initially built my project and then later migrated to using cocoapods after encountering so many issues trying to get paystack play nicely with other packages. So many of the additional steps required for this library in ios might not be needed if using cocoapods.
I should add that the solution I proposed above applies to projects using cocoapods.
Ok, so if you are down for yet another update, I am wiring up CocoaPods as we speak! Cheers!
Hi, would have asked you to test the CocoaPods flow but you were ahead of us already!
Will gladly test it.
Image not found
error seems to only throw if you are trying to run your app on a simulator without Paystack.framework
in embedded libraries. This is probably because simulators need the arch x86_64
. App, however, will run fine on a physical device for both debug and release with or without adding Paystack.framework
to embedded libraries. But having Paystack.framework
in embedded libraries will prevent your app from passing app store validation tests because you cant support arch x86_64
on apps for distribution.
Using cocoapods
does not seem to change this behaviour, although it makes it way easier if you are using other libraries too - less conflicts.
You can use this script to strip off unwanted architectures. The script will essentially remove paystack.framework
from embedded libraries in the build for production. This might have side effects on other libraries in your project especially when you want to run a debug build.
The easiest and trackable option remains to manually remove paystack.framework
from embedded libraries when building for release or archiving.