lxy 1 năm trước cách đây
mục cha
commit
120a3e41f4

+ 70 - 0
Example/Pods/Local Podspecs/LenzSDK.podspec.json

@@ -0,0 +1,70 @@
+{
+  "name": "LenzSDK",
+  "version": "1.0.8",
+  "summary": "A short description of LenzSDK.",
+  "description": "this  is the long description",
+  "homepage": "http://39.96.8.150:10080/l405023944/LenzSDK_iOS.git",
+  "license": {
+    "type": "MIT",
+    "file": "LICENSE"
+  },
+  "authors": {
+    "76930516@qq.com": "wangzhaowei1991@gmail.com"
+  },
+  "source": {
+    "git": "http://39.96.8.150:10080/l405023944/LenzSDK_iOS.git",
+    "tag": "1.0.8"
+  },
+  "platforms": {
+    "ios": "11.0"
+  },
+  "source_files": "LenzCameraNativeModuleForRN/Classes/**/*",
+  "resource_bundles": {
+    "LenzCameraNativeModuleForRN": [
+      "LenzCameraNativeModuleForRN/Assets/*.{png,jpeg,jpg,storyboard,xib,xcassets,strings,tflite}",
+      "LenzCameraNativeModuleForRN/Classes/inner/**/*.{png,jpeg,jpg,storyboard,xib,xcassets,strings}"
+    ]
+  },
+  "public_header_files": "LenzCameraNativeModuleForRN/Classes/headers/*.h",
+  "frameworks": [
+    "UIKit",
+    "MapKit",
+    "WebKit",
+    "AdSupport",
+    "Accelerate",
+    "MediaPlayer",
+    "CoreData",
+    "SystemConfiguration",
+    "CoreServices",
+    "AssetsLibrary",
+    "CoreTelephony",
+    "CoreMotion",
+    "Photos",
+    "AVFoundation",
+    "CoreMedia"
+  ],
+  "vendored_frameworks": [
+    "LenzTensorFlowSDK.framework",
+    "opencv2.framework",
+    "LenzStitchSDK.framework"
+  ],
+  "libraries": [
+    "sqlite3",
+    "c++",
+    "z"
+  ],
+  "dependencies": {
+    "Masonry": [
+      "1.1.0"
+    ],
+    "YYText": [
+
+    ],
+    "SVProgressHUD": [
+      "~> 2.2.5"
+    ],
+    "TensorFlowLite": [
+      "~> 1.13.1"
+    ]
+  }
+}

+ 61 - 6
Example/Pods/Pods.xcodeproj/project.pbxproj

@@ -15,7 +15,6 @@
 			dependencies = (
 			);
 			name = TensorFlowLite;
-			productName = TensorFlowLite;
 		};
 /* End PBXAggregateTarget section */
 
@@ -71,6 +70,7 @@
 		40B7B47B7B502516A205297033B80D22 /* Localizable.strings in Sources */ = {isa = PBXBuildFile; fileRef = 3DEFF5635EA7D20945B2F48768B2AAA4 /* Localizable.strings */; };
 		4100628200520015C6FC3F6B53A53A53 /* QuitMultipleModeAlertViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 21B8E03137BCF9F54F9CFE4277F7BEB7 /* QuitMultipleModeAlertViewController.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		411EEB22AF92299394B87F74D88D1460 /* PhotoAlbumModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BDEA7527A5E638AC420DC55A43D729CD /* PhotoAlbumModel.m */; };
+		43FB1194BE4F7755647BE583FE9DE8C9 /* PCSSessionWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = A17498484830BD5638E4AAE372DA3F34 /* PCSSessionWrapper.m */; };
 		44167A79BC1130104702B0B2749C955E /* SVIndefiniteAnimatedView.h in Headers */ = {isa = PBXBuildFile; fileRef = 833F599750CCF740A20A786D96528502 /* SVIndefiniteAnimatedView.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		4547326B38452A54A54B6BB4B10DE57E /* PhotoCollectionViewCell.xib in Sources */ = {isa = PBXBuildFile; fileRef = 24EDCA6C907B565CFCA6F153DACA1C08 /* PhotoCollectionViewCell.xib */; };
 		45A025C9E91F10658628F768D873642D /* AVCapturePhotoOutput+VersionAdaptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 46C5B9E72B8C325BE99EEB55A9C80A7A /* AVCapturePhotoOutput+VersionAdaptor.m */; };
@@ -102,7 +102,9 @@
 		65A7EEF17AF1C948906239F6A246E0FF /* NSLayoutConstraint+MASDebugAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6AF7755455F924245F4D6A2C617747 /* NSLayoutConstraint+MASDebugAdditions.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		67A58DFA526AC3A9A871F233A47DBFB8 /* AVCapturePhotoOutput+VersionAdaptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 459CD2883A08E917967B202825AE1427 /* AVCapturePhotoOutput+VersionAdaptor.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		67E5943679E464CD2079A8AFAD0732D1 /* SVIndefiniteAnimatedView.m in Sources */ = {isa = PBXBuildFile; fileRef = FF30174D85BCC340875C99BBC74425FB /* SVIndefiniteAnimatedView.m */; };
+		683F5CAD9E088A9CBDA18B5D5A01007D /* cpp-headers.h in Headers */ = {isa = PBXBuildFile; fileRef = 807AC0FC0795E04889BB0E08A81E043D /* cpp-headers.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		6868E309F99B12D1046CF67E5D4601D8 /* YYTextInput.m in Sources */ = {isa = PBXBuildFile; fileRef = 03580EB58D7084008ED15AFEFDDF44C5 /* YYTextInput.m */; };
+		692535448F10C176CBFBE177CE206EBF /* PCSSessionWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 023CA2B4CB726176D7130B2CDD464FD7 /* PCSSessionWrapper.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		69864DFE3EC290040D273D325FA0E089 /* MASConstraintMaker.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CD9F5FAE8AA1C9DC33B67DCE4D06112 /* MASConstraintMaker.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		6A162316CAEA8379A5DD1408C9F4C104 /* LenzCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = BDA9F250AB98999CB591E8E8EBC94C04 /* LenzCommon.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		6A93F1139D51CC7E5577AA5F665F7EDA /* LenzCameraSDK.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E4DDD2282B9B833AC55ABFA624EA06 /* LenzCameraSDK.m */; };
@@ -186,6 +188,7 @@
 		C9D2A74D78D033FB1869E3E2C474A853 /* PhotoCollectionViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = B7AB4AC08440486709D731A76D4922B1 /* PhotoCollectionViewCell.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		CA98C2A3810D3F5C4E6D4B7BA03E1E62 /* YYTextSelectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 75C28A6CE6DD09D0C90B842258501DCE /* YYTextSelectionView.m */; };
 		D0240C120E93A9A3EF0AF8D977F4B9F7 /* NSArray+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = FD729596A07430FFF4D8DBD49F18B935 /* NSArray+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Project, ); }; };
+		D0DC343DF898D9DA5386B2364B92110E /* AlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = B25E0B74E5939E2E46DA3E98F4247061 /* AlertView.m */; };
 		D37E7CD8B01422BC301EE7B1D8525260 /* UIImage+ext.h in Headers */ = {isa = PBXBuildFile; fileRef = 35712E9585B95297D6815A5724533055 /* UIImage+ext.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		D3D875F034EA672BEFA8CAE5E50C1D68 /* MASViewConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = F399DC89064A26DEE47CA1B9B31C3F60 /* MASViewConstraint.m */; };
 		D60F1EAD0E09B0ED80A7E9631E8B13E0 /* YYTextContainerView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F0D684B0FCFC439535A5896507EB868 /* YYTextContainerView.h */; settings = {ATTRIBUTES = (Project, ); }; };
@@ -219,8 +222,10 @@
 		ECF173B98738BC2218D11D27EEDA565E /* YYTextLine.m in Sources */ = {isa = PBXBuildFile; fileRef = 17612549EC07EF4D5BA8AEA7628F954F /* YYTextLine.m */; };
 		ED5D2756D90E118759B27B394E9BA40E /* PreviewSingleViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7612CDA74861A83401A33AFF22CBBE9D /* PreviewSingleViewController.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		ED94ACCAACE2B5F792A1BE295099C1B1 /* UIImage+name.m in Sources */ = {isa = PBXBuildFile; fileRef = C32BA2A28074C92B04A25647565BDFF9 /* UIImage+name.m */; };
+		EEF4EFB15583307EFE5315F41D0FCA63 /* cpp-headers.mm in Sources */ = {isa = PBXBuildFile; fileRef = EBB9426222A88CE22FFD44A6DC99F0E1 /* cpp-headers.mm */; };
 		EF243CAD47B649A174FC48701A24BFAB /* MASLayoutConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = CCC2C690CC362F11F7628C08EB887F0D /* MASLayoutConstraint.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		F085F277FB366D548502D3F71267B7CF /* QuitMultipleModeAlertViewController.xib in Sources */ = {isa = PBXBuildFile; fileRef = A98A6874AF478874BC5AD38B0EEC575F /* QuitMultipleModeAlertViewController.xib */; };
+		F0D66C62D35CAF4B84F0610BAB99E2F7 /* AlertView.h in Headers */ = {isa = PBXBuildFile; fileRef = DB1D86006E8DB29B9EC999D91F0E0F10 /* AlertView.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		F1AD74AA99C7ADAFFBF6228E99F377E9 /* UIView+JKAdd.m in Sources */ = {isa = PBXBuildFile; fileRef = 19E6F84B2A0BD0B98160C9D203A66A14 /* UIView+JKAdd.m */; };
 		F25B552B4ABDAA9110FDBFA050BDA5DC /* Localizable.strings in Sources */ = {isa = PBXBuildFile; fileRef = 98F6633F7645381FF0289CA10AC9802E /* Localizable.strings */; };
 		F2A43A8784342F88513E78C7784ECE3A /* OperationNodePanorama.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FA033AD5AB0361B939E7C93DA61D4E7 /* OperationNodePanorama.h */; settings = {ATTRIBUTES = (Project, ); }; };
@@ -308,6 +313,7 @@
 /* Begin PBXFileReference section */
 		001A5F8370E76AE3CF69DE5CD54BCB78 /* DBManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = DBManager.m; sourceTree = "<group>"; };
 		00465AB67C1F1B380226E17A7CE23581 /* View+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "View+MASShorthandAdditions.h"; path = "Masonry/View+MASShorthandAdditions.h"; sourceTree = "<group>"; };
+		023CA2B4CB726176D7130B2CDD464FD7 /* PCSSessionWrapper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PCSSessionWrapper.h; sourceTree = "<group>"; };
 		02C3FDB9B6055C3E98B71F9F40F293DB /* opencv2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = opencv2.framework; sourceTree = "<group>"; };
 		030858582360BFE22F7D95092D54F7BD /* Masonry-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Masonry-dummy.m"; sourceTree = "<group>"; };
 		03580EB58D7084008ED15AFEFDDF44C5 /* YYTextInput.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYTextInput.m; path = YYText/Component/YYTextInput.m; sourceTree = "<group>"; };
@@ -348,7 +354,7 @@
 		1FB8EFDA0A02A82868E8E02DD5B6E34E /* MovieListViewController.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MovieListViewController.h; sourceTree = "<group>"; };
 		1FFED36A657123030ABB700256D73F15 /* Masonry */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = Masonry; path = libMasonry.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		2002BF941497DCE4DC551650ED008F9E /* MASConstraintMaker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASConstraintMaker.m; path = Masonry/MASConstraintMaker.m; sourceTree = "<group>"; };
-		2136F17FD7A18281A6A63BACBB7B5DA2 /* moire_mobilenetv2_79.tflite */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file; path = moire_mobilenetv2_79.tflite; sourceTree = "<group>"; };
+		2136F17FD7A18281A6A63BACBB7B5DA2 /* moire_mobilenetv2_79.tflite */ = {isa = PBXFileReference; includeInIndex = 1; path = moire_mobilenetv2_79.tflite; sourceTree = "<group>"; };
 		21B8E03137BCF9F54F9CFE4277F7BEB7 /* QuitMultipleModeAlertViewController.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = QuitMultipleModeAlertViewController.h; sourceTree = "<group>"; };
 		21CABE754D79776A6CA0048575C17125 /* NSAttributedString+YYText.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSAttributedString+YYText.m"; path = "YYText/Utility/NSAttributedString+YYText.m"; sourceTree = "<group>"; };
 		230AB8ED6A299D9085C2F4F5ECD912A7 /* YYTextMagnifier.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYTextMagnifier.h; path = YYText/Component/YYTextMagnifier.h; sourceTree = "<group>"; };
@@ -393,7 +399,7 @@
 		4E5519F8ACF06D3117C557AC71BBF11A /* YYText.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = YYText.debug.xcconfig; sourceTree = "<group>"; };
 		4F0D684B0FCFC439535A5896507EB868 /* YYTextContainerView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYTextContainerView.h; path = YYText/Component/YYTextContainerView.h; sourceTree = "<group>"; };
 		5100BB2C21C348957D675E5E8E8AFC23 /* YYTextAttribute.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYTextAttribute.h; path = YYText/String/YYTextAttribute.h; sourceTree = "<group>"; };
-		526D175D837B13BAA60471FCE7F8F216 /* LenzSDK.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = LenzSDK.podspec; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
+		526D175D837B13BAA60471FCE7F8F216 /* LenzSDK.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = LenzSDK.podspec; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
 		5297FF5173925AD14037E2972FE1575C /* ViewController+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "ViewController+MASAdditions.h"; path = "Masonry/ViewController+MASAdditions.h"; sourceTree = "<group>"; };
 		53DD05D7B6888C455D77CA8C05CEC207 /* YYTextTransaction.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYTextTransaction.h; path = YYText/Utility/YYTextTransaction.h; sourceTree = "<group>"; };
 		567009CE78A0EAB5467FAB5FBFF54EF1 /* YYTextTransaction.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYTextTransaction.m; path = YYText/Utility/YYTextTransaction.m; sourceTree = "<group>"; };
@@ -426,6 +432,7 @@
 		77429CB6A8EAF380C3CB43D3A6254D3D /* OperationNodePanorama.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = OperationNodePanorama.m; sourceTree = "<group>"; };
 		79B3ECE71D1D817E41F35D9B5EDD8823 /* SVProgressHUD.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SVProgressHUD.debug.xcconfig; sourceTree = "<group>"; };
 		7C6F483B5218380C5EBE42B16514E1F8 /* NSString+Localization.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NSString+Localization.h"; sourceTree = "<group>"; };
+		807AC0FC0795E04889BB0E08A81E043D /* cpp-headers.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "cpp-headers.h"; sourceTree = "<group>"; };
 		8111B32B635DCD399351FDD47A65EFB1 /* PCSButton.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PCSButton.m; sourceTree = "<group>"; };
 		81138B07CE5075F5BB6EE8861507C864 /* OperationNodeVideoBase.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = OperationNodeVideoBase.h; sourceTree = "<group>"; };
 		813E120135C3E3B5C50FB70609B4A8D3 /* UIImage+ext.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ext.m"; sourceTree = "<group>"; };
@@ -452,7 +459,8 @@
 		9BB15112B40D29902BD44EB63437D817 /* PhotoListViewController.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PhotoListViewController.m; sourceTree = "<group>"; };
 		9C4CBCA4D29B03564BBDBC5F5C01D93C /* PanoramaGuideView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PanoramaGuideView.h; sourceTree = "<group>"; };
 		9C54896DA6101D4274319E355FCC702C /* SVProgressHUD.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SVProgressHUD.m; path = SVProgressHUD/SVProgressHUD.m; sourceTree = "<group>"; };
-		9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
+		9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
+		A17498484830BD5638E4AAE372DA3F34 /* PCSSessionWrapper.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PCSSessionWrapper.m; sourceTree = "<group>"; };
 		A2C09018F6FBA2B178C18BE2A35BCC39 /* PCSMotionManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PCSMotionManager.h; sourceTree = "<group>"; };
 		A316837B0A1BDA3FCB6907F49797C29F /* lenz_stitcher.a */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = archive.ar; path = lenz_stitcher.a; sourceTree = "<group>"; };
 		A4C18B2ED0CB87015BA0CC57B8C7157E /* YYTextMagnifier.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYTextMagnifier.m; path = YYText/Component/YYTextMagnifier.m; sourceTree = "<group>"; };
@@ -469,6 +477,7 @@
 		AD277ABA97D5700D67AE4243F751B01F /* LenzCameraSDK.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = LenzCameraSDK.h; sourceTree = "<group>"; };
 		AE44E80EF6245FE2ED31EEB49A819226 /* Pods-LenzCameraNativeModuleForRN_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-LenzCameraNativeModuleForRN_Example-acknowledgements.markdown"; sourceTree = "<group>"; };
 		AEFB6FD0996C12C9C08BB4FFA1441657 /* YYTextKeyboardManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYTextKeyboardManager.m; path = YYText/Component/YYTextKeyboardManager.m; sourceTree = "<group>"; };
+		B25E0B74E5939E2E46DA3E98F4247061 /* AlertView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = AlertView.m; sourceTree = "<group>"; };
 		B2FC930665E4A7CF0D652608F4A5F036 /* YYLabel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYLabel.m; path = YYText/YYLabel.m; sourceTree = "<group>"; };
 		B346FFE2FB28E8567ED95CB456A2F8CF /* CollectionViewPlayerCell.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = CollectionViewPlayerCell.h; sourceTree = "<group>"; };
 		B3FABB1AB4EC151E5C9656A616F69499 /* YYLabel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYLabel.h; path = YYText/YYLabel.h; sourceTree = "<group>"; };
@@ -510,6 +519,7 @@
 		D98C5C12F052EAD529EC9EEFE493EFAE /* PhotoCell.xib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file.xib; path = PhotoCell.xib; sourceTree = "<group>"; };
 		D9F14E0DD1321D2339A05C60D9A95041 /* PanoramaOrientationView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PanoramaOrientationView.h; sourceTree = "<group>"; };
 		DAFD9603956A9F8C5BE7FAC749CCFF97 /* Masonry.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Masonry.release.xcconfig; sourceTree = "<group>"; };
+		DB1D86006E8DB29B9EC999D91F0E0F10 /* AlertView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = AlertView.h; sourceTree = "<group>"; };
 		DD29E953FEFC5715DE8B2B1EC7C73649 /* OperationNodeVideoBase.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = OperationNodeVideoBase.m; sourceTree = "<group>"; };
 		DF7346F194B062427E1A91DFFE462DC2 /* TensorFlowWrapper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = TensorFlowWrapper.h; sourceTree = "<group>"; };
 		E0BC2924B100AC445EEFFC7134D84951 /* YYTextUtilities.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = YYTextUtilities.m; path = YYText/Utility/YYTextUtilities.m; sourceTree = "<group>"; };
@@ -527,6 +537,7 @@
 		E97D43C46A45EE515A4DA3AF94398441 /* SVProgressHUD */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = SVProgressHUD; path = libSVProgressHUD.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		EA45FA6D756C56F8C345F42BD8FCB2E9 /* YYTextAsyncLayer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYTextAsyncLayer.h; path = YYText/Utility/YYTextAsyncLayer.h; sourceTree = "<group>"; };
 		EADB3792F4D552050D74E9418727DB85 /* NSParagraphStyle+YYText.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSParagraphStyle+YYText.h"; path = "YYText/Utility/NSParagraphStyle+YYText.h"; sourceTree = "<group>"; };
+		EBB9426222A88CE22FFD44A6DC99F0E1 /* cpp-headers.mm */ = {isa = PBXFileReference; includeInIndex = 1; path = "cpp-headers.mm"; sourceTree = "<group>"; };
 		ECF16AD4550E44A71FF0CCCFE0A2135B /* VerticalButton.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = VerticalButton.m; sourceTree = "<group>"; };
 		ED574C07AC0262FD70066041F90EFFFD /* MovieListCellModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MovieListCellModel.m; sourceTree = "<group>"; };
 		EFA78D74D65C7A2CFC756FE18A5145D0 /* ImageCacheLRU.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = ImageCacheLRU.m; sourceTree = "<group>"; };
@@ -536,7 +547,7 @@
 		F2786C10A3CE15B2B97D2165EF589A44 /* CustomModalViewTransition.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = CustomModalViewTransition.m; sourceTree = "<group>"; };
 		F399DC89064A26DEE47CA1B9B31C3F60 /* MASViewConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASViewConstraint.m; path = Masonry/MASViewConstraint.m; sourceTree = "<group>"; };
 		F4DA75E70A44BE70E7EE7A8E9E81CE80 /* PCSMotionManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PCSMotionManager.m; sourceTree = "<group>"; };
-		F586AE2DD1FB03ED19CD3340751A6076 /* Shaders.metal */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.metal; path = Shaders.metal; sourceTree = "<group>"; };
+		F586AE2DD1FB03ED19CD3340751A6076 /* Shaders.metal */ = {isa = PBXFileReference; includeInIndex = 1; path = Shaders.metal; sourceTree = "<group>"; };
 		F8E1D2BD0418FD754EEF58BE1B4D2571 /* SVProgressHUD.bundle */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "wrapper.plug-in"; name = SVProgressHUD.bundle; path = SVProgressHUD/SVProgressHUD.bundle; sourceTree = "<group>"; };
 		F96AA13B316FCDDD05D7F5984FE83C2E /* PCSButton.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PCSButton.h; sourceTree = "<group>"; };
 		FAF7A7016021E626ECAEBF36DDB38433 /* YYTextUtilities.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYTextUtilities.h; path = YYText/Utility/YYTextUtilities.h; sourceTree = "<group>"; };
@@ -604,6 +615,7 @@
 				35712E9585B95297D6815A5724533055 /* UIImage+ext.h */,
 				813E120135C3E3B5C50FB70609B4A8D3 /* UIImage+ext.m */,
 			);
