ayyshim / esewa_pnp

Unofficial esewa plugin for flutter application.
MIT License
40 stars 23 forks source link

Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3.2 compiler #12

Closed AlokMishra01 closed 3 years ago

AlokMishra01 commented 3 years ago

When I open the project in Xcode and try to build the project I get the Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3.2 compiler error. First I was using code 12.3 now I am using 12.1 but still, I get the same error.

ayyshim commented 3 years ago

I am aware of this error and soon I will work on it. But for now I can't because I have to prepare for exams. Will let you know as soon as this error is fixed.

AlokMishra01 commented 3 years ago

Thanks. I like what you are doing if you need any help let me know.

ayyshim commented 3 years ago

I have recently published new version, 1.0.3, of this plugin. Please use it.

Read the new README.md file before using new version of this plugin. There are some minor changes from previous version.

You might get error related to cache and if you do, run flutter clean && flutter pub get

AlokMishra01 commented 3 years ago

Still showing the same error Swift 5.2.4 cannot be imported by Swift 5.3. I cleaned caches as well using flutter clean and manually too.

ayyshim commented 3 years ago

That's very unlikely because plugin is compiled with 5.3.2. Make sure you are using esewa_pnp 1.0.3 and please run flutter clean and flutter pub get.

AlokMishra01 commented 3 years ago

Again I tried everything but I get an error Swift 5.3.1 cannot be imported by the Swift 5.3. I am using Xcode 12.1.

ayyshim commented 3 years ago

The latest version of xcode is 12.3 and swift is 5.3.2. Please update you xcode to latest version. ESewa ios framework does not support backward compatibility so you and I have to update xcode to use ESewa framework.

AlokMishra01 commented 3 years ago

Swift error is solved but now I get error Could not find module 'EsewaSDK for target 'x86_64-apple-ios-simulator; found: arm64, armv7-apple-ios, arm64-apple-ios, arm, armv7

ayyshim commented 3 years ago

It seems like you are trying to test esewa_pnp plugin in simulator. Try adding esewa_pnp in your pubspec.yaml file like this

dependencies:
  # esewa_pnp: ^1.0.4 # Use it on production app or while testing esewa_pnp on real physical iOS device.
  esewa_pnp:
      git:
          url: git://github.com/ayyshim/esewa_pnp.git
          ref: dev
AlokMishra01 commented 3 years ago

Same error when I build for release.

ayyshim commented 3 years ago

Can you message me on facebook? I could assist you there. Link: https://m.me/ayyshim

AlokMishra01 commented 3 years ago

Issue Solve after 1.0.3 version.

aarjan commented 3 years ago

Hey @ayyshim, I get this error while using the latest version, 1.0.6.

 /flutter/.pub-cache/hosted/pub.dartlang.org/esewa_pnp-1.0.6/ios/Classes/SwiftEsewaPnpPlugin.swift:3:8: error: module compiled with Swift 5.3.1 cannot be imported by the Swift 5.4 compiler:
    /flutter_app/ios/.symlinks/plugins/esewa_pnp/ios/EsewaSDK.framework/Modules/EsewaSDK.swiftmodule/arm64-apple-ios.swiftmodule
   import EsewaSDK
           ^
    /flutter_app/ios/Pods/Reachability/Reachability.m:465:63: warning: cast to smaller integer type 'unsigned int' from 'Reachability *' [-Wpointer-to-int-cast]    
      NSStringFromClass([self class]), (unsigned int) self, [self currentReachabilityFlags]];