Closed sivaLeo closed 3 years ago
what i missed
Hi @sivaLeo, try removing the plugin and adding it again, also recommend you to run pod update
from the iOS folder.
@Nautiyalsachin I am also facing the same issue from yesterday. Tried uninstalling and reinstalling react-native-razorpay and I have also tried running pod update but the issue is still there
"react-native" : 0.63.4 "react-native-razorpay": "2.2.4"
Build configuration - Debug - Build successful Build configuration - Release - Build Failed
@Nautiyalsachin i tried already npm uninstall --save react-native-razorpay cd ios && pod install && cd .. npm install --save react-native-razorpay cd ios && pod install && cd ..
------Not working-----
@sivaLeo are you using the latest M1 mac with latest xcode?
@vineeth-vk11 i'm using MacBook Pro MacOS 10.15.6 Xcode Version 12.4 (12D4e)
@sivaLeo I am able to build the code successfully in debug build configuration but the build fails in production build configuration. Are you able to build in debug config?
I got stuck in debug mode
@vineeth-vk11 Try changing Build Active Architecture Only to Yes for both release and debug. Also see our FAQs for more details.
@sivaLeo Please try above FAQs to validate your integration, also please try running our Sample App, let us know if you still face any issues.
Debug Mode already set as yes
@Nautiyalsachin I have tried setting Build Active Architecture Only to Yes in both Debug and Release but the issue it still there.
@Nautiyalsachin Still i'm getting that error bro
@vineeth-vk11 Are you using M1 powered MacBook?
@sivaLeo can you tell me the razorpay pod version from podfile.lock. You can find this file inside iOS folder.
@Nautiyalsachin yes I am using a M1 powered MacBook
@vineeth-vk11 I would recommend you to use Rosetta 2. For more details see this link.
@Nautiyalsachin I have tried by enabling Rosetta 2 already but it did not solve the issue, I have compared the build settings of the sample app and my app, they are also the same. Any other suggestions?
I was able to build the sample app with the versions given in package.json but when I upgraded the react native and react versions in the sample app, I got some erros which I am still trying to resolve to see if I can regenerate the error on the sample using my current versions of react native and react.
I have Xcode 12.5, can downgrading my xcode solve the isse?
@Nautiyalsachin I am able to regenerate the error with SampleProject on my Mac now.
Here are the list of changes I have made to the code to get the error
package.json dependencies upgraded to following versions "react": "16.13.1", "react-native": "~0.63.4", "react-native-razorpay": "^2.2.4"
Podfile.lock razorpay pod version updated to 1.1.12
I have completely changed the pod file to this
//Podfile Start
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' require_relative '../node_modules/react-native/scripts/react_native_pods'
platform :ios, '10.0'
target 'SampleProject' do
config = use_native_modules! use_react_native!(:path => config["reactNativePath"])
end
//Podfile End
With these I was able to get the error.
can you tell me if changing the pod file is causing the issues?
hey @Nautiyalsachin @vineeth-vk11, Now its working This is my side issue. before I manually linked the razor-pay. So the configuration lines are still in pb.xproj file even i uninstall the razor-pay in my project. so that im unlink the razor pay then uninstall the plugin.
npx react-native unlink react-native-razorpay
npm uninstall --save react-native-razorpay
Then im searching with key razor-pay in vs-code global search its shows two lines of code in project.pbxproj. so i delete the line of codes and run pod install it remove previous razorpay-pod. previous time i'm not seeing that line "removing razorpay-pod" - its explaining what i missed.
------ Thank you for your time to debug with me ------
@sivaLeo Glad that you are able to solve it on your own, I would also recommend you to use auto-linking, so that you don't face these issue in future.
@vineeth-vk11 Can you share the errors here?
@Nautiyalsachin I am attaching a screenshot of the errors I got in the SampleProject, they are the same in my project too
I made changes to the Podfile and Package.json in the SampleProject to get the issue. I also ran pod update.
@vineeth-vk11 Can you try creating a sample app from scratch and then try to integrate react-native-razorpay plugin, let me know if you face any issues there. I would recommend following the auto-linking process. Let me know how it goes for you. Thanks.
@Nautiyalsachin I have created a new project using expo. Following are the steps I followed
After this I opened the project in xcode Build in debug configuration is successful After changing the build configuration to release I got the same errors
I have tried setting the Build Active Architecture to True in both Debug and Release.
My expo version is 4.4.4
Do you think the issue is with ejecting from expo?
Edit :
I also tried with react native CLI. I created a new project and installed the react-native-razorpay but got the same workers.
@vineeth-vk11 Oh got the issue, you can't integrate our app with the expo. As we are using some native functionality here and that is not supported by the expo framework. For more details - see the expo's limitation. Let me know if you need any more details. Closing this issue, feel free to add more comments or reopen a new issue.
@Nautiyalsachin I am not using react-native-razorpay in expo managed work flow, I am using it in bare work flow after ejecting from expo.
Also, I created a new project with react native CLI and the issue is still there.
So expo is not the issue.
@vineeth-vk11 Is the error is same for both cases?
@vineeth-vk11 Please share the sample app here, so that I can download and try to debug it.
@Nautiyalsachin yes the error is same in both the cases.
I am attaching both the apps - React native CLI and expo ejected app
My Xcode version - 12.5 node version - 16.1.0 npm version - 7.11.2
@Nautiyalsachin I installed Xcode 11.4 beside my Xcode 12.5.
Though xcode 11 is not supported on Big Mac Sur, I used the following solution to run it and to see if it can compile.
https://stackoverflow.com/questions/64983664/is-it-possible-to-run-xcode11-in-macos-big-sur
I was able to compile the code successfully on xcode 11.4 in both debug and release config.
So can we assume that the problem is there with xcode 12.5 ?
@Nautiyalsachin did you get a chance to look into the sample apps?
@vineeth-vk11 can you try uninstalling and installing the plugin again. Let me know if this solves the issue. Thanks.
@Nautiyalsachin I have tried doing it multiple times but it does not work.
I created sample apps too with both expo cli and react native cli but the issue is there in both.
I could compile the code on Xcode 11.4 but it is giving errors on xcode 12.5
Also updated to 2.2.5 today morning and got the same errors
Were you able to compile the above sample apps on xcode 12 ?
@vineeth-vk11 I recently updated the Razorpay-pod which will address the xcode 12.5 issue, latest pod is 1.1.13. You can confirm your pod version by checking podfile.lock in your ios folder.
@Nautiyalsachin yes pod version is 1.1.13 and it has the same error
Actually the number of errors increased from 5 to 7 after updating to 2.2.5 and 1.1.13
I am attaching the sample project code below, I have not modified anything in the code. I only ran below steps before compiling on xcode
Been looking for solutions and working on it for last 3days but unable to find the issue.
Hi @vineeth-vk11, I tried the above sample app and it worked fine for me, here is the steps I did in the above sample app :
Here is the attached sample app.
I would also recommend you check the default XCode version in your system. You can go in XCode > Preferences > Locations > Command Line Tools > Select XCode 12.5.
Hi @Nautiyalsachin , I have downloaded the above attached sample code and the issue still there.
I have selected command line tools to xcode 12.5
I am using
Node - v 16.1.0 NPM - v 7.11.2 cocoapods - v 1.10.1 Swift version - 5.4
Can you tell me your node, npm, cocoapods and swift versions ?
@vineeth-vk11 @Nautiyalsachin I am also facing the same issue on our project. I have
react-native-razorpay 2.2.5 razorpay-pod 1.1.13 Node - v 16.0.0 NPM - v 7.10.0 cocoapods - v 1.10.1
I use Xcode 12.4 and M1 MacBook
@punndcoder28 I am starting to think that M1 macs might have this issue because I am also running on M1 mac.
Though I selected run on rosetta in my xcode info the issue is still there.
@Nautiyalsachin @punndcoder28 yes it is confirmed that issue is with arm64 on M1 mac
case 1 - Opened the terminal normally npx react-native run-ios Build Failed
case 2 - I enabled "Open with Rosetta" for terminal and opened the terminal again npx react-native run-ios Build successful
But the same does not work for Xcode. Even if I am opening the xcode after enabling "Open with Rosetta" it is compiling the code using arm64 and not x86.
Not sure how it can be changed to compile in x86 on xcode.
@vineeth-vk11 Your Xcode point makes sense, but for me even when I ran terminal with rosetta build failed.
@punndcoder28 can you paste the error you got when you ran with rosetta on the terminal ?
@vineeth-vk11 Your Xcode point makes sense, but for me even when I ran terminal with rosetta build failed.
@vineeth-vk11 @Nautiyalsachin I should be corrected. Works with rosetta 2 on terminal, but fails with Xcode like @vineeth-vk11 mentioned.
@punndcoder28 thanks for confirming
@Nautiyalsachin any workaround to compile using x86 instead of arm64 on Xcode until the issue is resolved ?
@Nautiyalsachin any updates on the issue ?
@vineeth-vk11 Can you share the error you are getting here?
@Nautiyalsachin this problem is there on M1 macs
Opening the terminal with Rosetta and running react-native run-ios works but without rosetta it gives the errors.
Even though xcode is opened with Rosetta it still uses arm64 to compile the code and not x86
Please test it on M1 macs
Image of the error is attached
Try changing Validate Workspace to YES in the Build Settings tab and let me know if the error still persists.
@Nautiyalsachin yes the error still persists after changing the Validate Workspace to YES in build settings.
@vineeth-vk11 Can we get on a call, I want to see your implementation and build settings.
Same issue, exists for me, I have a production app in Android that works fine, but while archive in IOS it was not working, need this to get resolved
Look at the screenshot.
"react-native": "0.61.5", "react-native-razorpay": "2.2.4",
Screenshots