+			name = Exts;
 			path = Exts;
 			sourceTree = "<group>";
 		};
@@ -639,6 +651,7 @@
 				8543A6A6CAF60FBCEEAF8BA85AD2BFEC /* PhotoListCellModel.h */,
 				4BAC658FD230DEDCE8BF7B9F3067EB41 /* PhotoListCellModel.m */,
 			);
+			name = Cell;
 			path = Cell;
 			sourceTree = "<group>";
 		};
@@ -648,6 +661,7 @@
 				D9F14E0DD1321D2339A05C60D9A95041 /* PanoramaOrientationView.h */,
 				F1F574562E83519685E1499FD4CCAD42 /* PanoramaOrientationView.m */,
 			);
+			name = PanoramaOrientaionView;
 			path = PanoramaOrientaionView;
 			sourceTree = "<group>";
 		};
@@ -656,6 +670,7 @@
 			children = (
 				A316837B0A1BDA3FCB6907F49797C29F /* lenz_stitcher.a */,
 			);
+			name = lib;
 			path = lib;
 			sourceTree = "<group>";
 		};
@@ -669,6 +684,7 @@
 				C0931C591BE7B07CE458432E8414A12C /* TimerLabel.h */,
 				10ED3E885569F0ADA5C6D3DFF0824810 /* TimerLabel.m */,
 			);
+			name = Label;
 			path = Label;
 			sourceTree = "<group>";
 		};
@@ -678,6 +694,7 @@
 				AB4ED4E5A21F449AB237A6158DE5F976 /* LenzCachedResourceModel.h */,
 				48611A8832F58CED003645A0C8EDA810 /* LenzCachedResourceModel.m */,
 			);
+			name = DBModels;
 			path = DBModels;
 			sourceTree = "<group>";
 		};
@@ -687,6 +704,7 @@
 				A2C09018F6FBA2B178C18BE2A35BCC39 /* PCSMotionManager.h */,
 				F4DA75E70A44BE70E7EE7A8E9E81CE80 /* PCSMotionManager.m */,
 			);
+			name = PCSMotionManager;
 			path = PCSMotionManager;
 			sourceTree = "<group>";
 		};
@@ -696,14 +714,19 @@
 				E265302DDF648C95DD5AD1BFA940D191 /* CustomModalViewTransition.h */,
 				F2786C10A3CE15B2B97D2165EF589A44 /* CustomModalViewTransition.m */,
 			);
+			name = Transition;
 			path = Transition;
 			sourceTree = "<group>";
 		};
 		25954DD21CA2A08A0C74C00755BC9EB5 /* inner */ = {
 			isa = PBXGroup;
 			children = (
+				807AC0FC0795E04889BB0E08A81E043D /* cpp-headers.h */,
+				EBB9426222A88CE22FFD44A6DC99F0E1 /* cpp-headers.mm */,
 				045C5643ECC38689ED9F9C8C770C5E31 /* LenzHeader.h */,
 				E9C8B1352CBA0FEBAD260A2E875DF2DE /* Localizable.strings */,
+				023CA2B4CB726176D7130B2CDD464FD7 /* PCSSessionWrapper.h */,
+				A17498484830BD5638E4AAE372DA3F34 /* PCSSessionWrapper.m */,
 				6DEA2C1DC9C31B89E9B8385317563A70 /* PCSTools.h */,
 				3383F6C3A5BD3B919BDA3BC6011E86E5 /* PCSTools.m */,
 				0BA156318A4E03F2312B912BD01AC303 /* SDKParameters.m */,
@@ -740,16 +763,20 @@
 				22A2F23447316E0F37E27D61BE5C5E01 /* Transition */,
 				C9267AE22240B09992918B7703A8E80E /* UIView+tool */,
 			);
+			name = UI;
 			path = UI;
 			sourceTree = "<group>";
 		};
 		289A15EC2EBE9D1936B7F004B4F6984D /* Alert */ = {
 			isa = PBXGroup;
 			children = (
+				DB1D86006E8DB29B9EC999D91F0E0F10 /* AlertView.h */,
+				B25E0B74E5939E2E46DA3E98F4247061 /* AlertView.m */,
 				21B8E03137BCF9F54F9CFE4277F7BEB7 /* QuitMultipleModeAlertViewController.h */,
 				BDAA4B378A2E594E02C3191126E989A7 /* QuitMultipleModeAlertViewController.m */,
 				A98A6874AF478874BC5AD38B0EEC575F /* QuitMultipleModeAlertViewController.xib */,
 			);
+			name = Alert;
 			path = Alert;
 			sourceTree = "<group>";
 		};
@@ -769,6 +796,7 @@
 				3007D1F66DCAE15BF3C90FF9AFB97502 /* PCSPreviewViewController.m */,
 				70DA52D70BA3DF3FE4DCDBF44793E925 /* GestureHandler */,
 			);
+			name = PCSBaseViewController;
 			path = PCSBaseViewController;
 			sourceTree = "<group>";
 		};
@@ -781,6 +809,7 @@
 				1940AFAFFCD2AD451F5C94F7120F4529 /* Renderer.m */,
 				A420D0E72CD7C41DD51B1B1CEB07BF47 /* Shaders */,
 			);
+			name = Renderer;
 			path = Renderer;
 			sourceTree = "<group>";
 		};
@@ -793,6 +822,7 @@
 				C3579EEF69634228A8DE81F027DAB926 /* LenzDataManager.m */,
 				218EEE1ACBE61B22A465592DD1CBF6E3 /* DBModels */,
 			);
+			name = DB;
 			path = DB;
 			sourceTree = "<group>";
 		};
@@ -822,6 +852,7 @@
 				2C872924427A13A04B486DAEA9D62FD1 /* Resources */,
 				E4DA4D425B00D273EE44FB33FC255002 /* Support Files */,
 			);
+			name = SVProgressHUD;
 			path = SVProgressHUD;
 			sourceTree = "<group>";
 		};
@@ -831,6 +862,7 @@
 				CADF850FF74C89AEA926B09C0E07C8E6 /* MoviePlayerViewController.h */,
 				5C1100ACDC0A5DDECABD3C889A867223 /* MoviePlayerViewController.m */,
 			);
+			name = MoviePlayerViewController;
 			path = MoviePlayerViewController;
 			sourceTree = "<group>";
 		};
@@ -840,6 +872,7 @@
 				7189B9B5B46972A794BBD7DA208D7B29 /* BaseViewTapGestureDelegate.h */,
 				E324CBC5B1CD1D81F9DDBFE9466A1E97 /* BaseViewTapGestureDelegate.m */,
 			);
+			name = GestureHandler;
 			path = GestureHandler;
 			sourceTree = "<group>";
 		};
@@ -865,6 +898,7 @@
 				6D62B02E7EF69B17AB7FAC2297364E42 /* PhotoCell.m */,
 				D98C5C12F052EAD529EC9EEFE493EFAE /* PhotoCell.xib */,
 			);
+			name = CollectionViewCell;
 			path = CollectionViewCell;
 			sourceTree = "<group>";
 		};
@@ -874,6 +908,7 @@
 				2F5CFD310DE3E3F4309E4692E5FDC2CC /* UIColor+JKAdd.h */,
 				C7465AD2ADA3BF7068CBAADEC48297D2 /* UIColor+JKAdd.m */,
 			);
+			name = color;
 			path = color;
 			sourceTree = "<group>";
 		};
@@ -893,6 +928,7 @@
 				DF7346F194B062427E1A91DFFE462DC2 /* TensorFlowWrapper.h */,
 				825C6FB76FE50D59AB05CDE39C679926 /* TensorFlowWrapper.m */,
 			);
+			name = TensorFlow;
 			path = TensorFlow;
 			sourceTree = "<group>";
 		};
@@ -916,6 +952,7 @@
 				BDA9F250AB98999CB591E8E8EBC94C04 /* LenzCommon.h */,
 				F586AE2DD1FB03ED19CD3340751A6076 /* Shaders.metal */,
 			);
+			name = Shaders;
 			path = Shaders;
 			sourceTree = "<group>";
 		};
@@ -962,6 +999,7 @@
 				985EAF70F969BDAB6658282A9B5C28A8 /* ViewController+MASAdditions.m */,
 				5C16A90ADF4B57DA7B3C6478488E42A5 /* Support Files */,
 			);
+			name = Masonry;
 			path = Masonry;
 			sourceTree = "<group>";
 		};
@@ -971,6 +1009,7 @@
 				AA5F0F34AD32861B4BC13AED5EE46AA1 /* CameraManager.h */,
 				484E9323B660E1E311FCC858BDAD79F6 /* CameraManager.m */,
 			);
+			name = CameraManager;
 			path = CameraManager;
 			sourceTree = "<group>";
 		};
@@ -980,6 +1019,7 @@
 				D12E4829C2EE389259BF9E03BFC03299 /* Frameworks */,
 				8FA76A2270D150C57C13ECEFD62CCFDF /* Support Files */,
 			);
+			name = TensorFlowLite;
 			path = TensorFlowLite;
 			sourceTree = "<group>";
 		};
@@ -1009,6 +1049,7 @@
 				1731637964133344C91C981FFF1C0CD5 /* Cell */,
 				7ADD985782C977225309D47C5E6E121D /* CollectionViewCell */,
 			);
+			name = PhotoListController;
 			path = PhotoListController;
 			sourceTree = "<group>";
 		};
@@ -1022,6 +1063,7 @@
 				65E6552F443DE1F9C6A71EB124AE43D8 /* VerticalButton.h */,
 				ECF16AD4550E44A71FF0CCCFE0A2135B /* VerticalButton.m */,
 			);
+			name = Button;
 			path = Button;
 			sourceTree = "<group>";
 		};
@@ -1031,6 +1073,7 @@
 				D26B0FB3B3AA94572958C88C41C7FB55 /* PCSModeList.h */,
 				6DE30B6B31980946761C9D5293B4941D /* PCSModeList.m */,
 			);
+			name = ModeListView;
 			path = ModeListView;
 			sourceTree = "<group>";
 		};
@@ -1057,6 +1100,7 @@
 				41170107A2FDBF1229F0526276F6ECF5 /* UIView+JKAdd.h */,
 				19E6F84B2A0BD0B98160C9D203A66A14 /* UIView+JKAdd.m */,
 			);
+			name = "UIView+tool";
 			path = "UIView+tool";
 			sourceTree = "<group>";
 		};
@@ -1131,6 +1175,7 @@
 				9C4CBCA4D29B03564BBDBC5F5C01D93C /* PanoramaGuideView.h */,
 				642B6533196B118EC2A42532AAB9F790 /* PanoramaGuideView.m */,
 			);
+			name = PanoramaGuideView;
 			path = PanoramaGuideView;
 			sourceTree = "<group>";
 		};
@@ -1188,6 +1233,7 @@
 				19B60C5ED970E0BD7B87C59D44EF8103 /* YYTextWeakProxy.m */,
 				B77BEFA4F143EAEB178F917647E8AEAD /* Support Files */,
 			);
+			name = YYText;
 			path = YYText;
 			sourceTree = "<group>";
 		};
@@ -1197,6 +1243,7 @@
 				46C88FEA97AD035600FD104BF0FB899F /* ImageCacheLRU.h */,
 				EFA78D74D65C7A2CFC756FE18A5145D0 /* ImageCacheLRU.m */,
 			);
+			name = LRU;
 			path = LRU;
 			sourceTree = "<group>";
 		};
@@ -1228,6 +1275,7 @@
 				DD29E953FEFC5715DE8B2B1EC7C73649 /* OperationNodeVideoBase.m */,
 				222BAAC3C262CFBF90008035A1C8A63D /* PCSMotionManager */,
 			);
+			name = OperationNode;
 			path = OperationNode;
 			sourceTree = "<group>";
 		};
@@ -1260,11 +1308,13 @@
 			buildActionMask = 2147483647;
 			files = (
 				DB28DEA5C89B3F178C446B9BF5562102 /* AlbumCounterLabel.h in Headers */,
+				F0D66C62D35CAF4B84F0610BAB99E2F7 /* AlertView.h in Headers */,
 				67A58DFA526AC3A9A871F233A47DBFB8 /* AVCapturePhotoOutput+VersionAdaptor.h in Headers */,
 				EAB02DF3E96F9785F41A5500AE9231CE /* BaseViewTapGestureDelegate.h in Headers */,
 				D8739CDE4FB8D28DE29E3B8C2B1C64BC /* CameraManager.h in Headers */,
 				8EF89B26052CE66E8CF72814A1CED9DA /* CameraTextureRenderPass.h in Headers */,
 				2FD31708C0A9546EF4514AFCDDA48133 /* CollectionViewPlayerCell.h in Headers */,
+				683F5CAD9E088A9CBDA18B5D5A01007D /* cpp-headers.h in Headers */,
 				8452D2825DA153EF65ACA8A8E96BF70A /* CustomModalViewTransition.h in Headers */,
 				A3EED5B675E5B70762DCEA4484D1DD32 /* DBManager.h in Headers */,
 				02B959FE26516AD48909BA09827C5514 /* ImageCacheLRU.h in Headers */,
@@ -1296,6 +1346,7 @@
 				5C0068B922F4D3BF2C88B58F408B290E /* PCSPreviewViewController.h in Headers */,
 				5804651E7179251151071800958B13C5 /* PCSRoundButton.h in Headers */,
 				89633F951D73A9C9E77A45DB6576B6FA /* PCSSDF-prefix-header.h in Headers */,
+				692535448F10C176CBFBE177CE206EBF /* PCSSessionWrapper.h in Headers */,
 				75F2C65AD171D1BFC9DD4D7AAAE3614B /* PCSThemeColorManager.h in Headers */,
 				AC6B9EF28746B8901142DD8419FF44E0 /* PCSTools.h in Headers */,
 				718675C8D8CC9777C6870ADB7335DA31 /* PhotoAlbumListViewController.h in Headers */,
@@ -1588,11 +1639,13 @@
 			buildActionMask = 2147483647;
 			files = (
 				36A335D72A32C8D373B244083634C298 /* AlbumCounterLabel.m in Sources */,
+				D0DC343DF898D9DA5386B2364B92110E /* AlertView.m in Sources */,
 				45A025C9E91F10658628F768D873642D /* AVCapturePhotoOutput+VersionAdaptor.m in Sources */,
 				167CA5A8031385B0A81CCF7901765CC7 /* BaseViewTapGestureDelegate.m in Sources */,
 				8E53653E1B32D93DAEA0E4C486403383 /* CameraManager.m in Sources */,
 				023CFE8053B14211C69D04718711DEFC /* CameraTextureRenderPass.m in Sources */,
 				4D8322EF82610B19CF14893F310DF415 /* CollectionViewPlayerCell.m in Sources */,
+				EEF4EFB15583307EFE5315F41D0FCA63 /* cpp-headers.mm in Sources */,
 				068F7D34728422B2B5C9C30E58BD7C52 /* CustomModalViewTransition.m in Sources */,
 				F5D086A3E8F39A21E5A535FD3EF1E033 /* DBManager.m in Sources */,
 				1AD187D9AC6E811D7CF9781BF8CFAEF6 /* ImageCacheLRU.m in Sources */,
@@ -1622,6 +1675,7 @@
 				25A56361BB8E7291B0E6C4D60F57D7FB /* PCSMotionManager.m in Sources */,
 				FE28B81832D825805108C9131B8310AA /* PCSPreviewViewController.m in Sources */,
 				C966139CE4D69A2E221EFFC1E475BA70 /* PCSRoundButton.m in Sources */,
+				43FB1194BE4F7755647BE583FE9DE8C9 /* PCSSessionWrapper.m in Sources */,
 				5325B5D50750C2B516941C1BC1DAF84D /* PCSThemeColorManager.m in Sources */,
 				0136F970555A2FE5E5BAEED511674D6A /* PCSTools.m in Sources */,
 				4EC3293169F740693B5D0A371624A75D /* PhotoAlbumListViewController.m in Sources */,
@@ -2047,7 +2101,8 @@
 				MTL_FAST_MATH = YES;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				STRIP_INSTALLED_PRODUCT = NO;
-				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
+				SWIFT_COMPILATION_MODE = wholemodule;
+				SWIFT_OPTIMIZATION_LEVEL = "-O";
 				SWIFT_VERSION = 5.0;
 				SYMROOT = "${SRCROOT}/../build";
 			};

+ 4 - 2
LenzCameraNativeModuleForRN/Classes/headers/LenzCameraSDK.m

@@ -27,19 +27,21 @@
                       presentVC:(__kindof UIViewController *)presentVC
                        complete:(LenzCameraSDKComplete)complete {
     if ([NSThread isMainThread]) {
-        PCSBaseViewController *vc = [PCSBaseViewController initWithParams:params complete:^(NSDictionary * _Nonnull dict) {
+        __block PCSBaseViewController *vc = [PCSBaseViewController initWithParams:params complete:^(NSDictionary * _Nonnull dict) {
             if (complete) {
                 complete(dict);
             }
+            vc = nil;
         }];
         vc.modalPresentationStyle = UIModalPresentationFullScreen;
         [presentVC presentViewController:vc animated:YES completion:nil];
     } else {
         dispatch_async(dispatch_get_main_queue(), ^{
-            PCSBaseViewController *vc = [PCSBaseViewController initWithParams:params complete:^(NSDictionary * _Nonnull dict) {
+            __block PCSBaseViewController *vc = [PCSBaseViewController initWithParams:params complete:^(NSDictionary * _Nonnull dict) {
                 if (complete) {
                     complete(dict);
                 }
+                vc = nil;
             }];
             vc.modalPresentationStyle = UIModalPresentationFullScreen;
             [presentVC presentViewController:vc animated:YES completion:nil];

+ 1 - 1
LenzCameraNativeModuleForRN/Classes/headers/PCSBaseViewController.h

@@ -145,7 +145,7 @@ typedef void(^PCSBaseVCCompleteBLock)(NSDictionary *dict);
 - (void)stopVideoDataOutputing;
 
 
-//- (void)updateVideoRecodStatus;
+- (void)updateVideoRecodStatus;
 - (void)clearSingleData;
 
 @end

+ 2 - 1
LenzCameraNativeModuleForRN/Classes/headers/SDKParameters.h

@@ -17,8 +17,9 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic) BOOL isRemake;
 @property (nonatomic) SDKCaptureModeIndex model;
 @property (nonatomic) SDKVideoQuality videoQuality;
-@property (nonatomic) CGFloat quantity;
+@property (nonatomic) CGFloat quality; //照片质量
 @property (nonatomic) NSInteger recTime;
+@property (nonatomic) NSInteger quantity;//视频数量 0 不限制
 @property (nonatomic) SDKCameraPosition cameraPosition;
 @property (nonatomic) NSString *cameraPositionString;
 @property (nonatomic) NSNumber *keyFrame;

+ 16 - 0
LenzCameraNativeModuleForRN/Classes/inner/Alert/AlertView.h

@@ -0,0 +1,16 @@
+//
+//  AlertView.h
+//  sampleSDK
+//
+//  Created by 王昭威 on 2023/1/18.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface AlertView : UIView
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 20 - 0
LenzCameraNativeModuleForRN/Classes/inner/Alert/AlertView.m

@@ -0,0 +1,20 @@
+//
+//  AlertView.m
+//  sampleSDK
+//
+//  Created by 王昭威 on 2023/1/18.
+//
+
+#import "AlertView.h"
+
+@implementation AlertView
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 1 - 106
LenzCameraNativeModuleForRN/Classes/inner/CameraManager/CameraManager.m

@@ -32,11 +32,6 @@
     AVCaptureDeviceFormat *bestFormat;
     CGFloat aspect = 1;
     
-//    CMTime maxFrameDuration;
-//    float maxSeconds = 15;
-    
-//    AVFrameRateRange *bestFrameRateRange = nil;//
-    
     
     for (AVCaptureDeviceFormat *format in supportedFormats) {
         CMVideoDimensions dimensions = CMVideoFormatDescriptionGetDimensions((CMVideoFormatDescriptionRef)[format formatDescription]);
@@ -135,106 +130,6 @@
     }
     [device unlockForConfiguration];
 }
-//
-//
-//- (void)configureCamera:(AVCaptureDevice *)device forFrameRate:(int)frameRate {
-//    AVCaptureDeviceFormat *bestFormat = nil;
-//    AVFrameRateRange *bestFrameRateRange = nil;
-//    for ( AVCaptureDeviceFormat *format in [device formats] ) {
-//        for ( AVFrameRateRange *range in format.videoSupportedFrameRateRanges ) {
-//            //NSLog(@"Format %@",format);
-//            if ( range.maxFrameRate == frameRate ) {
-//                bestFormat = format;
-//                bestFrameRateRange = range;
-//            }
-//        }
-//    }
-//
-//    //NSLog(@"Format %@",bestFormat);
-//
-//    if ( bestFormat ) {
-//        if ( [device lockForConfiguration:NULL] == YES ) {
-//            device.activeFormat = bestFormat;
-//            device.activeVideoMinFrameDuration = bestFrameRateRange.minFrameDuration;
-//            device.activeVideoMaxFrameDuration = bestFrameRateRange.minFrameDuration;
-//            [device unlockForConfiguration];
-//        }
-//    }
-//}
-//
-//
-//- (void)configureCamera{
-//    /// 参数设置
-//    // 默认后置摄像头
-//    AVCaptureDevicePosition position = AVCaptureDevicePositionBack;
-//    // 帧率
-//    int frameRate = 25;
-//    // 显色方案
-//    OSType videoFormat = kCVPixelFormatType_32BGRA;
-//    // 分辨率高
-//    int resolutionHeight = 720;
-//
-//    /// 创建AVCaptureSession对象
-//    AVCaptureSession *session = [[AVCaptureSession alloc] init];
-//    /// 设置分辨率
-//    session.sessionPreset = AVCaptureSessionPreset1280x720;
-//    /// 获取摄像头
-//    AVCaptureDevice *captureDevice;
-//    // 默认AVCaptureDevicePositionBack,后置摄像头
-//    AVCaptureDeviceDiscoverySession *deviceDiscoverySession =  [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:@[AVCaptureDeviceTypeBuiltInWideAngleCamera] mediaType:AVMediaTypeVideo position:position];
-//    NSArray *devices = deviceDiscoverySession.devices;
-//    for (AVCaptureDevice *device in devices) {
-//        if (AVCaptureDevicePositionBack == device.position) {
-//            captureDevice = device;
-//        }else if (AVCaptureDevicePositionFront == device.position){
-//            captureDevice = device;
-//        }
-//    }
-//    /// 设置帧率和分辨率高度
-//    BOOL isSuccess = NO;
-//    for(AVCaptureDeviceFormat *vFormat in [captureDevice formats]) {
-//        CMFormatDescriptionRef description = vFormat.formatDescription;
-//        float maxRate = ((AVFrameRateRange*) [vFormat.videoSupportedFrameRateRanges objectAtIndex:0]).maxFrameRate;
-//        if (maxRate >= frameRate && CMFormatDescriptionGetMediaSubType(description) == videoFormat) {
-//            if ([captureDevice lockForConfiguration:NULL] == YES) {
-//                // 对比镜头支持的分辨率和当前设置的分辨率
-//                CMVideoDimensions dims = CMVideoFormatDescriptionGetDimensions(description);
-//                if (dims.height == resolutionHeight && dims.width == [self.class getResolutionWidthByHeight:resolutionHeight]) {
-//                    [session beginConfiguration];
-//                    if ([captureDevice lockForConfiguration:NULL]){
-//                        captureDevice.activeFormat = vFormat;
-//                        [captureDevice setActiveVideoMinFrameDuration:CMTimeMake(1, frameRate)];
-//                        [captureDevice setActiveVideoMaxFrameDuration:CMTimeMake(1, frameRate)];
-//                        [captureDevice unlockForConfiguration];
-//                    }
-//                    [session commitConfiguration];
-//                    isSuccess = YES;
-//                }
-//            }else {
-//                NSLog(@"%s: 失败",__func__);
-//            }
-//        }
-//    }
-//
-//
-//
-//
-//}
-//
-/////需要考虑横竖屏情况,这里暂未考虑
-//+ (int)getResolutionWidthByHeight:(int)height {
-//    switch (height) {
-//        case 2160:
-//            return 3840;
-//        case 1080:
-//            return 1920;
-//        case 720:
-//            return 1280;
-//        case 480:
-//            return 640;
-//        default:
-//            return -1;
-//    }
-//}
+
 
 @end

+ 1 - 35
LenzCameraNativeModuleForRN/Classes/inner/OperationNode/OperationNodeMovie.m

@@ -52,7 +52,6 @@
 }
 
 - (UIImage *)lastImage{
-//    return [self.recordedMovies lastObject].thumbnail;
     if (self.controller.totalArray.count > 0) {
         return [self.controller.totalArray lastObject];
     }else{
@@ -61,7 +60,6 @@
 }
 
 - (BOOL)hasCache{
-//    return self.recordedMovies.count > 0;
     return self.controller.totalArray.count > 0;
 }
 
@@ -91,27 +89,12 @@
 
 - (void)updateUI{
     self.controller.modeLabel.hidden = YES;
-    
-//    self.controller.panGesture.enabled = !self.isRecording;
-//    UIView* list = (UIView*)self.controller.modeList;
-//    list.userInteractionEnabled = !self.isRecording;
-    
+        
     self.controller.timerLabel.backgroundColor = !self.isRecording ? [UIColor clearColor] : [PCSThemeColorManager orange];
     self.controller.timerLabel.hidden = NO;
     [self.controller.timerLabel updateWith:0];
     self.controller.timerLabel.padding = UIEdgeInsetsMake(0, 2.5, 0, 2.5);
     
-//    self.controller.savePhotoButton.hidden = !self.hasCache;
-//    self.controller.discardPhotoButton.hidden = !self.hasCache;
-    
-//    self.controller.backButton.hidden = self.hasCache;
-//    self.controller.backButton.alpha = 1;
-    
-//    self.controller.albumButton.hidden = !self.hasCache;
-//    [self.controller.albumButton setImage:self.lastImage forState:UIControlStateNormal];
-    
-//    self.controller.numberOfImagesLabel.hidden = !self.hasCache;
-//    self.controller.numberOfImagesLabel.text = [NSString stringWithFormat:LOCALIZATION_STRING_KEY_NUM_OF_MOVIES, [@(self.numberOfCaches) stringValue]];
 }
 
 - (void)discardPhotoResultButtonTouchUpInside{
@@ -141,7 +124,6 @@
         NSError* err = nil;
         [fileMgr createDirectoryAtURL:moviesDir withIntermediateDirectories:YES attributes:nil error:&err];
         if(err != nil){
-            NSLog(@"%@", [err localizedDescription]);
             return;
         }
     }
@@ -161,16 +143,10 @@
         
         [self.recordedMovies addObject:[[RecordedMovieModel alloc] initWithFileUrl:desUrl thumbnail:frameImage]];
         [self.controller.totalArray addObject:frameImage];
-        NSLog(@"-------:%lu",(unsigned long)self.recordedMovies.count);
-        
         self.isRecording = NO;
         [self updateUI];
         [UIView animateWithDuration:0.15 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{
-            
-//            self.controller.albumButton.alpha = !self.hasCache ? 0 : 1;
             self.controller.switchButton.alpha = 1;
-//            self.controller.savePhotoButton.alpha = !self.hasCache ? 0 : 1;
-//            self.controller.discardPhotoButton.alpha = !self.hasCache ? 0 : 1;
         } completion:^(BOOL finished) {}];
     }
     else{
@@ -213,21 +189,11 @@
 - (BOOL)start{
     [super start];
     BOOL ret = [self.controller startRecording];
-    if(ret){
-//        self.controller.panGesture.enabled = NO;
-//        UIView* list = (UIView*)self.controller.modeList;
-//        list.userInteractionEnabled = NO;
-    }
     return ret;
 }
 
 - (void)stop{
     self.isRecording = NO;
-//    self.controller.timerLabel.backgroundColor = !self.isRecording ? [UIColor clearColor] : [PCSThemeColorManager orange];
-//    self.controller.timerLabel.hidden = NO;
-//    [self.controller.timerLabel updateWith:0];
-//    self.controller.timerLabel.padding = UIEdgeInsetsMake(0, 2.5, 0, 2.5);
-
     [self.controller stopRecording];
 }
 

+ 4 - 54
LenzCameraNativeModuleForRN/Classes/inner/OperationNode/OperationNodeVideoBase.m

@@ -40,37 +40,14 @@
 }
 
 - (BOOL)start{
-//    [self updateButtonStatusByCurrentRecordingState];
     return YES;
 }
 
 - (void)stop{
     
     self.isRecording = NO;
-    
     [self updateButtonStatusByCurrentRecordingState];
     
-    if (!NSThread.isMainThread) {
-        dispatch_async(dispatch_get_main_queue(), ^{
-//            self.controller.albumButton.hidden = NO;
-//            self.controller.savePhotoButton.hidden = NO;
-//            self.controller.discardPhotoButton.hidden = NO;
-//            self.controller.switchButton.hidden = NO;
-            
-        //    UIView* list = (UIView*)self.controller.modeList;
-        //    self.controller.panGesture.enabled = YES;
-        //    list.userInteractionEnabled = YES;
-            
-//            [UIView animateWithDuration:0.15 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{
-//
-//                self.controller.albumButton.alpha = 1;
-//                self.controller.savePhotoButton.alpha = 1;
-//                self.controller.discardPhotoButton.alpha = 1;
-//                self.controller.switchButton.alpha = 1;
-//            } completion:^(BOOL finished) {}];
-        });
-    }
-    
 }
 
 #pragma mark - button
@@ -82,7 +59,6 @@
     self.controller.panGesture.enabled = !self.isRecording;
     self.controller.timerLabel.backgroundColor = !self.isRecording ? [UIColor clearColor] : [PCSThemeColorManager orange];
     [self updateTakePhotoButtonStatus];
-//    UIView* list = (UIView*)self.controller.modeList;
     if(!self.isRecording){
         self.controller.isVideoStitchStopedWhenRecording = YES;
         [self updateButtonStatusByCurrentRecordingState];
@@ -101,7 +77,6 @@
             self.controller.timerLabel.padding = UIEdgeInsetsMake(0, 2.5, 0, 2.5);
 
             self.stitchTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, dispatch_get_global_queue(0, 0));
-//            dispatch_time_t start = dispatch_time(DISPATCH_TIME_NOW, (int64_t)1 * NSEC_PER_SEC);
             uint64_t duration = (uint64_t)(1.0 * NSEC_PER_SEC);
             __block NSInteger count = 0;
             dispatch_source_set_timer(self.stitchTimer, DISPATCH_TIME_NOW, duration, 0 * NSEC_PER_SEC);
@@ -117,7 +92,6 @@
 
                         self.controller.timerLabel.backgroundColor =  [PCSThemeColorManager orange];
                         [self.controller.timerLabel updateWith:count];
-                        NSLog(@"aaaaaaaaaaaaa%@", self.controller.timerLabel.text);
                         self.controller.timerLabel.hidden = NO;
                         self.controller.modeLabel.hidden = YES;
                         self.controller.flashButton.hidden = YES;
@@ -167,34 +141,13 @@
 
 #pragma mark - update UI
 - (void)updateButtonStatusByCurrentRecordingState{
-//    if (!NSThread.isMainThread) {
-        dispatch_async(dispatch_get_main_queue(), ^{
-        //    self.controller.panGesture.enabled = !self.isRecording;
-//            self.controller.switchButton.enabled = !self.isRecording;
-//            self.controller.savePhotoButton.enabled = !self.isRecording;
-//            self.controller.discardPhotoButton.enabled = !self.isRecording;
-//            self.controller.backButton.enabled = !self.isRecording;
-//            self.controller.albumButton.enabled = !self.isRecording;
-            
-            self.controller.timerLabel.hidden = YES;
-            self.controller.modeLabel.hidden = NO;
-//            self.controller.numberOfImagesLabel.hidden = NO;
-        });
-//    }
+    dispatch_async(dispatch_get_main_queue(), ^{
+        self.controller.timerLabel.hidden = YES;
+        self.controller.modeLabel.hidden = NO;
+    });
 }
 
 #pragma mark - Accessor
-//- (void)setIsRecording:(BOOL)isRecording{
-//    _isRecording = isRecording;
-//    UIImage* img = isRecording ? [UIImage loadNamed:@"btn-stop-recording"] : [UIImage loadNamed:@"take-photo-btn"];
-//    if (!NSThread.isMainThread) {
-//        dispatch_async(dispatch_get_main_queue(), ^{
-//
-//            [self.controller.takePhotoButton setImage:img forState:UIControlStateNormal];
-//        });
-//    }
-//}
-
 
 - (void)updateTakePhotoButtonStatus {
     UIImage* img = self.isRecording ? [UIImage loadNamed:@"btn-stop-recording"] : [UIImage loadNamed:@"take-photo-btn"];
@@ -218,9 +171,6 @@
         }
         self.controller.modeList.hidden = NO;
         self.controller.ablumImageView.hidden = NO;
-        
-//        self.controller.numberOfImagesLabel.hidden = NO;
-
     } else {
         self.controller.flashButton.hidden = YES;
         self.controller.discardPhotoButton.hidden = YES;

+ 62 - 62
LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m

@@ -126,6 +126,7 @@
 @property (nonatomic) NSNumber *startPitchX;
 @property (nonatomic) NSNumber *startRollY;
 @property (nonatomic) LenzTensorFlow *tensorFlow;
+@property (nonatomic) BOOL isContainSingleInReatinMode;
 
 @end
 
@@ -158,6 +159,7 @@
     self.totalArray = [[NSMutableArray alloc]init];
     self.cachesArray = [[NSMutableArray alloc]init];
     self.typeArray = [[NSMutableArray alloc]init];
+    self.isContainSingleInReatinMode = NO;
 
     self.resourceModel = [[LenzCachedResourceModel alloc]init];
     self.motionManager = [[CMMotionManager alloc]init];
@@ -269,19 +271,26 @@
 
                 return NO;
             }
-//            return YES;
         }
         
         
-        if ([SDKParameters shared].retainedMode == SDK_DATA_RETAINED_RETAIN) {
-            //保留模式无单拍
-            if (newIndex > 0) {
-                newIndex += 1;
-            }
-            if (oldIndex > 0) {
-                oldIndex += 1;
-            }
-        }
+//        if ([SDKParameters shared].retainedMode == SDK_DATA_RETAINED_RETAIN && !self.isContainSingleInReatinMode) {
+//            //保留模式无单拍
+//            __block NSInteger index = 0;
+//            [[SDKParameters shared].modeIndices enumerateObjectsUsingBlock:^(NSNumber * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+//                if (idx > 0) {
+//                    index = obj.integerValue;
+//                    *stop = YES;
+//                    return;
+//                }
+//            }];
+//            if (newIndex > 0) {
+//                newIndex += index;
+//            }
+//            if (oldIndex > 0) {
+//                oldIndex += index;
+//            }
+//        }
         [strongSelf modeWillChange:newIndex oldIndex:oldIndex];
         
         id<OperationNodeProtocol> oldModelNode = strongSelf.currentOperationNode;
@@ -300,9 +309,7 @@
     [self modeWillChange:[SDKParameters shared].modeIndex oldIndex:0lu];
     self.modeList.mode = [SDKParameters shared].modeIndex;
     self.mode = [SDKParameters shared].modeIndex;
-//    dispatch_async(dispatch_get_main_queue(), ^{
-        [self modeDidChange:[SDKParameters shared].modeIndex oldIndex:0lu];
-//    });
+    [self modeDidChange:[SDKParameters shared].modeIndex oldIndex:0lu];
     
     UIVisualEffectView* effectView = [[UIVisualEffectView alloc] initWithEffect: [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]];
     effectView.alpha = 0.8;
@@ -605,7 +612,7 @@
       @"continuous": @(SDK_CAPTURE_MODE_CONTINUOUS),
       @"single" : @(SDK_CAPTURE_MODE_SINGLE),
       @"video" : @(SDK_CAPTURE_MODE_MOVIE),
-      @"parnorama" : @(SDK_CAPTURE_MODE_PANORAMA),
+      @"panorama" : @(SDK_CAPTURE_MODE_PANORAMA),
       @"panoramaPlus" : @(SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA)
     };
     NSMutableArray<NSNumber*>* modeIndiciesTable = [NSMutableArray array];
@@ -647,6 +654,14 @@
             
             item.keyFrame = dict[@"keyframe"];
             item.isRemake = dict[@"isRemake"];
+            NSNumber *quantity = dict[@"quantity"];
+            if (quantity) {
+                item.quantity = [quantity integerValue];
+            }
+            NSNumber *quality = dict[@"quality"];
+            if (quality) {
+                item.quality = [quality floatValue];
+            }
               
             NSString* flashMode = dict[@"flashMode"];
             if(flashMode != nil){
@@ -744,6 +759,7 @@
     
     NSMutableArray* nodesArr = [NSMutableArray array];
     NSMutableDictionary* nodesDic = [NSMutableDictionary dictionary];
+    __block SDKCaptureModeIndex defaultModeIndex = SDK_CAPTURE_MODE_CONTINUOUS;
     NSDictionary<NSNumber*, Class>* nodeClsTable = @{
         @(SDK_CAPTURE_MODE_CONTINUOUS): [OperationNodeMultiple class],
         @(SDK_CAPTURE_MODE_SINGLE): [OperationNodeSingle class],
@@ -751,15 +767,14 @@
         @(SDK_CAPTURE_MODE_PANORAMA): [OperationNodePanorama class],
         @(SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA): [OperationNodeAIPanorama class],
     };
+    
     [[SDKParameters shared].modeIndices enumerateObjectsUsingBlock:^(NSNumber * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
-//
-//        if(nodeClsTable[obj] != nil){
-//            id node = [[nodeClsTable[obj] alloc] initWithController: self];
-//            [nodesArr addObject: node];
-//            nodesDic[obj] = node;
-//        }
+        if (idx == 0) {
+            defaultModeIndex = (SDKCaptureModeIndex)obj.integerValue;
+        }
         if(nodeClsTable[obj] != nil){
             if ([SDKParameters shared].retainedMode == SDK_DATA_RETAINED_RETAIN && obj.intValue == SDK_CAPTURE_MODE_SINGLE) {
+                self.isContainSingleInReatinMode = YES;
                 return;
             } else {
                 id node = [[nodeClsTable[obj] alloc] initWithController: self];
@@ -777,15 +792,19 @@
             }
         }
     }];
+    if ([SDKParameters shared].retainedMode == SDK_DATA_RETAINED_RETAIN && nodesArr.count == 0 && self.isContainSingleInReatinMode) {
+        // reatin模式下只有single
+        id node = [[OperationNodeSingle alloc] initWithController: self];
+        [nodesArr addObject: node];
+        nodesDic[@(SDK_CAPTURE_MODE_SINGLE)] = node;
+        defaultModeIndex = SDK_CAPTURE_MODE_SINGLE;
+
+
+    }
+    [SDKParameters shared].modeIndex = defaultModeIndex;
     _operationNodesArray = [nodesArr copy];
     _operationNodes = [nodesDic copy];
-//    _operationNodes = @{
-//        @(SDK_CAPTURE_MODE_SINGLE): [[OperationNodeSingle alloc] initWithController:self],
-//        @(SDK_CAPTURE_MODE_CONTINUOUS): [[OperationNodeMultiple alloc] initWithController:self],
-//        @(SDK_CAPTURE_MODE_MOVIE): [[OperationNodeMovie alloc] initWithController:self],
-//        @(SDK_CAPTURE_MODE_PANORAMA): [[OperationNodePanorama alloc] initWithController:self],
-//        @(SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA): [[OperationNodeAIPanorama alloc] initWithController:self],
-//    };
+
 
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willEnterForeground:) name:UIApplicationWillEnterForegroundNotification object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
@@ -1065,7 +1084,7 @@
     NSURL* tmpMovieFileUrl = [NSURL fileURLWithPath:[LenzDataManager moviePath]];
     AVCaptureConnection* connection = [self.movieFileOutput connectionWithMediaType:AVMediaTypeVideo];
     if(connection == nil){
-        [self showAlertForAuthorization];
+//        [self showAlertForAuthorization];
         return NO;
     }
     
@@ -1115,23 +1134,18 @@
     BOOL isFront = camera == cameraMgr.front;
     BOOL isLandscape = NO;
     //  前摄像头需要镜像一下
-    CGAffineTransform originalMat = isFront ? CGAffineTransformMakeScale(-1, 1) : CGAffineTransformIdentity;
     switch (deviceOrientation) {
         case UIDeviceOrientationPortrait:
-//            self.panoramOrientationGuideView.selectedItemIndex = PanoramaOrientationViewUp;
             degree = 0;
             break;
         case UIDeviceOrientationLandscapeRight:
-//            self.panoramOrientationGuideView.selectedItemIndex = PanoramaOrientationViewRight;
             degree = isFront ? 90 : -90;
             isLandscape = YES;
             break;
         case UIDeviceOrientationPortraitUpsideDown:
-//            self.panoramOrientationGuideView.selectedItemIndex = PanoramaOrientationViewDown;
             degree = 180;
             break;
         case UIDeviceOrientationLandscapeLeft:
-//            self.panoramOrientationGuideView.selectedItemIndex = PanoramaOrientationViewLeft;
             degree = isFront ? -90 : 90;
             isLandscape = YES;
             break;
@@ -1151,13 +1165,8 @@
                 return;
             }
             [connection setVideoOrientation:orientation];
-//            self.panoramaGuideView.transform = CGAffineTransformRotate(originalMat, dgree_2_rad(degree));
-            //  设置小预览框高宽比
             CGFloat aspect = isFront ? cameraMgr.frontAspect : cameraMgr.backAspect;
             aspect = isLandscape ? 1.0 / aspect : aspect;
-//            [self.panoramaGuideView updatePreviewAspect: aspect];
-            
-//            self.panoramOrientationGuideView.transform = self.panoramaGuideView.transform;
             [self.videoDataOutput setSampleBufferDelegate:self queue:self.videoDataQueue];
             ret = YES;
         }
@@ -1278,8 +1287,6 @@
         }
     }];
     
-//    SDKParameters* params = [SDKParameters shared];
-
     self.videoWriterInput.expectsMediaDataInRealTime = YES;
     
     [self.videoWriter addInput:self.videoWriterInput];
@@ -1748,10 +1755,20 @@
     }
     if(![self.currentOperationNode respondsToSelector:@selector(enable)] || self.currentOperationNode.enable){
         
+        if (self.mode == SDK_CAPTURE_MODE_MOVIE) {
+            __block SDKParametersItem *videoItems = nil;
+            [[SDKParameters shared].items enumerateObjectsUsingBlock:^(SDKParametersItem * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+                if (obj.model == self.mode) {
+                    videoItems = obj;
+                }
+            }];
+            if (videoItems.quantity > 0 && self.resourceModel.movieArray.count >= videoItems.quantity) {
+                [SVProgressHUD showImage:[UIImage imageNamed:@""] status:[NSString stringWithFormat:@"最多录制%ld条视频", videoItems.quantity]];
+                return;
+            }
+        }
+        
         if (self.mode == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
-//            [LenStitcher videoResetPath];
-//            LenzResourceItemModel *itemModel = [[LenzResourceItemModel alloc]init];
-//            [self.resourceModel.aiPanoramArray addObject:itemModel];
             
             OperationNodeAIPanorama *aiPan = nil;
             if ([self.currentOperationNode isKindOfClass:[OperationNodeAIPanorama class]]) {
@@ -1760,15 +1777,9 @@
                     aiPan.AIType = OperationAITypeTap;
                 }
             }
-//            [self startMotion];
-//            if (self.isVideoStitchStopedWhenRecording) {
-//
-//
-//
-//                return;
-//            }
 
         }
