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

Build error Xcode 10.2: Incompatible Swift #177

Closed
sivakumar-cf opened this issue Apr 15, 2019 · 27 comments
Closed

Build error Xcode 10.2: Incompatible Swift #177

sivakumar-cf opened this issue Apr 15, 2019 · 27 comments

Comments

@sivakumar-cf
Copy link
Contributor

Getting the following build error on XCode 10.2.
I am using the react-native-razorpay version 2.1.0

error: The following binaries use incompatible versions of Swift: xxxx/Build/Products/iphonesimulator/xxx.app/Frameworks/Razorpay.framework/Razorpay

@pronav
Copy link
Contributor

pronav commented Apr 19, 2019

Are you using swift5 or swift4.2?

@sivakumar-cf
Copy link
Contributor Author

I am using swift 5 which is included in xCode 10.2.

@sandeep666
Copy link

Even I'm getting the same error after updating xCode to 10.2

@codebymani
Copy link

Screenshot 2019-05-03 at 3 37 11 PM

Facing the same issue while bumping up Xcode to 10.2.1 and react-native-razorpay to 2.1.23.
Any Fix ??

@saketverma008
Copy link

error: binaries use incompatible versions of Swift..
Facing the same issue with react-native-razorpay 2.1.23. Expecting a quick fix.

@sivakumar-cf
Copy link
Contributor Author

@pronav Any update on this?

@master96
Copy link

@codebymani any luck on issue ?

@pronav
Copy link
Contributor

pronav commented May 17, 2019

Can you verify if Razorpay-swift.h file included in Razorpay.framework starts with following line:

#include <TargetConditionals.h>

Secondly, have you added script to strip out unneeded architectures from binary?

@sivakumar-cf
Copy link
Contributor Author

sivakumar-cf commented May 18, 2019

Yes, I have added the script to strip out unneeded architectures while archiving the app, but here I cannot build the app in development mode.
and Yes I see #include <TargetConditionals.h>

@sivakumar-cf
Copy link
Contributor Author

@pronav Any solution on this, waiting for a long time?

@ChintanAcharya
Copy link
Contributor

If you've multiple xcode installed, make sure that version 10.2 is selected in Xcode command line tools in Preferences > Locations.

image

@sivakumar-cf
Copy link
Contributor Author

It is worked, Thanks for the help

@rawris
Copy link

rawris commented Jun 14, 2019

I'm still facing this issue, I'm using only 1 xcode (10.2) with swift 5.1 and I have the same error

error: The following binaries use incompatible versions of Swift: xxxx/Build/Products/iphonesimulator/xxx.app/Frameworks/Razorpay.framework/Razorpay

@pronav
Copy link
Contributor

pronav commented Jun 14, 2019

We're looking into swift 5.1 support and will update here.

@rawris
Copy link

rawris commented Jun 14, 2019

so can you suggest any other way to integrate razorpay in our React Native app? I need to integrate it for a client.

@master96
Copy link

any temporary fix untill team is working on swift 5.1 support

@master96
Copy link

React Native Environment Info:
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
Memory: 28.34 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.2.0 - /usr/local/bin/node
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 26, 27, 28
Build Tools: 28.0.3
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.0 => 0.57.0
npmGlobalPackages:
react-native-cli: 2.0.1

this is system info

@rawris
Copy link

rawris commented Jun 17, 2019

Hi,

I just rechecked my swift version and It is Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5) which is the same swift version mentioned in Razorpay-Swift.h. any suggestions?

This is the complete error

error: The following binaries use incompatible versions of Swift: /Users/<username>/Library/Developer/Xcode/DerivedData/<App Name>/Build/Products/Debug-iphonesimulator/<app/>Frameworks/Razorpay.framework/Razorpay /Users/<username>/Library/Developer/Xcode/DerivedData/<App Name>/Build/Products/Debug-iphonesimulator/<app.app>/<App>

@master96
Copy link

Download latest Razorpay.framework from Razorpay website with swift 5.0 and replace the one from node modules. This fixed error for me @rawris @codebymani

@rawris
Copy link

rawris commented Jun 18, 2019

Hi @master96

Can you share the link with us? just so we use the same framework as you

@pronav
Copy link
Contributor

pronav commented Jun 18, 2019

This is the link for latest framework: https://rzp-mobile.s3.amazonaws.com/ios/checkout/1.2.0/RazorpayBitcodeX10.framework.zip

However just using latest react-native-razorpay plugin should've worked in first place.

@pronav
Copy link
Contributor

pronav commented Jun 18, 2019

We'll release swift-5.1 compatible framework once stable version for swift-5.1 is released by apple.

@rawris
Copy link

rawris commented Jun 18, 2019

Hi @pronav

I'm using swift 5.0 still I'm getting this error.

@master96
Copy link

Hi @pronav

I'm using swift 5.0 still I'm getting this error.

I can confirm

"react-native-razorpay": "^2.0.18"
and
https://rzp-mobile.s3.amazonaws.com/ios/checkout/1.2.0/RazorpayBitcodeX10.framework.zip
works fine with swift 5.0

@rawris
Copy link

rawris commented Jun 18, 2019

Hi @pronav
I'm using swift 5.0 still I'm getting this error.

I can confirm

"react-native-razorpay": "^2.0.18"
and
https://rzp-mobile.s3.amazonaws.com/ios/checkout/1.2.0/RazorpayBitcodeX10.framework.zip
works fine with swift 5.0

I'm using ^2.1.23 version. I'm downgrading it to 2.0.18 and will see how it works out

@Balasnest
Copy link

Facing this in xcode 11.3.1 and swfit version used in framework is 4.2

Any workaround for this?

@Nautiyalsachin
Copy link
Contributor

Which react-native-razorpay are you using? Can you share the package version here? Thanks.

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

No branches or pull requests

10 participants