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

- speech_to_text does not specify a Swift version and none of the targets (Runner) integrating it have the SWIFT_VERSION attribute set. #88

Closed
DilrukshiRajapakshe opened this issue May 15, 2020 · 8 comments

Comments

@DilrukshiRajapakshe
Copy link

When I try to run a project in iso simulator given this error. How can I overcome it?

Resolving dependencies of Podfile
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update

Comparing resolved specification to the sandbox manifest
  A Flutter
  A speech_to_text

Downloading dependencies

-> Installing Flutter (1.0.0)

-> Installing speech_to_text (0.0.1)
  - Running pre install hooks
[!] Unable to determine Swift version for the following pods:

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

Error running pod install
Error launching application on iPhone SE (2nd generation).

@ichitaka
Copy link

Same problem here

@sowens-csd
Copy link
Contributor

Looks like you're possibly using a very old Flutter version (1.0.0). Assuming that's true I'd suggest that you update Flutter and try again.

@DilrukshiRajapakshe
Copy link
Author

DilrukshiRajapakshe commented May 18, 2020

  • The Flutter version is up to date.

Flutter 1.17.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f7a6a7906b (6 days ago) • 2020-05-12 18:39:00 -0700
Engine • revision 6bc433c6b6
Tools • Dart 2.8.2

  • This error is given.

Launching lib/main.dart on iPhone SE (2nd generation) in debug mode...
Running pod install... 1.3s
CocoaPods' output:

Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `speech_to_text` from `.symlinks/plugins/speech_to_text/ios`

Resolving dependencies of `Podfile`
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update

Comparing resolved specification to the sandbox manifest
  A Flutter
  A speech_to_text

Downloading dependencies

-> Installing Flutter (1.0.0)

-> Installing speech_to_text (0.0.1)
  - Running pre install hooks
[!] Unable to determine Swift version for the following pods:

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

Error output from CocoaPods:

[!] `<PBXGroup UUID=`97C146E51CF9000F007C117D`>` attempted to initialize an object with an unknown UUID. `CF3B75C9A7D2FA2A4C99F110` for attribute: `children`. This can be the result of a merge and the unknown UUID is being discarded.

[!] Automatically assigning platform `iOS` with version `8.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`.

Error running pod install
Error launching application on iPhone SE (2nd generation).

@sowens-csd
Copy link
Contributor

I think what's happening is that your project supports Objective-C but not Swift. Was the project created a while ago? Newer versions of Flutter use Swift by default so new projects work properly without tweaks.

Can you see if any of these help resolve the issue and if they do let me know which helped?

#45
https://stackoverflow.com/questions/54912188/flutter-plugin-ios-build-fail/54919007https://github.com/flutter/flutter/issues/25676

@DilrukshiRajapakshe
Copy link
Author

@sowens-csd are you right. Thank you so much.

@tedserdel
Copy link

@DilrukshiRajapakshe

I am experiencing the same error in Android Studio when launching lib/main.dart on iPhone SE (2nd generation) in debug mode. I used the Example code from the 'speech_to_text' package.

How did you resolve the error? I checked #45 but I may have missed some parts. I am relatively new to Flutter and Dart.

@DilrukshiRajapakshe
Copy link
Author

Because, when a creating project you didn't provide a swift suport. tick the cheak box button of swift suport when your are creating in your flutter project.

@tedserdel
Copy link

I couldn’t find where to turn on Swift Compiler - Language. Instead, I just created a new project using the Terminal App.

  1. On terminal app, I typed “Flutter create myapp”
  2. Checked the project by opening “Runner.xcodeproj” file is under USER/myapp/ios
  3. Tap Runner then find the Build Setting tab and look for Swift Compiler - Language, it should be set to Swift 5
  4. On Android Studio open a file and browse for the “myapp” folder and open it.
  5. Follow the “speech_to_text” installation instructions and permissions required for speech recognition.
  6. Swap the code with the Example from the “speech_to_text” package.
  7. Add onPressed and setState in the IconButton (error)

Just wanted to add it as a comment and hope I helps someone like myself that is just starting out.

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants