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

Module compiled with Swift 5.0 cannot be imported by the Swift 5.1 compiler #28

Closed
pobyt opened this issue Sep 21, 2019 · 24 comments
Closed

Comments

@pobyt
Copy link

pobyt commented Sep 21, 2019

iOS build is failing with below exception with new XCODE release Version 11.0.
Please update your iOS SDK to 5.1 in Flutter Project.
Module compiled with Swift 5.0 cannot be imported by the Swift 5.1 compiler: /ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/x86_64.swiftmodule

@muthufmass
Copy link

any update on this, We are also blocked on the same error. Needs a rebuild and new version with latest xcode compiler on mac.

@nihalreddy33
Copy link

@ChintanAcharya any update/ETA on this issue?

@abhikumar08
Copy link

facing the same issue, did anyone find a way around to get this work?

@prasanna-narayanan24
Copy link

prasanna-narayanan24 commented Sep 29, 2019

https://razorpay.com/docs/payment-gateway/ios-integration/standard/

A temporary fix is, Download the latest 5.1 razorpay-sdk (Razorpay.framework). Replace this downloaded one in ios/Pods/razorpay-pod/Pod/Razorpay.framework.

and run it from Xcode > Product > Run

@nihalreddy33
Copy link

@prasanna-narayanan24 if we do that we are getting below exception when we run.
/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.1.1/ios/Classes/RazorpayDelegate.swift:17:17: Method 'onExternalWalletSelected(:WithPaymentData:)' has different argument labels from those required by protocol 'ExternalWalletSelectionProtocol' ('onExternalWalletSelected(:withPaymentData:)')

@prasanna-narayanan24
Copy link

@prasanna-narayanan24 if we do that we are getting below exception when we run.
/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.1.1/ios/Classes/RazorpayDelegate.swift:17:17: Method 'onExternalWalletSelected(:WithPaymentData:)' has different argument labels from those required by protocol 'ExternalWalletSelectionProtocol' ('onExternalWalletSelected(:withPaymentData:)')

can you delete the Podfile.lock file and try doing the same steps as mentioned above?

@nihalreddy33
Copy link

@prasanna-narayanan24 even after deleting the podfile.lock, I am getting the same exception with the new 5.1 SDK.

@prasanna-narayanan24
Copy link

@prasanna-narayanan24 even after deleting the podfile.lock, I am getting the same exception with the new 5.1 SDK.

the error says that withPaymentData is replaced with WithPaymentData, so i guess changing the variable name should fix.

@prasanna-narayanan24
Copy link

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      **config.build_settings['SWIFT_VERSION'] = '5.1'**
    end
  end
end

Also fixes

@ChintanAcharya
Copy link
Contributor

We are working on a Swift 5.1 compatible release. ETA is by the end of this week.

@nihalreddy33
Copy link

Thank you @ChintanAcharya for the update.

@ChintanAcharya
Copy link
Contributor

v1.1.2 is out, which should fix this issue.

@meera13raveendran
Copy link

v1.1.2 is out, which should fix this issue.

hi..just updating the pod file and updating razorpay pod will work..or is there anything else I should do?

@LOG-TAG
Copy link

LOG-TAG commented Oct 20, 2019

what is the version of pod that is compatible on xcode 10.1 ?
Screen Shot 2019-10-20 at 12 50 13 PM

@LOG-TAG
Copy link

LOG-TAG commented Oct 20, 2019

@prasanna-narayanan24 any workaround possible for xcode 10.1 ? alfa version of pub will work?

@meera13raveendran
Copy link

meera13raveendran commented Oct 22, 2019 via email

@MustansirZia
Copy link

Updating to v1.1.2 fixed this issue for us. Thanks!

@meera13raveendran
Copy link

meera13raveendran commented Oct 31, 2019

Yes I did update the pod and working fine now.. Thanks for the reply

  1. Edit the podfile
    'pod razorpay-pod ' in podfile
  2. And in terminal run the command pod install /
    Pod update razorpay-pod
    worked for me

@Nautiyalsachin
Copy link
Contributor

Closing this issue due to the time elapsed. Please feel free to either re-open the issue or create a new ticket if you have any additional issues.

@deeppanchal
Copy link

Updating to v1.1.2 fixed this issue for us. Thanks!

Which Xcode Version you are using?

@vikram94
Copy link

Here is how I resolved the issue.. Hope helps someone and saves his time.

Put in Podfile - pod 'razorpay-pod', '1.1.5'
Delete Pod Folder
Put 'use_frameworks!' Below target ‘Runner’ do
Type Command in iOS - Pod update razorpay-pod
flutter pub pub cache repair
Flutter build iOS

in case of an issue do ask

@balasubramanian1612s
Copy link

issue

Could you please explain a bit!?

@deepakatom
Copy link

Got the issue again with Swift 5.2.4 this week. Any solution for this?
error

@Nautiyalsachin
Copy link
Contributor

Hey @deepakatom, Can you try cleaning the build and deleting derived data first, and try again, let me know after following these steps you are still getting the same error.

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