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

Bug Report : IOS Manual (via CocoaPods) linking is not working for react-native-customui #314

Closed mprem1204 closed 3 years ago

mprem1204 commented 3 years ago

Hi team. We are trying to add react-native-customui sdk to our ios app for razorpay custom check out. We are using CocoaPods. We are following the documentation to link the sdk as given here. https://razorpay.com/docs/payment-gateway/react-native-integration/custom/#manual-via-cocoapods. 1) We first installed the package. npm install react-native-customui. 2) Added this Podfile. pod 'react-native-customui', :path => '../node_modules/react-native-customui' Howerver after running the pod install it gives the following error

[!] No podspec found for react-native-customui in ../node_modules/react-native-customui

I've checked in that folder and even i did not find .podspec file. Could u plese look into this issue, as we are struck with the ios release

Nautiyalsachin commented 3 years ago

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

Nautiyalsachin commented 3 years ago

Due to inactivity closing this issue, feel free to add more details here or re-open the same.

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.

CHANDRAMOHANnegi commented 3 years ago

use this Doc

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