+
         
         [self.currentOperationNode takePhotoButtonTouched];
 
@@ -1777,18 +1788,7 @@
             LenzResourceItemModel *itemModel = [[LenzResourceItemModel alloc]init];
             [self.resourceModel.panoramArray addObject:itemModel];
             [self startMotion];
-
-//            self.videoStitchSemaphore = dispatch_semaphore_create(1);
-        } 
-//        if (self.mode == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
-//
-//            OperationNodeAIPanorama *aiPan = nil;
-//            if ([self.currentOperationNode isKindOfClass:[OperationNodeAIPanorama class]]) {
-//                aiPan = self.currentOperationNode;
-//                aiPan.AIType = OperationAITypeTap;
-//            }
-//
-//        }
+        }
     }
 
 }

+ 28 - 0
LenzCameraNativeModuleForRN/Classes/inner/PCSSessionWrapper.h

@@ -0,0 +1,28 @@
+//
+//  PCSSessionWrapper.h
+//  sampleSDK
+//
+//  Created by 王昭威 on 2023/1/15.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class AVCaptureSession;
+@class AVCapturePhotoOutput;
+@class AVCaptureVideoDataOutput;
+@class AVCaptureMovieFileOutput;
+@class AVCaptureVideoPreviewLayer;
+@interface PCSSessionWrapper : NSObject
+
+@property (nonatomic, strong) AVCaptureSession* captureSession;
+@property (nonatomic, strong) AVCapturePhotoOutput* cameraPhotoOutput;
+@property (nonatomic, strong) AVCaptureVideoDataOutput* cameraVideoOutput;
+@property (nonatomic, strong) AVCaptureMovieFileOutput* movieFileOutput;
+
+@property (nonatomic, strong) AVCaptureVideoPreviewLayer* previewLayer;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 13 - 0
LenzCameraNativeModuleForRN/Classes/inner/PCSSessionWrapper.m

