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

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

Closed withniyaz closed 3 years ago

withniyaz commented 3 years ago

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,

Razorpay Package Version :

2.2.0

Xcode Version (iOS) :

xCode 12

Razorpay-pod version (iOS) :

What you did:

After upgrading to xCode 12 facing this issue

What happened:

When ios was running , facing this issue

Nautiyalsachin commented 3 years ago

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

withniyaz commented 3 years ago

I think the issue is with xcode 12 , the update came out today, and my mac has auto update, so it updated my xcode from 11 to 12, now I downloaded xcode 11 and it works fine

On Thu, 17 Sep 2020 at 6:12 PM, Sachin Nautiyal notifications@github.com wrote:

Hey @niyasmhdth https://github.com/niyasmhdth , can you try running the project in xcode first and share the error logs here

ā€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/razorpay/react-native-razorpay/issues/292#issuecomment-694204455, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRT4KQVPWYK6E4WWEPSIV3SGH74NANCNFSM4RQFXYJQ .

withniyaz commented 3 years ago

@interface RazorpayCheckout : NSObject

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

On Thu, Sep 17, 2020 at 6:20 PM Niyas Mhd niyasmhdth@gmail.com wrote:

I think the issue is with xcode 12 , the update came out today, and my mac has auto update, so it updated my xcode from 11 to 12, now I downloaded xcode 11 and it works fine

On Thu, 17 Sep 2020 at 6:12 PM, Sachin Nautiyal notifications@github.com wrote:

Hey @niyasmhdth https://github.com/niyasmhdth , can you try running the project in xcode first and share the error logs here

ā€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/razorpay/react-native-razorpay/issues/292#issuecomment-694204455, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRT4KQVPWYK6E4WWEPSIV3SGH74NANCNFSM4RQFXYJQ .

withniyaz commented 3 years ago
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 commented 3 years ago

Error is the same as here #286

RomaJZ commented 3 years ago
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 commented 3 years ago

@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 commented 3 years ago

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

withniyaz commented 3 years ago

@vivekexc Even Iā€™m looking for solution, for time being Iā€™m using CLT 11.7 , waiting for razorpay to fix the issue. šŸ˜Š

Nautiyalsachin commented 3 years ago

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

withniyaz commented 3 years ago

@Nautiyalsachin Thank you šŸ˜Š

dap221104 commented 3 years ago

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

ajitupapp commented 3 years ago

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

Nautiyalsachin commented 3 years ago

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 commented 3 years ago

I am also facing the same issue with xcode 12

LAKSHITgoel commented 3 years ago

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

philly25 commented 3 years ago

@Nautiyalsachin Seems like this thread is our case.

philly25 commented 3 years ago

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

weingenious72 commented 3 years ago

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

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

philly25 commented 3 years ago

@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 commented 3 years ago

@philly25 its possible to explain more about ur changes

philly25 commented 3 years ago

@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 commented 3 years ago

@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 commented 3 years ago

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 commented 3 years ago

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

chakrihacker commented 3 years ago

Please release a new version

gauthampait commented 3 years ago

Yes, please release the new version on npm ā˜¹ļø we've been waiting it for so long now.

Nautiyalsachin commented 3 years ago

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

akhilumapathe commented 3 years ago

Any updates?

Nautiyalsachin commented 3 years ago

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

eramudeep commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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

Nautiyalsachin commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

nkpatnis commented 3 years ago

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

Nautiyalsachin commented 3 years ago

@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 commented 3 years ago

@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 commented 2 years ago

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 commented 2 years ago

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