美文网首页
flutter permission_handler调用iOS相

flutter permission_handler调用iOS相

作者: 从容到没边的优雅 | 来源:发表于2022-09-02 09:57 被阅读0次

    按官网教程配置好后,还是不行。
    参考转载来源。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
    
    

    相关文章

      网友评论

          本文标题:flutter permission_handler调用iOS相

          本文链接:https://www.haomeiwen.com/subject/jxvenrtx.html