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

Unknown type name 'RazorpayCheckout'; did you mean 'RNRazorpayCheckout'? #331

Closed sivaLeo closed 3 years ago

sivaLeo commented 3 years ago

Look at the screenshot.

"react-native": "0.61.5", "react-native-razorpay": "2.2.4",

Screenshots

Screenshot 2021-05-11 at 11 08 15 PM
Nautiyalsachin commented 3 years ago

Hi @niyatiArunk, Have you gone through our FAQs and added asked changes? Let me know if you still face any issues, I also recommend you to go through this thread and do the asked changes.

vineeth-vk11 commented 3 years ago

@Nautiyalsachin yes we can do it, l have contacted you on LinkedIn.

@niyatiArunk can you confirm if you are using a M1 Mac or a normal Mac ?

niyatiArunk commented 3 years ago

I am using Mac mini, it works fine now archive succeded, earlier I have changed scheme to run as a release build that was causing the issue, now it working after reverting back.

vineeth-vk11 commented 3 years ago

@Nautiyalsachin thanks for the solution

https://khushwanttanwar.medium.com/xcode-12-compilation-errors-while-running-with-ios-14-simulators-5731c91326e9

I followed the steps in this but in xcode 12.5 there is no VALID_ARCHS property in Build Setting. Only step 1 will do the trick

Following are the steps I have used to fix the issue

Step 1 - Added the below code to the Pod file

post_install do |installer| installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" end end

Step 2 - Run the following commands in the ios folder

rm -rf ~/Library/Developer/Xcode/DerivedData/ pod deintegrate pod update

Step 3 - In Xcode

Clean the build folder and compile

I am attaching a photo of the modified Podfile

Screenshot at May 18 12-37-09

@punndcoder28 please try the above steps and confirm if it is working for you.

punndcoder28 commented 3 years ago

Build works from Xcode after following the above steps thanks @Nautiyalsachin @vineeth-vk11 !!

harshiththota commented 3 years ago

Hello, I am facing the same issue, after trying all the above-mentioned steps, still it did not work. @Nautiyalsachin @vineeth-vk11 node: 13.11.0 react-native: 0.61.4 macOS: 11.4 Xcode: 12.5.1 react-native-razorpay: 2.2.1

vineeth-vk11 commented 3 years ago

@harshiththota can you share a screenshot of your pod file code? Thanks

harshiththota commented 3 years ago
MicrosoftTeams-image (1)

Hi @vineeth-vk11, here is screenshot of pod file, thank you.

vineeth-vk11 commented 3 years ago

@harshiththota I would like to see where you have implemented the suggested step 1 which I am entering below.

Step 1 - Added the below code to the Pod file

post_install do |installer| installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" end end

Thank you

harshiththota commented 3 years ago
MicrosoftTeams-image (1)

@vineeth-vk11, We have added. the mentioned code in pod file, still it did not worked

vineeth-vk11 commented 3 years ago

@harshiththota I suggest you do all the steps given in this comment - https://github.com/razorpay/react-native-razorpay/issues/331#issuecomment-842913500

If it still does not work, create a new project and implement the payment gateway and see if you are still facing the issue.

I would also like you try opening your terminal using rosetta and compile your code from the terminal to see what happens.

Try all these and let me know what happens.

Thank you

harshiththota commented 3 years ago

We had gone through the link and followed all the steps, it didn't work. We have created the new project and tried integration of react-native Razorpay, it builds successfully. And our mac processor is Intel.

vineeth-vk11 commented 3 years ago

@harshiththota I suggest you undo the step where you have added the code in pod file because it is to resolve the problem in M1 macs.

@Nautiyalsachin can help you solve this issue.

harshiththota commented 3 years ago

@vineeth-vk11, I uninstalled and reinstalled the react-native Razorpay. It is working fine now. Thank you.

shivamvk commented 3 years ago

Has anyone found a solution to this? I'm also facing similar issues with the following config:

The errors are similar to the screenshot attached above and I've tried everything mentioned above.

@Nautiyalsachin Are you guys not able to resolve this? My app has to go to production today and I'm stuck on this issue for past 2 days.

harshiththota commented 3 years ago

@shivamvk uninstall, clean, and reinstall the Razorpay SDK. After doing this, in my case, it worked fine.

shivamvk commented 3 years ago

@harshiththota Tried this several times. Didn't work.

shivamvk commented 3 years ago

I was able to create a build by selecting 'any iOS device' in the devices list. This solved my issue for creating a build and uploading it to App Store. But if I've to run my app in release mode then this issue is still there.

devalok1508 commented 2 years ago

For M1 users follow the link FAQ and update your pod and clean project then work .[https://github.com/razorpay/react-native-razorpay/wiki/FAQ's]()

nikhil8725 commented 2 years ago

Hi @vineeth-vk11 & @Nautiyalsachin , I have tried every step you guys mentioned , still my build is getting failed . Here is my configuration : MacOS Big Sur v11.4 Apple M1 2020 Xcode Version : 13.1 react-native-razorpay : 2.2.6

Screenshot 2021-12-08 at 2 03 37 AM Screenshot 2021-12-08 at 2 03 25 AM
devalok1508 commented 2 years ago

Razorpay/React-Native-Razorpay ios not support

On Wed, Dec 8, 2021 at 2:09 AM Nikhil Bahalkar @.***> wrote:

Hi @vineeth-vk11 https://github.com/vineeth-vk11 & @Nautiyalsachin https://github.com/Nautiyalsachin , I have every step you guys mentioned , still my build is getting failed . Here is my configuration : MacOS Big Sur v11.4 Apple M1 2020 Xcode Version : 13.1 react-native-razorpay : 2.2.6

[image: Screenshot 2021-12-08 at 2 03 37 AM] https://user-images.githubusercontent.com/24876605/145102640-71bc3ff0-f8f5-4ddb-bf9b-12b27ea36e5e.png

[image: Screenshot 2021-12-08 at 2 03 25 AM] https://user-images.githubusercontent.com/24876605/145102727-e08ada51-463a-478d-a064-e0caf630ea97.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/razorpay/react-native-razorpay/issues/331#issuecomment-988248050, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJREGY5VAF6MQZR47AKLYK3UPZWG7ANCNFSM44WM6GLQ .

SHIVAJIKUMAR007 commented 2 years ago

this is all because of this new Apple M1 chip

do this step and it will work fine

image