Files
yinmeng-ios/xplan-ios/Appdelegate/AppDelegate+ThirdConfig.m
2021-10-21 12:01:21 +08:00

43 lines
1.2 KiB
Objective-C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// AppDelegate+ThirdConfig.m
// xplan-ios
//
// Created by 冯硕 on 2021/9/13.
//
#import "AppDelegate+ThirdConfig.h"
///Third
#import <ShareSDK/ShareSDK.h>
#import <NIMSDK/NIMSDK.h>
///Tool
#import "XPConstant.h"
@implementation AppDelegate (ThirdConfig)
/// 初始化一些第三方配置
- (void)initThirdConfig {
[self configShareSDK];
[self configNIMSDK];
}
- (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];
}];
}
- (void)configNIMSDK {
//推荐在程序启动的时候初始化 NIMSDK
NSString *appKey = KeyWithType(KeyType_NetEase);
NIMSDKOption *option = [NIMSDKOption optionWithAppKey:appKey];
option.apnsCername = KeyWithType(KeyType_APNSCer);
[[NIMSDK sharedSDK] registerWithOption:option];
}
@end