简体   繁体   English

flutter简单权限android版本比较和iOS path_provider错误

[英]flutter simple permissions android version compare and iOS path_provider error

I am used Flutter Simple Permissions plugin in my app but I have a some issues with it. 我在我的应用程序中使用了Flutter Simple Permissions插件,但是它有一些问题。

1.) When i run app on android 6 and higher version there is no problem but when i run it on android 5 execution stopped on " SimplePermissions.checkPermission " and only showing console message " Checking permission: android.permission.WRITE_EXTERNAL_STORAGE " so my question is that how to compare android version in flutter? 1.)当我在android 6和更高版本上运行应用程序时没有问题,但是当我在android 5上运行它时,执行在“ SimplePermissions.checkPermission ”上停止,并且仅显示控制台消息“ CheckingPermission:android.permission.WRITE_EXTERNAL_STORAGE ”,因此我问题是如何在flutter中比较android版本?

2.) how to determine if the user checked “ Never ask again ”? 2.)如何确定用户是否勾选了“ 不再询问 ”? and ask for open app settings 并要求打开应用设置

3.) Error with iOS permissions " BUILD TARGET path_provider OF PROJECT Pods WITH CONFIGURATION Debug " 3.)iOS权限错误“ 带有配置调试的PROJECT Pod的BUILD TARGET path_provider

Console Message: === BUILD TARGET path_provider OF PROJECT Pods WITH CONFIGURATION Debug === /Users/home/Library/Android/flutter/.pub-cache/hosted/pub.dartlang.org/simple_permissions-0.1.9/ios/Classes/SimplePermissionsPlugin.m:2:9: fatal error: 'simple_permissions/simple_permissions-Swift.h' file not found #import ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. 控制台消息:===使用配置调试的项目Pod的内置目标path_provider === /Users/home/Library/Android/flutter/.pub-cache/hosted/pub.dartlang.org/simple_permissions-0.1.9/ios/类/SimplePermissionsPlugin.m:2:9:致命错误:找不到'simple_permissions / simple_permissions-Swift.h'文件#import ^ ~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ 1错误产生。

I am new with flutter so please help me if any one know about it. 我是新手,所以如果有人知道,请帮助我。 Thanks advanced. 谢谢先进。

please try this edits in Podfile Code needs to be added or edited are marked with "** ...... **" 请尝试在Podfile代码中进行此编辑,需要添加或编辑代码时标有“ ** ...... **”

target 'Runner' do
  ** use_frameworks!  **


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.0' **
        end
      end
    end

delete your Podfile.lock and try 删除您的Podfile.lock并尝试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM