Update README.md

master
finogeeksdev 2020-03-15 19:18:44 +08:00 committed by GitHub
parent 3cc2c98971
commit 3a212121ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 42 additions and 0 deletions

View File

@ -1,2 +1,44 @@
# mop-ios-demo
mop
### 2.1 iOS快速集成
1 PodfileFinApplet
```
source 'https://github.com/CocoaPods/Specs.git'
pod 'FinApplet'
```
2 SDK ****
AppDelegate SDK
```
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
NSString *appKey = @"SDKKEY";
FATConfig *config = [FATConfig configWithAppSecret:@"SECRET" appKey:appKey];
config.apiServer = @"https://mp.finogeeks.com";
config.apiPrefix = @"/api/v1/mop";
[[FATClient sharedClient] initWithConfig:config error:nil];
return YES;
}
```
3
```
NSString *appId = @"小程序id";
//
[[FATClient sharedClient] startRemoteApplet:appId startParams:nil InParentViewController:self completion:^(BOOL result, NSError *error) {
NSLog(@"result:%d---error:%@", result, error);
}];
```
* **SDKKEY** **Secret**
* **apiServer** **IP:**
* **id** appid
* [https://mp.finogeeks.com](https://mp.finogeeks.com)
* [iOS](https://mp.finogeeks.com/mop/document/runtime-sdk/sdk-integrate/ios.html)