Files
yinmeng-ios/xplan-ios/Appdelegate/AppDelegate+ThirdConfig.m

47 lines
1.4 KiB
Mathematica
Raw Normal View History

2021-09-13 18:56:16 +08:00
//
// AppDelegate+ThirdConfig.m
// xplan-ios
//
// Created by on 2021/9/13.
//
#import "AppDelegate+ThirdConfig.h"
///Third
#import <ShareSDK/ShareSDK.h>
2021-10-21 12:01:21 +08:00
#import <NIMSDK/NIMSDK.h>
2021-09-13 18:56:16 +08:00
///Tool
#import "XPConstant.h"
2021-11-16 19:56:37 +08:00
#import "CustomAttachmentDecoder.h"
2021-09-13 18:56:16 +08:00
@implementation AppDelegate (ThirdConfig)
///
- (void)initThirdConfig {
[self configShareSDK];
2021-10-21 12:01:21 +08:00
[self configNIMSDK];
2021-09-13 18:56:16 +08:00
}
- (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];
}];
}
2021-10-21 12:01:21 +08:00
- (void)configNIMSDK {
// NIMSDK
NSString *appKey = KeyWithType(KeyType_NetEase);
NIMSDKOption *option = [NIMSDKOption optionWithAppKey:appKey];
option.apnsCername = KeyWithType(KeyType_APNSCer);
[[NIMSDK sharedSDK] registerWithOption:option];
2021-11-16 19:56:37 +08:00
// NIM SDK
[NIMCustomObject registerCustomDecoder:[[CustomAttachmentDecoder alloc] init]];
2021-10-21 12:01:21 +08:00
}
2021-09-13 18:56:16 +08:00
@end