phizclip-ios-demo/FinDemo/AppDelegate.m

69 lines
2.2 KiB
Objective-C
Raw Normal View History

2023-05-31 11:00:11 +08:00
//
// AppDelegate.m
// FinDemo
//
// Created by 胡健辉 on 2023/5/29.
//
#import "AppDelegate.h"
#import <FinApplet/FinApplet.h>
2023-06-01 15:26:07 +08:00
/*
SDK
bundleidsdkKeysdkSecretbundleidSDK
*/
2023-05-31 11:00:11 +08:00
static NSString *sdkKey1 = @"22LyZEib0gLTQdU3MUauATBwgfnTCJjdr7FCnywmAEM=";
static NSString *sdkSecret1 = @"bdfd76cae24d4313";
static NSString *apiServer1 = @"https://api.finclip.com";
2023-06-01 15:26:07 +08:00
static NSString *sdkKey2 = @"";
static NSString *sdkSecret2 = @"";
static NSString *apiServer2 = @"";
2023-05-31 11:00:11 +08:00
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[NSClassFromString(@"ViewController") new]];
[self.window makeKeyAndVisible];
NSMutableArray *storeArrayM = [NSMutableArray array];
2023-06-01 15:26:07 +08:00
FATStoreConfig *storeConfig1 = [[FATStoreConfig alloc] init];
storeConfig1.sdkKey = sdkKey1;
storeConfig1.sdkSecret = sdkSecret1;
storeConfig1.apiServer = apiServer1;
storeConfig1.cryptType = FATApiCryptTypeSM;
[storeArrayM addObject:storeConfig1];
/*
,SDK
*/
// FATStoreConfig *storeConfig2 = [[FATStoreConfig alloc] init];
// storeConfig2.sdkKey = sdkKey2;
// storeConfig2.sdkSecret = sdkSecret2;
// storeConfig2.apiServer = apiServer2;
// storeConfig2.cryptType = FATApiCryptTypeSM;
// [storeArrayM addObject:storeConfig2];
2023-05-31 11:00:11 +08:00
FATConfig *config = [FATConfig configWithStoreConfigs:storeArrayM];
/*
FATClient
*/
BOOL result = [[FATClient sharedClient] initWithConfig:config error:nil];
NSLog(@"注册SDK%@", result? @"成功" : @"失败");
return YES;
}
@end