ZaraclaJ / audio_recorder

Other
180 stars 127 forks source link

"Swift Language Version" error when building for iPhone #8

Closed riccardoratta closed 5 years ago

riccardoratta commented 6 years ago

Cannot build my project after including audio_recorder: "^0.0.2".

Launching lib/main.dart on iPhone 5s in debug mode...
Skipping compilation. Fingerprint match.
Xcode build done.
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor.
Could not build the application for the simulator.
Error launching application on iPhone 5s.
Exited (sigterm)
takaoandrew commented 6 years ago

I'm getting this same issue. Most suggested answers say to go to 'build settings' -> 'swift language version' but I can't find 'swift language version' anywhere in my project https://stackoverflow.com/questions/46338588/xcode-9-swift-language-version-swift-version?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

riccardoratta commented 6 years ago

Have you also tried to manually add the SWIFT_VERSION value (from an answer in the page you linked) to your Xcode project? In my case I preferred to generate a new project with the command: flutter create -i swift project_name to have fully compatibility for swift (I fear that soon Objective-C will become obsolete for iOS). Let me know how you fixed!

CRJFisher commented 5 years ago

Have you also tried to manually add the SWIFT_VERSION value (from an answer in the page you linked) to your Xcode project? In my case I preferred to generate a new project with the command: flutter create -i swift project_name to have fully compatibility for swift (I fear that soon Objective-C will become obsolete for iOS). Let me know how you fixed!

Also, if you have an existing project, you can delete the ios directory and recreate with swift setup with: flutter create -i swift .

riccardoratta commented 5 years ago

With Flutter 1.7.8+hotfix.4 and audio_recorder ^1.0.1 the project created with flutter create -i swift project_name it's working.