Closed Livinglist closed 5 years ago
Getting the same error :
`esys_flutter_share` 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. Error output from CocoaPods:
Same here.
Unable to determine Swift version for the following pods:
- `esys_flutter_share` 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.
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer/xcode/target_validator.rb:115:in `verify_swift_pods_swift_version'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer/xcode/target_validator.rb:37:in `validate!'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:459:in `validate_targets'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:138:in `install!'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/command/install.rb:48:in `run'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/bin/pod:55:in `<top (required)>'
/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `load'
/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `<main>'
Error output from CocoaPods:
↳
[!] 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 8.
Solution: Follow this link to add swift to your project and add this block in your Podfile.
target 'Runner' do
use_frameworks! # required by simple_permission
...
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.0' # required by simple_permission
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
I did edit the file, still, it gives me the same error.
@idurvesh Please follow below steps :
In this case bridging header must be created. 1.Open the project with XCode. Then choose File -> New -> File -> Swift File. A dialog will be displayed when creating the swift file(Since this file is deleted, any name can be used.). XCode will ask you if you wish to create Bridging Header, click yes. 2.Make sure you have use_frameworks! in the Runner block, in ios/Podfile。
@idurvesh Please follow below steps :
In this case bridging header must be created. 1.Open the project with XCode. Then choose File -> New -> File -> Swift File. A dialog will be displayed when creating the swift file(Since this file is deleted, any name can be used.). XCode will ask you if you wish to create Bridging Header, click yes. 2.Make sure you have use_frameworks! in the Runner block, in ios/Podfile。
- Make sure you have SWIFT_VERSION 4.2 selected in you XCode -> Build Settings 4.Do flutter clean
- Go to your ios folder, delete Podfile.lock and Pods folder and then execute pod install --repo-update
What is the name of Swift file that i need to created and where i need to located it, can you help me pls ?
After following these steps,Xcode will automatically generate the bridge header file in the workspace.
@idurvesh Please follow below steps :
In this case bridging header must be created. 1.Open the project with XCode. Then choose File -> New -> File -> Swift File. A dialog will be displayed when creating the swift file(Since this file is deleted, any name can be used.). XCode will ask you if you wish to create Bridging Header, click yes. 2.Make sure you have use_frameworks! in the Runner block, in ios/Podfile。
- Make sure you have SWIFT_VERSION 4.2 selected in you XCode -> Build Settings 4.Do flutter clean
- Go to your ios folder, delete Podfile.lock and Pods folder and then execute pod install --repo-update
it works for me
@idurvesh Please follow below steps :
In this case bridging header must be created. 1.Open the project with XCode. Then choose File -> New -> File -> Swift File. A dialog will be displayed when creating the swift file(Since this file is deleted, any name can be used.). XCode will ask you if you wish to create Bridging Header, click yes. 2.Make sure you have use_frameworks! in the Runner block, in ios/Podfile。
- Make sure you have SWIFT_VERSION 4.2 selected in you XCode -> Build Settings 4.Do flutter clean
- Go to your ios folder, delete Podfile.lock and Pods folder and then execute pod install --repo-update
this works!!! thank you very much
@idurvesh Please follow below steps :
In this case bridging header must be created. 1.Open the project with XCode. Then choose File -> New -> File -> Swift File. A dialog will be displayed when creating the swift file(Since this file is deleted, any name can be used.). XCode will ask you if you wish to create Bridging Header, click yes. 2.Make sure you have use_frameworks! in the Runner block, in ios/Podfile。
- Make sure you have SWIFT_VERSION 4.2 selected in you XCode -> Build Settings 4.Do flutter clean
- Go to your ios folder, delete Podfile.lock and Pods folder and then execute pod install --repo-update
thank you..
ENV['SWIFT_VERSION'] = '5'
at the top of the podfile fixed the issue.
I am using
esys_flutter_share 1.0.1
and when I was building for iOS, the error was thrown. Console shows