line / flutter_line_sdk

A Flutter plugin that lets developers access LINE's native SDKs in Flutter apps with Dart.
https://developers.line.biz/
Apache License 2.0
213 stars 43 forks source link

flutter line sdk-1.3.0 'flutter line sdk/flutter line sdk-Swift.h' file not found #61

Closed JW-chenjingwei closed 2 years ago

JW-chenjingwei commented 2 years ago

sdk版本:line sdk-1.3.0

看了文档要求使用use_frameworks!,但是项目已经被禁止使用use_frameworks!,改用了use_modular_headers!,所以会一直报这个错误, 建议: 在FlutterLineSdkPlugin.m文件更改:

#import "FlutterLineSdkPlugin.h"

#if __has_include( <flutter_line_sdk/flutter_line_sdk-Swift.h>)
#import <flutter_line_sdk/flutter_line_sdk-Swift.h>
#else
// Support project import fallback if the generated compatibility header
// is not copied when this plugin is created as a library.
// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816
#import "flutter_line_sdk-Swift.h"

#endif
@implementation FlutterLineSdkPlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
  [SwiftFlutterLineSdkPlugin registerWithRegistrar:registrar];
}
@end

可以更新个小版本吗?

onevcat commented 2 years ago

Oh. I will check and see if it is a workable solution. Thanks for the feedback!

onevcat commented 2 years ago

Should be solved in #62 and I will create a tag soon. Now the package should also support built as static library.

onevcat commented 2 years ago

Version 2.3.0 was released with support for the static library. For any existing users, this change should not cause any issue and the upgrade should be transparent.

https://pub.dev/packages/flutter_line_sdk/versions/2.3.0