Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'RazorpayCheckout' has different definitions in different modules; first difference is defined here found 1 referenced protocol #292

Closed
withniyaz opened this issue Sep 17, 2020 · 41 comments · Fixed by #297

Comments

@withniyaz
Copy link

Description

'RazorpayCheckout' has different definitions in different modules; first difference is defined here found 1 referenced protocol, shows an error after updating to xcode 12,

  • Specific to iOS Users:-
    I have tried updating Razorpay pod to the latest version by using 'pod update'.

Razorpay Package Version :

2.2.0

Xcode Version (iOS) :

xCode 12

Razorpay-pod version (iOS) :

  • razorpay-pod (1.1.7)

What you did:

After upgrading to xCode 12 facing this issue

What happened:

When ios was running , facing this issue

@Nautiyalsachin
Copy link
Contributor

Hey @niyasmhdth , can you try running the project in xcode first and share the error logs here

@withniyaz
Copy link
Author

withniyaz commented Sep 17, 2020 via email

@withniyaz
Copy link
Author

withniyaz commented Sep 17, 2020 via email

@withniyaz
Copy link
Author

Screenshot 2020-09-17 at 7 41 37 PM

Screenshot of Xcode 12 When I change the command-line tool from Xcode 12.0 to Xcode 11.7 in Preference > Location. Switching command line works

@philly25
Copy link
Contributor

Error is the same as here #286

@RomaJZ
Copy link

RomaJZ commented Sep 18, 2020

Screenshot 2020-09-17 at 7 41 37 PM

Screenshot of Xcode 12 When I change the command-line tool from Xcode 12.0 to Xcode 11.7 in Preference > Location. Switching command line works

Could you help me to understand how to make Xcode use multiple versions of Command Line Tools, please? I installed older version of CLT, but it doesn't show up anywhere.

@withniyaz
Copy link
Author

@RomaJZ I didn't download just the CLT of 11.7, I went to the apple developer website and downloaded the Xcode 11.7 full file and added as separate xcode app in applications folder

@vivekexc
Copy link

Same issue. Any solution so far apart from downgrading to 11.7?
How to make it work with Xcode 12?

@withniyaz
Copy link
Author

@vivekexc Even I’m looking for solution, for time being I’m using CLT 11.7 , waiting for razorpay to fix the issue. 😊

@Nautiyalsachin
Copy link
Contributor

Hi @niyasmhdth, I am working on this issue, will post you an update as soon as I'll find the solution.

@withniyaz
Copy link
Author

@Nautiyalsachin Thank you 😊

@dap221104
Copy link

@Nautiyalsachin Keep us updated. We are also facing same issue.

@ajitupapp
Copy link

@niyasmhdth Yes, I am facing the same issue as you after xcode 12 update.

@Nautiyalsachin
Copy link
Contributor

Hi Everyone, As I can see there is something wrong with React-Native platform as there are so many issues coming up related to XCode 12.

Here are some open issues on react Native like 30000, 29846, 29984, and many more.

I'll ask you guys to wait for the next React Native release or at least let them add some updates, as internally there are so many things breaking up.

They are also working on the new version release v0.64.0 Discussion. Till then, I'll still be trying to fix this issue, and for any new updates, I'll keep you posted here.

@GovindSinghTak
Copy link

I am also facing the same issue with xcode 12

@LAKSHITgoel
Copy link

@Nautiyalsachin is there some way we can fix this by changing the native code?

@philly25
Copy link
Contributor

philly25 commented Oct 9, 2020

@Nautiyalsachin Seems like this thread is our case.

@philly25
Copy link
Contributor

philly25 commented Oct 9, 2020

The only workaround for now to resolve conflict with Swift class name is to rename RN module name.

@weingenious72
Copy link

weingenious72 commented Oct 10, 2020

@philly25 gets an undefined error code after changing the native code.

Simulator Screen Shot - iPhone 11 - 2020-10-10 at 12 39 03

@philly25
Copy link
Contributor

@weingenious72 It works for me. At least I can build app and payments works as usual.
I think you should create another issue for your problem and provide some logs in it.

@kathirsuresh
Copy link

@philly25 its possible to explain more about ur changes

