提交 ef6d1cc2 authored 作者: JarvanMo's avatar JarvanMo

make some headers public

![logo](./arts/fluwx_logo.png) ![logo](./arts/fluwx_logo.png)
适用于Flutter的微信SDK,方便快捷。 适用于Flutter的微信SDK,方便快捷。
QQ群:892398530。
## 使用需知 ## 使用需知
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<string>weixin</string> <string>weixin</string>
<key>CFBundleURLSchemes</key> <key>CFBundleURLSchemes</key>
<array> <array>
<string>wxd930ea5d5a258f4f</string> <string>wxd5e28ea7718fd8a2</string>
</array> </array>
</dict> </dict>
</array> </array>
......
...@@ -23,7 +23,7 @@ class _MyAppState extends State<MyApp> { ...@@ -23,7 +23,7 @@ class _MyAppState extends State<MyApp> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
Fluwx.register(appId:"wxd930ea5d5a258f4f",doOnAndroid: true,doOnIOS: true,enableMTA: false); Fluwx.register(appId:"wxd5e28ea7718fd8a2",doOnAndroid: true,doOnIOS: true,enableMTA: false);
} }
// Platform messages are asynchronous, so we initialize in an async method. // Platform messages are asynchronous, so we initialize in an async method.
......
...@@ -13,7 +13,7 @@ BOOL handleOpenURLByFluwx = YES; ...@@ -13,7 +13,7 @@ BOOL handleOpenURLByFluwx = YES;
- (void)dealloc - (void)dealloc
{ {
[[NSNotificationCenter defaultCenter] removeObserver:self]; // [[NSNotificationCenter defaultCenter] removeObserver:self];
} }
+ (void)registerWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar { + (void)registerWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar {
...@@ -30,10 +30,10 @@ BOOL handleOpenURLByFluwx = YES; ...@@ -30,10 +30,10 @@ BOOL handleOpenURLByFluwx = YES;
- (instancetype)initWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar { - (instancetype)initWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar {
self = [super init]; self = [super init];
[[NSNotificationCenter defaultCenter] addObserver:self // [[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleOpenURL:) // selector:@selector(handleOpenURL:)
name:@"WeChat" // name:@"WeChat"
object:nil]; // object:nil];
if (self) { if (self) {
_fluwxShareHandler = [[FluwxShareHandler alloc] initWithRegistrar:registrar]; _fluwxShareHandler = [[FluwxShareHandler alloc] initWithRegistrar:registrar];
_fluwxAuthHandler = [[FluwxAuthHandler alloc] initWithRegistrar:registrar]; _fluwxAuthHandler = [[FluwxAuthHandler alloc] initWithRegistrar:registrar];
...@@ -84,6 +84,7 @@ BOOL handleOpenURLByFluwx = YES; ...@@ -84,6 +84,7 @@ BOOL handleOpenURLByFluwx = YES;
-(BOOL)handleOpenURL:(NSNotification *)aNotification { -(BOOL)handleOpenURL:(NSNotification *)aNotification {
if(handleOpenURLByFluwx){ if(handleOpenURLByFluwx){
NSString * aURLString = [aNotification userInfo][@"url"]; NSString * aURLString = [aNotification userInfo][@"url"];
NSURL * aURL = [NSURL URLWithString:aURLString]; NSURL * aURL = [NSURL URLWithString:aURLString];
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论