razorpay / razorpay-pod

:iphone: CocoaPod implementation of Razorpay's Payment SDK. Refer for instructions:
https://docs.razorpay.com/v1/page/ios-integration
MIT License
21 stars 18 forks source link

LLVM Instrumentation creating issue in app submission, getting Binary Invalid. #184

Open htrilasoft opened 1 year ago

htrilasoft commented 1 year ago

Razorpay pod Version :

1.3

Xcode Version :

Version 13.0 (13A233)

iOS Deployment Target :

13.0

What you did:

Using capacitor-razorpay in an ionic capacitor project with Capacitor 4

What happened:

On App submission of testflight, getting the error below

ITMS-90562: Invalid Bundle - The app submission can not be successfully recompiled from bitcode due to missing symbols during linking. You can try to reproduce and diagnose such issues locally by following the instructions from: https://developer.apple.com/library/archive/technotes/tn2432/_index.html

ITMS-90562: Invalid Bundle - Disallowed LLVM instrumentation. Do not submit apps with LLVM profiling instrumentation or coverage collection enabled. Turn off LLVM profiling or code coverage, rebuild your app and resubmit the app.

The technical documentation provided by Apple suggests checking which Framework binary inside the archive has GCC or LLVM instrumentation, and only Razorpay.framework/Razorpay has LLVM instrumentation sectname llvm_prf_cnts sectname llvm_prf_data sectname llvm_prf_names sectname llvm_prf_vnds

The suggested solution by Apple and by others have been tried across the Project, Target, and Pods to set CLANG_ENABLE_CODE_COVERAGE = No SKIP_INSTALL = NO BUILD_LIBRARY_FOR_DISTRIBUTION = YES

Yet to no avail, the Razorpay.framework/Razorpay binary still has LLVM instrumentation and the archive submission is still getting rejected

Steps To Reproduce

To Reproduce the issue just start a new ionic capacitor project and add capacitor-razorpay

  1. install node
  2. npm i -g @angular/cli @ionic/cli @capacitor/cli
  3. ionic start new-project-name (follow through the wizard / choose options in terminal, choose to add capacitor to project)
  4. cd new-project-name
  5. npm i -S https://github.com/razorpay/razorpay-capacitor.git
  6. ng build
  7. npx cap add ios
  8. npx cap sync
  9. npx cap open ios (this will open the xcode project)
  10. Product->Archive
  11. Right click on the latest archive->Show in Finder
  12. Right click on the archive->Show Package Contents
  13. Right click Products/Applications/->Show Package Contents
  14. Open Terminal here and run
  15. otool -l -arch all Frameworks/Razorpay.framework/Razorpay | grep __llvm_prf

Suggested solution:

CLANG_ENABLE_CODE_COVERAGE = No seems to be what needs to be done, but it isn't taking effect for me, maybe because it is a dependency in the podspec file https://github.com/applivery/applivery-ios-sdk/issues/7 Here someone has fixed the same issue by removing codeCoverageEnabled = "YES" as can be seen in comparing the fixed branch https://github.com/applivery/applivery-ios-sdk/compare/v2.5...v2.5.1

Useful Links to understand the issue

ramprasadAnand commented 1 year ago

@htrilasoft apologise for the delay in responding to your query. Please update to our latest release version 1.3.1 to resolve this issue.