按官网教程配置好后,还是不行。
参考转载来源。podfile 中添加
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
# 在这里添加👇🏻
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
## dart: PermissionGroup.camera
'PERMISSION_CAMERA=1',
# dart: PermissionGroup. photos
'PERMISSION_PHOTOS=1',
'PERMISSION_PHOTOS_ADD_ONLY=1',
# dart: [PermissionGroup. location, PermissionGroup. locationAlways, PermissionGroup. locationWhenInUse]
'PERMISSION_LOCATION=1',
# dart: PermissionGroup.mediaLibrary
'PERMISSION MEDIA LIBRARY=1'
]
end
end
end
网友评论