lxy 1 year ago
parent
commit
6e677d6fe4
1 changed files with 17 additions and 59 deletions
  1. 17 59
      USEREDME.md

+ 17 - 59
USEREDME.md

@@ -1,69 +1,27 @@
 # LenzSDK
-
-## 集成
-
-### 一. 手动集成
-1. 集成
-    1)、找到目标文件 http://39.96.8.150:10080/l405023944/Lenz.git
-    Lenz->ios->SDK 将SDK文件目录copy至工程文件同级目录(即worksapce文件同级目录)
-    2)、podfile引入SDK(本地路径方式源码引入)
-    ```
-      pod 'LenzCameraNativeModuleForRN', :path => './SDK/LenzCameraNativeModuleForRN'
-    
-    ```
-    3)、执行pod install
-
-2. 使用
-
-1)、在需要使用到SDK能力的地方
+由于SDK不支持bitcode,需要工程在工程TARGET Build Setting中设置Enable Bitcode设置为NO
+## 自动集成 podfile 指定私有源Source、指定使用版本
 ```
-#import "PCSBaseViewController.h"
-```
-2)、使用
-1.初始化PCSBaseViewController initWithParams入参params及SDK回调
-2.进入页面(push或present)由于该回调为异步线程,需回到主线程操作
-```
-  if (!NSThread.isMainThread) {
-      dispatch_async(dispatch_get_main_queue(), ^{
-        PCSBaseViewController* controller = [PCSBaseViewController initWithParams:params complete:^(NSDictionary * _Nonnull dict) {
-          resolve(dict);
-        }];
-          controller.modalPresentationStyle = UIModalPresentationFullScreen;
-      //    controller.semaphore = semaphore;
-      //    __block NSMutableDictionary *event = [NSMutableDictionary dictionary];
-      //    controller.completeBlock = ^(NSDictionary * _Nonnull dict) {
-      //    };
-          [((AppDelegate*)([UIApplication sharedApplication].delegate)).window.rootViewController presentViewController:controller animated:YES completion:^{}];
-      });
-  }
+ platform :ios, '12.0'
+source 'https://github.com/CocoaPods/Specs.git'
+source 'http://39.96.8.150:10080/l405023944/LenzSDK_iOS.git'
+target 'Demo' do
+  pod 'LenzSDK' ,'~> 1.0.0'
+end
 
 ```
 
+## 使用
+1. 导入头文件
+```
+#import <LenzSDK/LenzCameraSDK.h>
 
+```
+2. 使用SDK
 
-   
-### 二、cocoaPod集成(待完成)
-1. cocoaPod集成(待完成)
-1)pod 'LenzCameraNativeModuleForRN', '1.0.0'
-2) 执行pod install
-
-2. 使用 方式同 一 (手动集成)
-
-
-
-
-
-### RN脚本
 
-1.导入脚本
-Podfile_ReactNative.rb
-2.podfile 执行脚本
 ```
-    # 导入我们自定义的脚本
-    require_relative './Podfile_ReactNative'
-    # 执行我们编写的RN环境检测代码
-    installReactNativeSdk()
-    # 设置RN配置 依赖,这里需要注意,不要使用 ../node_modules/,而是../RNCode/node_modules/
-    require_relative './RNCode/node_modules/react-native/scripts/react_native_pods'
-    require_relative './RNCode/node_modules/@react-native-community/cli-platform-ios/native_modules'
+    [LenzCameraSDK showCameraSDKWithParams:dict presentVC:self complete:^(NSDictionary * _Nonnull dict) {
+        //数据回调,业务使用
+    }];
 ```