Xcode 颤振:x27型;UIC应用程序';没有成员';openSettingsURLString';
我试图让geolocator 2.1.0插件与我的ios xcode项目一起工作,并在运行pod安装后出现以下2个错误 类型“UIApplication”没有成员“openSettingsURLString” 和 “OpenExternalURLOptionsKey”不是“UIApplication”的成员类型 采取的步骤Xcode 颤振:x27型;UIC应用程序';没有成员';openSettingsURLString';,xcode,flutter,Xcode,Flutter,我试图让geolocator 2.1.0插件与我的ios xcode项目一起工作,并在运行pod安装后出现以下2个错误 类型“UIApplication”没有成员“openSettingsURLString” 和 “OpenExternalURLOptionsKey”不是“UIApplication”的成员类型 采取的步骤 我打开一个新的颤振项目(无论是否选中“Swift支持”,都会出现错误)-获取默认应用程序 仅使用-:^2.1.0更新我的pubspec.yaml文件 运行“颤振包获取”和“吊
添加
使用\u框架您的(您的_项目)/ios/Podfile
中的target Runner中的code>
target 'Runner' do
use_frameworks! # required by Geolocator
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
较旧版本的地理定位器,如^1.6.3
,需要将SWIFT\u版本设置为4.0
或4.1
但是地理定位器版本2.1.0
,使用权限处理程序版本2.1.1
,这需要SWIFT\u版本4.2
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2' # required by Geolocator
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
我能够在我的应用程序中成功地构建和使用geoloator
version2.1.0
,使用flatter0.11.9
和Xcode10.1
添加使用框架您的(您的_项目)/ios/Podfile
中的target Runner中的code>
target 'Runner' do
use_frameworks! # required by Geolocator
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
较旧版本的地理定位器,如^1.6.3
,需要将SWIFT\u版本设置为4.0
或4.1
但是地理定位器版本2.1.0
,使用权限处理程序版本2.1.1
,这需要SWIFT\u版本4.2
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2' # required by Geolocator
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
我能够在我的应用程序中成功地构建和使用geoloator
版本2.1.0
,使用了flatter0.11.9
和Xcode10.1
感谢您的帮助。现在我发现“geologitor/geologitor Swift.h”文件没有找到“图书馆是用Swift编写的,项目是以Obj-c为基础的,这似乎是一个问题?将继续查找。但是您是否将use\u frameworks
与SWIFT\u版本
4.1相结合?是的,pod文件现在有两个更改。这就产生了上面评论中提到的新问题。再次感谢您的帮助。所以我需要更新到XCode 10+以获得Swift 4.2。另外,您是否创建了您的颤振项目,是否选中了“对Swift的支持”?(在颤振项目的初始创建时)感谢您的帮助。现在我发现“geologitor/geologitor Swift.h”文件没有找到“图书馆是用Swift编写的,项目是以Obj-c为基础的,这似乎是一个问题?将继续查找。但是您是否将use\u frameworks
与SWIFT\u版本
4.1相结合?是的,pod文件现在有两个更改。这就产生了上面评论中提到的新问题。再次感谢您的帮助。所以我需要更新到XCode 10+以获得Swift 4.2。另外,您是否创建了您的颤振项目,是否选中了“对Swift的支持”?(在颤振项目的初始创建时。)