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

Build ios-framework fails, swift version attribute required #8

Closed
safarri opened this issue Aug 3, 2020 · 5 comments
Closed

Build ios-framework fails, swift version attribute required #8

safarri opened this issue Aug 3, 2020 · 5 comments

Comments

@safarri
Copy link

safarri commented Aug 3, 2020

build ios-framework fails with the error:

" [!] Unable to determine Swift version for the following pods:

- `apple_maps_flutter` 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.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/target_validator.rb:125:in `verify_swift_pods_swift_version'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/target_validator.rb:39:in `validate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:590:in `validate_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:158:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

"

LuisThein added a commit that referenced this issue Aug 21, 2020
Fixes Issue #8 of platform_maps_flutter.
@LuisThein LuisThein removed this from To do in platform_maps_flutter Oct 18, 2020
@alexshikov
Copy link

This is still an issue for us.

@LuisThein LuisThein reopened this Oct 29, 2020
@LuisThein
Copy link
Collaborator

I'm not able to reproduce this issue. Did you create your Flutter Project using Objective C?

I found this issue can you please let me know if this fixes your issue?

@alexshikov
Copy link

The problem is: we have to make a fresh build of embedded flutter library every time.

So we do:

flutter clean
flutter build ios-framework

What actually helped is to add a ENV['SWIFT_VERSION'] = '5' to the .ios/Podfile but as you probably know, that file is going to be purged with every flutter clean.

You can find a simple project with reproduce of the error here: https://github.com/alexshikov/flutter-map-example

Just follow the steps from the README.

@alexshikov
Copy link

@LuisThein maybe simply adding a SWIFT version to the podspec should fix the problem. Another plugin that we use works great: https://github.com/juliuscanute/qr_code_scanner/blob/master/ios/qr_code_scanner.podspec

@LuisThein
Copy link
Collaborator

Sorry for taking so long.

Thank you for the example project! Now I finally understand. This issue seems to only happen when trying to build a Flutter module, which I actually never tested... Anyway, this should be fixed in the next release 👍

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

3 participants