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

IOS Build Issue :' Razorpay/Razorpay-Swift.h' file not found #475

Open Nphadtare2021 opened 6 months ago

Nphadtare2021 commented 6 months ago

Description

Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest React Native Razorpay plugin release to make sure your issue has not already been fixed.

Razorpay Package Version :

"react-native-razorpay": "^2.3.0",

Xcode Version (iOS) :

XCODE Version 13.4 (13F17a)

Razorpay-pod version (iOS) :

pod 'razorpay-pod', '1.3.4'

System Setup :

Versions: react = 17.0.2 react-native = 0.64.4 react-native-razorpay = ^2.3.0, CocoaPods = 1.11.3 razorpay-pod (1.3.4) Xcode = Version 13.4 (13F17a)

What you did:

i have integrated the razorpay using COCOAPOD by adding " pod 'razorpay-pod', '1.3.4'" in pod file . My build is getting successfully build using XCODE, but while I am trying to ARCHIVE i m getting ERROR!!

What happened:

Got Following Error: Lexical or Preprocessor Issue : 'Razorpay/Razorpay-Swift.h' file not found. Screenshot 2024-04-01 at 7 14 29 PM

vivekshindhe commented 6 months ago

Hey @Nphadtare2021, I tried reproducing this but wasn't successful. It seems like a pod cache issue. We have set the react-native-razorpay project to pick the latest pod version directly. Could you try uninstalling the react-native-razorpay package and then reinstalling the package and running pod install? This should most likely resolve this issue for you.

Nphadtare2021 commented 6 months ago

Hi @vivekshindhe , I had cleared the pod cache,cocoapods cache and system XCODE derived data , still error not resolved

vivekshindhe commented 6 months ago

I tested this just before I responded above. Could you let me know if you tried to reinstall the package? @Nphadtare2021

Nphadtare2021 commented 6 months ago

@vivekshindhe , Yes i have uninstall package, then reinstall the package followed by pod install.

vivekshindhe commented 6 months ago

@Nphadtare2021 can you share a sample project where you are able to reproduce the issue? Because we aren't able to reproduce the issue.

malikzype commented 3 months ago

Hi @vivekshindhe

I have created a sample app to reproduce the same.

my-project.zip

vivekshindhe commented 3 months ago

@malikzype looks like a regression issue in the new xcode version. The same can be found for multiple other libraries. One workaround I found for this for now is to set Build Active Architecture Only to No for both debug and prod builds. I was able to archive the project with that setting. Can you please try this once?
Attaching the screenshot for your reference Screenshot 2024-06-11 at 5 03 45 PM

vivekshindhe commented 3 months ago

@malikzype Hey, were you able to test this?