razorpay / react-native-razorpay

React Native wrapper for Razorpay's mobile SDKs
https://www.npmjs.com/package/react-native-razorpay
MIT License
124 stars 107 forks source link

react-native-customui is not working in ios #317

Closed mprem1204 closed 3 years ago

mprem1204 commented 3 years ago

Hey @mprem1204, Can you try without cocoa pods? As we don't have any cocoa pods available for custom UI.

Hii Sachin Nautiyal. i tried installing the the react-native-customui without cocoapods 1) I installed react-native-customui with npm npm install react-native-customui 2) Right click on Libraries and added the Razorpay.xcodeproj from node_modules/react-native-customui/ios img1

3)Added the libRazorpay.a to Build Phases ➜ Link Binary With Libraries img2

and this is how Frameworks, Libraries , and Embedded content in general section looks like after the second step

img3

4)Clicked the Razorpay.xcodeproj that i added before in the Project Navigator and navigated to the Build Settings tab. In the Documentation you told to add these 2 in the Header Search path $(SRCROOT)/../react-native/React $(SRCROOT)/../../React. along with this too also added this line as well $(SRCROOT)/../../node_modules/react-native-customui/ios this is how the header search path looks like(in Razorpay.xcodeproj)

img4

But after i tried to build as the build failed with the follofwing error

ld: warning: Could not find or use auto-linked framework 'Razorpay'
Undefined symbols for architecture x86_64:
  "OBJC_CLASS$__TtC8Razorpay8Razorpay", referenced from:
      objc-class-ref in libRazorpay.a(RazorpayCustomui.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

img5

Please help me now it has been 2 weeks i got stuck with this error Thank you.

Nautiyalsachin commented 3 years ago

Hey @mprem1204 Asking you for a sample app as the implementation looks correct. Please create a zip of your sample app and attach it here. I'll let you know what you are missing there. Thanks.

sathishkrishnan20 commented 3 years ago

Any Update On this? I am also getting the same error.

Nautiyalsachin commented 3 years ago

Hi @sathishkrishnan20, can you share the steps you used to integrate the custom plugin. As I have tried and I am not able to reproduce the same. I would also recommend to share a sample app here so that I can try and see your implementation.

Nautiyalsachin commented 3 years ago

Closing this issue due to inactivity. Feel free to add more comments here or try reopening the same, thanks.

CHANDRAMOHANnegi commented 3 years ago

use this Doc

https://razorpay.com/docs/payment-gateway/react-native-integration/custom/