xcode 构建错误
Closed this issue · 2 comments
songshitong commented
你好,我集成sona 0.0.9后,出现xcode构建错误
这是flutter version
Flutter 1.2.0 • channel dev • https://github.com/flutter/flutter.git
Framework • revision 06b979c4d5 (3 weeks ago) • 2019-01-25 14:27:35 -0500
Engine • revision 36acd02c94
Tools • Dart 2.1.1 (build 2.1.1-dev.3.2 f4afaee422)
下面是报错日志
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
While building module 'sona' imported from
FlutterWorkspace/ofp_flutter/ios/Runner/GeneratedPluginRegistrant.m:15:
In file included from <module-includes>:1:
In file included from FlutterWorkspace/ofp_flutter/build/ios/Debug-iphonesimulator/sona/sona.framework/Headers/sona-umbrella.h:13:
FlutterWorkspace/ofp_flutter/build/ios/Debug-iphonesimulator/sona/sona.framework/Headers/SonaPlugin.h:2:9: error: include of non-modular header inside framework module 'sona.SonaPlugin': 'FlutterWorkspace/ofp_flutter/ios/Pods/GTSDK/GTSDK.framework/Headers/GeTuiSdk.h' [-Werror,-Wnon-modular-include-in-framework-module]
#import "GTSDK/GeTuiSdk.h"
^
1 error generated.
FlutterWorkspace/ofp_flutter/ios/Runner/GeneratedPluginRegistrant.m:15:9: fatal error: could not build module 'sona'
#import <sona/SonaPlugin.h>
~~~~~~~^
2 errors generated.
Could not build the application for the simulator.
Error launching application on iPhone XR.
JarvanMo commented
swift?
songshitong commented
问题解决了,是编译的问题
1 Flutter/Flutter.h not found
https://www.jianshu.com/p/e4698b2ebe51
2 Include of non-modular header inside framework module
https://www.jianshu.com/p/7ab5f69a47ec
问题代码
#import <Flutter/Flutter.h>
#import "GTSDK/GeTuiSdk.h"
#import <Flutter/Flutter.h>
#import "GTSDK/GeTuiSdk.h"
#import <PushKit/PushKit.h>
#import <UserNotifications/UserNotifications.h>
@interface SonaPlugin : UIResponder <FlutterPlugin, PKPushRegistryDelegate, GeTuiSdkDelegate,UNUserNotificationCenterDelegate>
+ (instancetype) sonaPlugin;
@end