-
Notifications
You must be signed in to change notification settings - Fork 123
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
IOS build error, need 'SWIFT_VERSION' #9
Comments
@doomsdayer image_downloader have been specified Swift Version Language 4. I think that your app's PodFile is not going well.
Please let me know again if the problem is not resolved.Thank you. |
@ko2ic I got same error: it seems your codes contains swift3x, how to migrate it to 4? |
@jinfagang Thanks for your comment. Is it an error even if I try the following? |
@ko2ic I haven't try that, I am using the newest xcode 10.2, which may need newest swift version. |
@ko2ic to post_install do |installer| but still the same Launching lib/main.dart on iPhone XR in debug mode...
Error output from CocoaPods:
Error running pod install when I run the pod install, I got this Analyzing dependencies
[!] Automatically assigning platform |
@doomsdayer @jinfagang |
@ko2ic Thanks, I will try it tonight, the most likely reason for this maybe I am using the newest version xcode |
@ko2ic |
@doomsdayer My environment is also Xcode 10.1. It is working. Does it work on the example project? |
@ko2ic Yes, the example is Ok, and I found there's AppDelegate.swift in your example. Could it be fixed? |
@ko2ic I found a solution for this issue, but not perfect.
Then the project can run on ios emulator by Android Studio with Flutter plugin, But can't run by XCode, error msg is could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner') |
@doomsdayer Oh, it was that situation. You are almost right. It seems to work with the following
Thank you for giving detailed report!! |
@ko2ic Does it will update this package release? I am pretty new in iOS development, it seems not convenient to use compare with other flutter packages |
@jinfagang Does it mean to rewrite to objective-c? In addition, If you select swift when creating the app, it will work without doing anything.
Plugins created with swift all have the same problem. |
@ko2ic OK, now I understand it |
@doomsdayer It is a sample of AppDelegate made with Objective-C. |
I'll fix it below so close it. If the same problem occurs, please set up another issue. |
Launching lib/main.dart on iPhone Xʀ in debug mode...
Error output from CocoaPods:
Error running pod install |
The easiest way to solve this problem is to create a new. swift file under the iOS file. |
As Swift 5 is there for some time. Will there any issue if we have SWIFT_VERSION 5.0 in the Xcode? |
Just an update for future googlers, this is what I do to manually set the swift version of legacy CocoaPods libraries:
|
@redent Where exactly do you put this? |
@kasp1 just in your |
@danydev Thanks, figured it out. For some reason there was no Podfile in my project so I had to put it together. And then I found these templates... https://github.com/flutter/flutter/tree/master/packages/flutter_tools/templates/cocoapods |
@ko2ic Hello, What if pod install --repo-update running slowly? Can I ignore this command? And if I finished it and my other projects have the same issue should I run it again? |
Fix mine by going to ios/Podfile.... then add ENV['SWIFT_VERSION'] = '5' at the top of your podfile. Update: |
Just add a few amazing lines in the plugin amazon_s3_cognito.podspec file
|
Wanna run on IOS emulator(iphone xr), and I got these:
Launching lib/main.dart on iPhone XR in debug mode...
Running pod install...
CocoaPods' output:
↳
Preparing
Error output from CocoaPods:
↳
Error running pod install
Error launching application on iPhone XR.
seems like image_downloader goes wrong?
The text was updated successfully, but these errors were encountered: