fluttercommunity / flutter_sms

A Flutter plugin to Send SMS and MMS on iOS and Android. If iMessage is enabled it will send as iMessage on iOS. This plugin must be tested on a real device on iOS. Maintainer: @rodydavis
https://fluttercommunity.github.io/flutter_sms/
MIT License
245 stars 182 forks source link

Cant build ios app - `SWIFT_VERSION` issue #14

Closed k00na closed 3 years ago

k00na commented 4 years ago

Hello!

Everything works on Android but on iOS I cant build the project. There's an issue with the swift version, this is the output I get:

      - Running pre install hooks
    [!] Unable to determine Swift version for the following pods:

    - `flutter_sms` 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.5/lib/cocoapods/installer/xcode/target_validator.rb:122:in
    `verify_swift_pods_swift_version'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer/xcode/target_validator.rb:37:in `validate!'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:578:in `validate_targets'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:158:in `install!'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/command/install.rb:51:in `run'
    /Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.5/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:22:in `load'
    /usr/local/bin/pod:22:in `<main>'

I found a potential answer here, followed the steps but I still cant build the ios app because of this plugin. Any suggestions?

faiqmustaqeem commented 4 years ago

did you find any solution?

faiqmustaqeem commented 4 years ago

issue solved by following these instructions. https://github.com/esysberlin/esys-flutter-share/issues/24#issuecomment-527611976

k00na commented 4 years ago

@faiqmustaqeem as I've mentioned, I've followed the exact same steps in that comment, but it didnt work for me.

rodydavis commented 4 years ago

Is this still an issue? Try recreating your flutter project on the dev or master channel

mrwwalmsley commented 4 years ago

Any updates here? What SWIFT_VERSION should I be specifying in the Podfile?

SardorbekR commented 3 years ago

Solution: https://stackoverflow.com/a/58784154/10969195

rodydavis commented 3 years ago

fixed on version 2.3.1 reopen if it is still an issue