您的当前位置:首页正文

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

2024-11-07 来源:个人技术集锦

报错:

    === 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! 
 

Top