fluttercandies / flutter_filereader

Flutter实现的本地文件(pdf word excel 等)查看插件,非在线预览
Other
109 stars 51 forks source link

flutter_filereader-Swift.h 找不到这个文件 #41

Open oliverzyh opened 3 years ago

oliverzyh commented 3 years ago

/Users/gainer/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_filereader-2.2.0/ios/Classes/FlutterFileReaderPlugin.m:2:9: fatal error: 'flutter_filereader/flutter_filereader-Swift.h' file not found

zhangzhengithubs commented 3 years ago

解决了吗

zhangzhengithubs commented 3 years ago

我的也遇到了

ZXQ-Kyle commented 3 years ago

我的解决方法: 1、as中编辑FlutterFileReaderPlugin.m文件,源代码这里第一行多了一个回车

#import "FlutterFileReaderPlugin.h"
#import <flutter_filereader/flutter_filereader-Swift.h>

@implementation FlutterFileReaderPlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
  [SwiftFlutterFileReaderPlugin registerWithRegistrar:registrar];
}
@end

2、在xcode中检查该文件是否一致,不是的话就改成一致的

moQingTing commented 2 years ago

我遇到这个问题是因为使用模拟器运行,真机运行不会有问题