第三方登录
This commit is contained in:
17
xplan-ios/Appdelegate/AppDelegate+ThirdConfig.h
Normal file
17
xplan-ios/Appdelegate/AppDelegate+ThirdConfig.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// AppDelegate+ThirdConfig.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/13.
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AppDelegate (ThirdConfig)
|
||||
/// 初始化一些第三方配置
|
||||
- (void)initThirdConfig;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
32
xplan-ios/Appdelegate/AppDelegate+ThirdConfig.m
Normal file
32
xplan-ios/Appdelegate/AppDelegate+ThirdConfig.m
Normal file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// AppDelegate+ThirdConfig.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/13.
|
||||
//
|
||||
|
||||
#import "AppDelegate+ThirdConfig.h"
|
||||
///Third
|
||||
#import <ShareSDK/ShareSDK.h>
|
||||
///Tool
|
||||
#import "XPConstant.h"
|
||||
|
||||
@implementation AppDelegate (ThirdConfig)
|
||||
|
||||
|
||||
/// 初始化一些第三方配置
|
||||
- (void)initThirdConfig {
|
||||
[self configShareSDK];
|
||||
}
|
||||
|
||||
- (void)configShareSDK {
|
||||
[ShareSDK registPlatforms:^(SSDKRegister *platformsRegister) {
|
||||
//QQ
|
||||
NSString *universalLink = @"https://6cqhk.share2dlink.com/";
|
||||
NSString *qqUniversalLink = @"https://6cqhk.share2dlink.com/qq_conn/101937205";
|
||||
[platformsRegister setupQQWithAppId:KeyWithType(KeyType_QQAppid) appkey:KeyWithType(KeyType_QQSecret) enableUniversalLink:YES universalLink:qqUniversalLink];
|
||||
[platformsRegister setupWeChatWithAppId:KeyWithType(KeyType_WechatAppid) appSecret:KeyWithType(KeyType_WechatSecret) universalLink:universalLink];
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
15
xplan-ios/Appdelegate/AppDelegate.h
Normal file
15
xplan-ios/Appdelegate/AppDelegate.h
Normal file
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// AppDelegate.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by zu on 2021/8/31.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
|
||||
@end
|
||||
|
33
xplan-ios/Appdelegate/AppDelegate.m
Normal file
33
xplan-ios/Appdelegate/AppDelegate.m
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// AppDelegate.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by zu on 2021/8/31.
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
#import "TabbarViewController.h"
|
||||
#import "BaseNavigationController.h"
|
||||
#import "FlutterBoost+Xplan.h"
|
||||
#import "AppDelegate+ThirdConfig.h"
|
||||
|
||||
@interface AppDelegate ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
|
||||
[[FlutterBoost instance] setup:application];
|
||||
TabbarViewController *vc = [[TabbarViewController alloc] init];
|
||||
BaseNavigationController *bnc = [[BaseNavigationController alloc] initWithRootViewController:vc];
|
||||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
self.window.rootViewController = bnc;
|
||||
[self.window makeKeyAndVisible];
|
||||
///初始化一些 sdk配置
|
||||
[self initThirdConfig];
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
Reference in New Issue
Block a user