使用iOS中的Firebase和Geolocator(或任何Swift插件)构建错误(Flutter)
我正在尝试使用Firebase和Geolocator插件创建一个颤动的应用程序。
- 我将使用Firebase插件进行身份validation ,使用RTDB和FCM 。
- Geolocator显然是一个非常可靠的位置感知插件。
在Android中,一切都很好 – 一切都很棒!
但是在iOS中,我无法构建应用程序,错误:
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.
据我所知 ,使用Firebase插件需要你不要使用_frameworks! 在Podfile中。 显然,当Geolocator在iOS部分使用Swift代码时, 它需要你使用use_frameworks! 在Podfile中。
我知道我可以使用另一个GPS插件,例如Location ,但是因为它适用于任何Swift代码插件,我的问题是:
使用Flutter,是否可以将Firebase与任何Swift插件一起使用?
我不是这方面的专家,但看起来在Podfile
指定Swift版本可能会解决上面提到的错误。 您可以通过添加以下行来执行此操作:
config.build_settings['SWIFT_VERSION'] = '4.1'
它应该是post_install
块的一部分,如下所示:
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ENABLE_BITCODE'] = 'NO' config.build_settings['SWIFT_VERSION'] = '4.1' end end end
- 如何让函数在AFHTTPRequestOperation完成后返回
- iOS – 按区域设置更改UIDatePicker的语言
- 通用二进制文件是否包含iPhone上App Bundle中的所有重磅ipadgraphics? 该怎么办?
- “aps-environment”具有配置文件不允许的值
- 在UIScrollView中像“移动和缩放”一样裁剪UIImage
- iOS:UIBezierPath和CAShapeLayer fillRule
- 滚动到UICollectionView中的下一个单元格
- locking屏幕上的基于信标的应用程序build议未在iOS 10中显示
- 我如何限制一个iOS应用程序只有4英寸的屏幕设备?