@@ -0,0 +1,13 @@
+//
+//  PCSSessionWrapper.m
+//  sampleSDK
+//
+//  Created by 王昭威 on 2023/1/15.
+//
+
+#import "PCSSessionWrapper.h"
+#import <AVFoundation/AVFoundation.h>
+
+@implementation PCSSessionWrapper
+
+@end

+ 2 - 0
LenzCameraNativeModuleForRN/Classes/inner/UI/ModeListView/PCSModeList.h

@@ -20,6 +20,8 @@ typedef BOOL(^PCSModeListIndexChanged)(NSUInteger newIndex, NSUInteger oldIndex)
 @property (nonatomic, copy) PCSModeListIndexChanged indexChangedHandler;
 @property (nonatomic, assign) NSUInteger index;
 
+@property (nonatomic, assign) NSUInteger selectMode;
+
 - (void)reloadWith: (NSArray<id<OperationNodeProtocol>>*)items;
 
 - (void)updateIndexByTanslation: (CGPoint)translation;

+ 19 - 2
LenzCameraNativeModuleForRN/Classes/inner/UI/ModeListView/PCSModeList.m

@@ -89,19 +89,27 @@
 
 - (void)updateIndexByTanslation:(CGPoint)translation{
     NSUInteger oldIndex = self.index;
+    NSUInteger oldMode = self.selectMode;
+
     if(self.index < self.items.count - 1 && translation.x < 0){
         self.index += 1;
     }
     else if(self.index > 0 && translation.x > 0){
         self.index -= 1;
     }
+    
+    if (self.itemViews.count > self.index) {
+        self.selectMode = self.itemViews[self.index].tag;
+    }
+    
     if (oldIndex != self.index) {
         if(self.indexChangedHandler){
             
-            if (self.indexChangedHandler(self.index, oldIndex)) {
+            if (self.indexChangedHandler(self.selectMode, oldMode)) {
                 [self updateItemsConstraints];
             } else {
                 self.index = oldIndex;
+                self.selectMode = oldMode;
             }
         }
         [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{
@@ -128,12 +136,16 @@
     __block UILabel* previous = nil;
     NSMutableArray* labels = [NSMutableArray array];
     [items enumerateObjectsUsingBlock:^(id<OperationNodeProtocol> _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+        if (idx == 0) {
+            self.selectMode = obj.modeIndex;
+        }
         UILabel* label = [[UILabel alloc] init];
         label.font = [UIFont systemFontOfSize:13];
         [labels addObject:label];
         label.translatesAutoresizingMaskIntoConstraints = NO;
         label.text = obj.modeItemString;
         label.textColor = UIColor.whiteColor;
+        label.tag = obj.modeIndex;
         [self addSubview:label];
         [label mas_makeConstraints:^(MASConstraintMaker *make) {
             if(previous != nil){
@@ -157,6 +169,7 @@
         return;
     }
     self.index = 0;
+    self.selectMode = 0;
     
     NSMutableArray* labels = [self reloadItemViews];
     self.itemViews = [labels copy];
@@ -173,14 +186,18 @@
         if(CGRectContainsPoint(obj.frame, pt)){
             *stop = YES;
             NSUInteger oldIndex = self.index;
+            NSUInteger oldMode = self.selectMode;
+
             self.index = idx;
+            self.selectMode = obj.tag;
             
             if (oldIndex != self.index) {
                 if(self.indexChangedHandler){
-                    if (self.indexChangedHandler(self.index, oldIndex)) {
+                    if (self.indexChangedHandler(self.selectMode, oldMode)) {
                         [self updateItemsConstraints];
                     } else {
                         self.index = oldIndex;
+                        self.selectMode = oldMode;
                     }
                 }
                 [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{

+ 16 - 0
LenzCameraNativeModuleForRN/Classes/inner/cpp-headers.h

@@ -0,0 +1,16 @@
+//
+//  cpp-headers.h
+//  LenzCameraNativeModuleForRN
+//
+//  Created by 王昭威 on 2023/1/31.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface cpp_headers : NSObject
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 20 - 0
LenzCameraNativeModuleForRN/Classes/inner/cpp-headers.mm

@@ -0,0 +1,20 @@
+//
+//  cpp-headers.m
+//  LenzCameraNativeModuleForRN
+//
+//  Created by 王昭威 on 2023/1/31.
+//
+
+#import "cpp-headers.h"
+//#import <tenso>
+//#include <TensorFlow/lite/model.h>
+//#include "tensorflow/lite/model.h"
+//#include <TensorFlow/model.h>
+
+@implementation cpp_headers
+
+- (void)aaaa{
+//std::unique_ptr<tflite::FlatBufferModel> model = tflite::FlatBufferModel::BuildFromFile([self.modelPath UTF8String]);
+}
+
+@end