From 6859cf3cb6b546fcfd27311713999491e089e945 Mon Sep 17 00:00:00 2001 From: wanghualei Date: Wed, 4 Nov 2020 10:54:48 +0800 Subject: [PATCH] update demo --- Podfile | 1 + demo.xcodeproj/project.pbxproj | 6 ++++-- demo/AppDelegate.m | 4 ++-- demo/ViewController.m | 23 ++--------------------- 4 files changed, 9 insertions(+), 25 deletions(-) diff --git a/Podfile b/Podfile index 7c79955..09adb97 100644 --- a/Podfile +++ b/Podfile @@ -7,6 +7,7 @@ inhibit_all_warnings! target "demo" do pod 'FinApplet' + pod 'FinAppletExt' end diff --git a/demo.xcodeproj/project.pbxproj b/demo.xcodeproj/project.pbxproj index ffe0634..c6f941d 100644 --- a/demo.xcodeproj/project.pbxproj +++ b/demo.xcodeproj/project.pbxproj @@ -342,11 +342,12 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = demo/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.mop.demo; + PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.finclip.demo; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -359,11 +360,12 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = demo/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.mop.demo; + PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.finclip.demo; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; }; diff --git a/demo/AppDelegate.m b/demo/AppDelegate.m index 696b8ee..f2b6efb 100644 --- a/demo/AppDelegate.m +++ b/demo/AppDelegate.m @@ -21,8 +21,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. - NSString *appKey = @"22LyZEib0gLTQdU3MUauAVUHSFDdTToYDWCqr0AgPGwA"; - FATConfig *config = [FATConfig configWithAppSecret:@"8c5c3c26420b7e66" appKey:appKey]; + NSString *appKey = @"22LyZEib0gLTQdU3MUauATBwgfnTCJjdr7FCnywmAEM="; + FATConfig *config = [FATConfig configWithAppSecret:@"bdfd76cae24d4313" appKey:appKey]; config.apiServer = @"https://mp.finogeeks.com"; config.apiPrefix = @"/api/v1/mop"; diff --git a/demo/ViewController.m b/demo/ViewController.m index 4e3bef2..824747a 100644 --- a/demo/ViewController.m +++ b/demo/ViewController.m @@ -19,12 +19,6 @@ [super viewDidLoad]; // Do any additional setup after loading the view. - UIButton *btn1 = [[UIButton alloc] initWithFrame:CGRectMake(100, 100, 200, 40)]; - [btn1 setTitle:@"打开画图小程序" forState:UIControlStateNormal]; - [btn1 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; - [btn1 setBackgroundColor:[UIColor grayColor]]; - [btn1 addTarget:self action:@selector(onCanvasClick:) forControlEvents:UIControlEventTouchUpInside]; - UIButton *btn2 = [[UIButton alloc] initWithFrame:CGRectMake(100, 150, 200, 40)]; [btn2 setTitle:@"打开官方小程序" forState:UIControlStateNormal]; [btn2 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; @@ -37,26 +31,13 @@ [btn3 setBackgroundColor:[UIColor grayColor]]; [btn3 addTarget:self action:@selector(onProfileClick:) forControlEvents:UIControlEventTouchUpInside]; - [self.view addSubview:btn1]; [self.view addSubview:btn2]; [self.view addSubview:btn3]; } -- (void)onCanvasClick:(id)sender { - - NSString *appId = @"5ea03fa563cb900001d73863"; - // 打开小程序 - [[FATClient sharedClient] startRemoteApplet:appId startParams:@{ - @"path": @"/pages/index/index", - @"query": @"" - } InParentViewController:self completion:^(BOOL result, NSError *error) { - NSLog(@"result:%d---error:%@", result, error); - }]; -} - - (void)onDemoClick:(id)sender { - NSString *appId = @"5ea0401463cb900001d73865"; + NSString *appId = @"5fa214a29a6a7900019b5cc1"; // 打开小程序 [[FATClient sharedClient] startRemoteApplet:appId startParams:nil InParentViewController:self completion:^(BOOL result, NSError *error) { NSLog(@"result:%d---error:%@", result, error); @@ -65,7 +46,7 @@ - (void)onProfileClick:(id)sender { - NSString *appId = @"5ea0412663cb900001d73867"; + NSString *appId = @"5fa215459a6a7900019b5cc3"; // 打开小程序 [[FATClient sharedClient] startRemoteApplet:appId startParams:nil InParentViewController:self completion:^(BOOL result, NSError *error) { NSLog(@"result:%d---error:%@", result, error);