flutter,引入simple_permissions依赖后,ios编译报错simple_permissions-Swift.h' file not found

报错:

    === BUILD TARGET url_launcher OF PROJECT Pods WITH CONFIGURATION Debug ===

    /Users/liyan/software/flutter/.pub-cache/hosted/pub.flutter-io.cn/simple_permissions-0.1.9/ios/Classes/SimplePermissionsPlugin.m:2:9: fatal error: ‘simple_permissions/simple_permissions-Swift.h’ file not found

    #import <simple_permissions/simple_permissions-Swift.h>

            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    1 error generated.

 

解决方法:

进入flutter_project/ios/,编辑Podfile,将

# platform :ios, ‘9.0’

替换为:

platform :ios, '10.0'
use_frameworks!

关键是use_frameworks! 

 

参考: https://github.com/Ethras/flutter_simple_permissions/issues/51#issuecomment-434648578

    原文作者:picc程序员
    原文地址: https://blog.csdn.net/weixin_39655625/article/details/86573398
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