sidlatau / flutter_email_sender

Allows send emails from flutter using native platform functionality.
Apache License 2.0
151 stars 84 forks source link

`flutter_email_sender` does not specify a Swift version #14

Closed erf closed 5 years ago

erf commented 5 years ago

I get the following error when trying to run my app on a device after installing this plugin:

  - `flutter_email_sender` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.

    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0.beta.1/lib/cocoapods/installer/xcode/target_validator.rb:122:in `verify_swift_pods_swift_version'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0.beta.1/lib/cocoapods/installer/xcode/target_validator.rb:37:in `validate!'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0.beta.1/lib/cocoapods/installer.rb:578:in `validate_targets'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0.beta.1/lib/cocoapods/installer.rb:158:in `install!'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0.beta.1/lib/cocoapods/command/install.rb:51:in `run'
    /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0.beta.1/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0.beta.1/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:22:in `load'
    /usr/local/bin/pod:22:in `<main>'

Error output from CocoaPods:
↳

    [!] Automatically assigning platform `ios` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

Finished with error: Error running pod install

flutter --version

Flutter 1.4.3-pre.7 • channel master • https://github.com/flutter/flutter.git
Framework • revision 0b68712246 (2 hours ago) • 2019-03-27 12:31:04 -0700
Engine • revision 0d83a2ecd1
Tools • Dart 2.2.1 (build 2.2.1-dev.2.0 None)

pod --version

1.7.0.beta.1
erf commented 5 years ago

After updating the project using flutter create -i swift it now builds ok.

qng5150 commented 5 years ago

flutter create -i swift ios and i'm still getting the error: flutter_email_senderdoes not specify a Swift version and none of the targets (Runner) integrating it have theSWIFT_VERSIONattribute set. Please contact the author or set theSWIFT_VERSION` attribute in at least one of the targets that integrate this pod.

lingster commented 5 years ago

try the following in your terminal: export SWIFT_VERSION=3 the run pod install that worked for me.