@philly25
Copy link
Contributor

@kathirsuresh The issue raised because of the equal interface name RazorpayCheckout:

  1. Razorpay SDK: interface in <Razorpay/Razorpay-Swift.h> (we import it in RazorpayCheckout.m)
  2. React Native module: interface in RazorpayCheckout.h

Because we can't modify Razorpay SDK (swift code), all we can do is to rename React Native module interface to avoid conflict. That's what I've done.

@Nautiyalsachin
Copy link
Contributor

@Nautiyalsachin Seems like this thread is our case.

Yes, @philly25. This is happening internally as the framework is getting compiled again and maybe the shared library resources are getting certain conflicts.

Agree with you here, if you change the class name from RazorpayCheckout to 'Razorpay' then it may start working. But still there is some major issue with React Native right now. As I am not even able to create a sample app using Xcode 12.

@imrahulpatel
Copy link

please change according to this link , the issue is fixed for me in xcode 12.1
https://github.com/razorpay/react-native-razorpay/pull/297/files/ea490ff7669c629010a74f41de6c4d61a74c1c05

@rohithramachandran
Copy link

Can we get this published in npm ? Seems like npm is still holding old version

@chakrihacker
Copy link

Please release a new version

@gauthampait
Copy link

gauthampait commented Dec 3, 2020

Yes, please release the new version on npm ☹️ we've been waiting it for so long now.

@Nautiyalsachin
Copy link
Contributor

Hey @gauthampait, i am working on it, releasing it soon.

@akhilumapathe
Copy link

akhilumapathe commented Dec 8, 2020

Any updates?

@Nautiyalsachin
Copy link
Contributor

Hi @akhilumapathe, we have released the new plugin v2.2.2 with the changes.

@eramudeep
Copy link

Still getting the same problem
xcode : Version 12.2 (12B45b)
"react-native-razorpay": "^2.2.1",
react-native-cli: 2.0.1
node : v12.18.3

@Nautiyalsachin
Copy link
Contributor

@eramudeep : Your react-native-razorpay package is still 2.2.1, It should be v2.2.2.

Try removing and adding it again.

@wazzah-marham
Copy link

wazzah-marham commented Feb 9, 2021

I am also facing this issue on Xcode 12.3? Is there any fix to it yet?

@Nautiyalsachin
Copy link
Contributor

Have you tried updating our plugin to latest version v2.2.2? And also please update your pods by using pod update from your ios folder.

@anmolpandeyy
Copy link

anmolpandeyy commented Mar 1, 2021

Have you tried updating our plugin to latest version v2.2.2? And also please update your pods by using pod update from your ios folder.

@Nautiyalsachin I'm getting the same error with v2.2.2 and even with the current latest v2.2.4. This is only happening in release scheme and not debug in iOS.
Xcode: 12.2
React-Native: 0.63.2
react-native-razorpay: 2.2.4
razorpay-pod (1.1.12)

image

@Nautiyalsachin
Copy link
Contributor

Hey @anmolpandeyy, change Build Active Architecture Only to yes for both release and debug.

@nkpatnis
Copy link

nkpatnis commented Mar 8, 2021

changing Build Active Architecture Only to yes will work only when we change it in build configuration of the lib.

@Nautiyalsachin
Copy link
Contributor

@nkpatnis I would suggest you to check your .xcworkspace > build settings by comparing it with our sample app. You might have modified something which is causing this issue. Let me know if that works for you.

@gauravgg
Copy link

gauravgg commented Aug 5, 2021

@nkpatnis I would suggest you to check your .xcworkspace > build settings by comparing it with our sample app. You might have modified something which is causing this issue. Let me know if that works for you.

Same happening with the Sample Project in XCode 12.5. Please help me with the solution

@vishalkhoje
Copy link

Hi,
I am also facing the same issue

Screenshot 2021-10-22 at 12 05 47 PM

xcode version : Version 13.0 (13A233)
package: "react-native-razorpay": "^2.2.1"
"react-native": "0.63.3",

Can any one please help me here

@wazzah-marham
Copy link

@vishalkhoje in my case it was the MBProgressHUD library, updating to the latest version of the MBProgressHUD library resolved the issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.