@infilect-sdk/capacitor-infiviz-shots 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/InfilectcapacitorCapacitorInfivizShots.podspec +30 -0
- package/LICENSE +21 -0
- package/README.md +5 -0
- package/android/build.gradle +116 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/android/gradle.properties +23 -0
- package/android/gradlew +251 -0
- package/android/gradlew.bat +94 -0
- package/android/settings.gradle +23 -0
- package/android/src/main/AndroidManifest.xml +28 -0
- package/android/src/main/consumer-rules.pro +21 -0
- package/android/src/main/java/com/infilectcapacitordev/capacitor/infivizshots/InfivizShotsEvents.kt +15 -0
- package/android/src/main/java/com/infilectcapacitordev/capacitor/infivizshots/InfivizShotsPlugin.kt +814 -0
- package/android/src/main/java/com/infilectcapacitordev/capacitor/infivizshots/PluginConstants.kt +40 -0
- package/android/src/main/java/com/infilectcapacitordev/capacitor/infivizshots/ResponseUtils.kt +80 -0
- package/android/src/main/java/com/infilectcapacitordev/capacitor/infivizshots/samplePlugin.kt +1118 -0
- package/android/src/main/proguard-rules.pro +25 -0
- package/dist/definitions.d.ts +224 -0
- package/dist/definitions.js +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +24 -0
- package/dist/web.d.ts +2 -0
- package/dist/web.js +65 -0
- package/ios/InfivizShotSDK.xcframework/Info.plist +44 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/AccuracyCheckViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ActionProgressSliderView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ActionableInsightsViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ActionsHeaderView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ActionsTableView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ActionsTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ActionsView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/Assets.car +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/BBoxImageSliderViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/Base.lproj/FullImageCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/CategoryTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/CircleViewWithNumber.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/CollapsibleHeaderView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/CollapsibleTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/DemoImageCollectionViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/EvidenceCategoryViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/FabBtnView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/Headers/InfivizShotSDK-Swift.h +1203 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/Headers/InfivizShotSDK.h +18 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ImageOverlayView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ImageQualityCollectionViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ImageQualityView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ImageSelectionTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ImageSelectionViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ImageViewFullScreenView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/InfivizShotSDK +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/Info.plist +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/LoaderViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/Localizable.strings +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/Modules/InfivizShotSDK.swiftmodule/arm64-apple-ios.abi.json +103989 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/Modules/InfivizShotSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/Modules/InfivizShotSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/Modules/module.modulemap +11 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/NotificationPermissionOverlayView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/OSAActionTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/PassthroughView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/PhotoSliderView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ProgressWithActionView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/RealmTimeChartAndGraphViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/RealtimeChartView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ReasonActionView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ReasonsActionCellViewTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ReasonsListView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ReasonsTableView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/SKUTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/SaveRetakeView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/SelectReasonsTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/SelectReasonsVIew.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/SessionStatusView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ShelvingActionPopup.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ShelvingActionsQuestionVIew.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ShelvingActionsTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ShelvingActionsView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ShelvingHeaderView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ShelvingViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/SpreadSheetXIBView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/StoreKPITableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/StoreLevelKPIViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/V1ListTabView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/V1ListTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/V1ListView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/V1ListViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/V1OptionTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/V1OptionsView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/V1ReasonTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/V1ReasonsView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/V1TabView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/V1TableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/V1ViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/V3CollectionViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/V3ViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/ViewOverlay.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/default_english.json +251 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/en.lproj/FullImageCell.strings +1 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/id.lproj/FullImageCell.strings +1 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase 2.mom +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase 3.mom +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase 4.mom +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase 5.mom +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase 6.mom +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase 7.mom +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase 7.omo +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase.mom +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/infivizshots.momd/VersionInfo.plist +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/shotsSDK.storyboardc/8Tq-Ro-cFI-view-Hie-zi-eQ4.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/shotsSDK.storyboardc/CameraViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/shotsSDK.storyboardc/Grb-Na-uhe-view-0fF-4V-Sp4.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/shotsSDK.storyboardc/ImagePreviewDetailsViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/shotsSDK.storyboardc/Info.plist +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/shotsSDK.storyboardc/LoaderViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/shotsSDK.storyboardc/SW9-KF-vYy-view-a8B-9e-hfC.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/shotsSDK.storyboardc/SessionDetailsViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64/InfivizShotSDK.framework/shotsSDK.storyboardc/xUL-ol-gRQ-view-6A8-mO-Rhi.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/AccuracyCheckViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ActionProgressSliderView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ActionableInsightsViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ActionsHeaderView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ActionsTableView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ActionsTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ActionsView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/Assets.car +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/BBoxImageSliderViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/Base.lproj/FullImageCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/CategoryTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/CircleViewWithNumber.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/CollapsibleHeaderView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/CollapsibleTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/DemoImageCollectionViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/EvidenceCategoryViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/FabBtnView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/Headers/InfivizShotSDK-Swift.h +2402 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/Headers/InfivizShotSDK.h +18 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ImageOverlayView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ImageQualityCollectionViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ImageQualityView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ImageSelectionTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ImageSelectionViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ImageViewFullScreenView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/InfivizShotSDK +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/Info.plist +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/LoaderViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/Localizable.strings +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/Modules/InfivizShotSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +103989 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/Modules/InfivizShotSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/Modules/InfivizShotSDK.swiftmodule/arm64-apple-ios-simulator.swiftmodule +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/Modules/InfivizShotSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +103989 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/Modules/InfivizShotSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/Modules/InfivizShotSDK.swiftmodule/x86_64-apple-ios-simulator.swiftmodule +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/Modules/module.modulemap +11 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/NotificationPermissionOverlayView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/OSAActionTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/PassthroughView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/PhotoSliderView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ProgressWithActionView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/RealmTimeChartAndGraphViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/RealtimeChartView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ReasonActionView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ReasonsActionCellViewTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ReasonsListView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ReasonsTableView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/SKUTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/SaveRetakeView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/SelectReasonsTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/SelectReasonsVIew.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/SessionStatusView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ShelvingActionPopup.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ShelvingActionsQuestionVIew.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ShelvingActionsTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ShelvingActionsView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ShelvingHeaderView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ShelvingViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/SpreadSheetXIBView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/StoreKPITableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/StoreLevelKPIViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/V1ListTabView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/V1ListTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/V1ListView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/V1ListViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/V1OptionTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/V1OptionsView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/V1ReasonTableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/V1ReasonsView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/V1TabView.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/V1TableViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/V1ViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/V3CollectionViewCell.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/V3ViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/ViewOverlay.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/default_english.json +251 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/en.lproj/FullImageCell.strings +1 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/id.lproj/FullImageCell.strings +1 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase 2.mom +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase 3.mom +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase 4.mom +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase 5.mom +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase 6.mom +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase 7.mom +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase 7.omo +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/infivizshots.momd/InfivizShotSDKDatabase.mom +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/infivizshots.momd/VersionInfo.plist +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/shotsSDK.storyboardc/8Tq-Ro-cFI-view-Hie-zi-eQ4.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/shotsSDK.storyboardc/CameraViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/shotsSDK.storyboardc/Grb-Na-uhe-view-0fF-4V-Sp4.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/shotsSDK.storyboardc/ImagePreviewDetailsViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/shotsSDK.storyboardc/Info.plist +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/shotsSDK.storyboardc/LoaderViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/shotsSDK.storyboardc/SW9-KF-vYy-view-a8B-9e-hfC.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/shotsSDK.storyboardc/SessionDetailsViewController.nib +0 -0
- package/ios/InfivizShotSDK.xcframework/ios-arm64_x86_64-simulator/InfivizShotSDK.framework/shotsSDK.storyboardc/xUL-ol-gRQ-view-6A8-mO-Rhi.nib +0 -0
- package/ios/Plugin/InfivizShotsPlugin.m +24 -0
- package/ios/Plugin/InfivizShotsPlugin.swift +735 -0
- package/ios/Plugin/Info.plist +16 -0
- package/ios/Podfile +8 -0
- package/package.json +58 -0
|
@@ -0,0 +1,735 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
import InfivizShotSDK
|
|
4
|
+
import UIKit
|
|
5
|
+
|
|
6
|
+
@objc(InfivizShotsPlugin)
|
|
7
|
+
public class InfivizShotsPlugin: CAPPlugin {
|
|
8
|
+
private var activity: InfivizShotsActivity?
|
|
9
|
+
|
|
10
|
+
@objc func echo(_ call: CAPPluginCall) {
|
|
11
|
+
print("InfivizShotsPlugin echo called")
|
|
12
|
+
let value = call.getString("value") ?? ""
|
|
13
|
+
call.resolve([
|
|
14
|
+
"value": value
|
|
15
|
+
])
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@objc func initialize(_ call: CAPPluginCall) {
|
|
19
|
+
let model = InfivizUserLoginContext(
|
|
20
|
+
appID: call.getString("appID") ?? "",
|
|
21
|
+
authSecret: call.getString("authSecret") ?? "",
|
|
22
|
+
accountKey: call.getString("accountKey") ?? "",
|
|
23
|
+
userID: call.getString("userID") ?? "",
|
|
24
|
+
clientID: call.getString("clientID") ?? "",
|
|
25
|
+
apiToken: call.getString("apiToken") ?? ""
|
|
26
|
+
)
|
|
27
|
+
let envString = call.getString("env") ?? "production"
|
|
28
|
+
let normalizedEnvString = envString.lowercased()
|
|
29
|
+
let env = APIEnvironment(rawValue: normalizedEnvString) ?? .production
|
|
30
|
+
InfivizShotsSDK.shared.initializeEnvironent(env)
|
|
31
|
+
activity = InfivizShotsActivity(model: model)
|
|
32
|
+
|
|
33
|
+
// Set up notification observers for native SDK events
|
|
34
|
+
setupNotificationObservers()
|
|
35
|
+
|
|
36
|
+
activity?.initialize { result in
|
|
37
|
+
switch result {
|
|
38
|
+
case .success(_):
|
|
39
|
+
call.resolve(["result": "Login successfully"])
|
|
40
|
+
case .failure(let error):
|
|
41
|
+
call.reject(error.localizedDescription)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@objc func initializeEnvironment(_ call: CAPPluginCall) {
|
|
47
|
+
let envString = call.getString("environment") ?? "production"
|
|
48
|
+
let normalizedEnvString = envString.lowercased()
|
|
49
|
+
|
|
50
|
+
guard let env = APIEnvironment(rawValue: normalizedEnvString) else {
|
|
51
|
+
call.reject("Invalid environment: '\(envString)'. Valid options: 'production', 'staging'")
|
|
52
|
+
return
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
call.resolve([
|
|
57
|
+
"result": "Environment initialized successfully",
|
|
58
|
+
"environment": normalizedEnvString
|
|
59
|
+
])
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
private func setupNotificationObservers() {
|
|
63
|
+
print("🔔 Setting up notification observers for iOS SDK notifications...")
|
|
64
|
+
|
|
65
|
+
// Listen for the exact notification names the iOS SDK posts
|
|
66
|
+
let notificationNames = [
|
|
67
|
+
"ActionsGeneratedEvent",
|
|
68
|
+
"SessionRealTimeResultEvent",
|
|
69
|
+
"SESSION_PROCESSING_SLA_BREACHED",
|
|
70
|
+
"IMAGE_SLOW_UPLOAD",
|
|
71
|
+
"IMAGE_UPLOAD_FAILED",
|
|
72
|
+
"SESSION_UPLOAD_FAILED",
|
|
73
|
+
"HIGH_CPU_USAGE",
|
|
74
|
+
"HIGH_DEVICE_TEMPERATURE",
|
|
75
|
+
"LOW_DEVICE_STORAGE",
|
|
76
|
+
"LOW_BATTERY"
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
for name in notificationNames {
|
|
80
|
+
NotificationCenter.default.addObserver(
|
|
81
|
+
self,
|
|
82
|
+
selector: #selector(handleSDKNotification),
|
|
83
|
+
name: Notification.Name(name),
|
|
84
|
+
object: nil
|
|
85
|
+
)
|
|
86
|
+
print("🔔 Listening for notification: \(name)")
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
print("🔔 Notification observers setup complete for iOS SDK notifications")
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@objc private func handleSDKNotification(_ notification: Notification) {
|
|
93
|
+
let notificationName = notification.name.rawValue
|
|
94
|
+
print("🔔 iOS SDK notification received: \(notificationName)")
|
|
95
|
+
let payload = notification.userInfo as? [String: Any] ?? [:]
|
|
96
|
+
print("🔔 iOS SDK notification payload: \(payload)")
|
|
97
|
+
|
|
98
|
+
// Since we're listening for exact names, forward directly to Capacitor
|
|
99
|
+
notifyListeners(notificationName, data: payload)
|
|
100
|
+
print("🔔 Forwarded to Capacitor as: \(notificationName)")
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@objc func fetchUniversalSessionId(_ call: CAPPluginCall) {
|
|
104
|
+
let tempID = call.getString("temporarySessionID") ?? ""
|
|
105
|
+
|
|
106
|
+
InfivizShotsSDK.shared.fetchUniversalSessionId(temporarySessionID: tempID, completion: { sessionID, error in
|
|
107
|
+
if let error = error {
|
|
108
|
+
call.reject(error.localizedDescription)
|
|
109
|
+
}else{
|
|
110
|
+
call.resolve(["status": "200", "sessionId": sessionID as Any])
|
|
111
|
+
}
|
|
112
|
+
})
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@objc func fetchSessionID(_ call: CAPPluginCall) {
|
|
116
|
+
let taskCategory = call.getString("taskCategory") ?? ""
|
|
117
|
+
let storeID = call.getString("storeID") ?? ""
|
|
118
|
+
let taskPhotoType = call.getString("taskPhotoType") ?? ""
|
|
119
|
+
|
|
120
|
+
// Implementation depends on SDK method - placeholder for now
|
|
121
|
+
InfivizShotsSDK.shared.fetchSessionID(taskCategory: taskCategory, storeID: storeID, taskPhotoType: taskPhotoType) { tempSessionID, error in
|
|
122
|
+
|
|
123
|
+
if let error = error {
|
|
124
|
+
call.reject(error.localizedDescription)
|
|
125
|
+
}else{
|
|
126
|
+
call.resolve(["tempSessionID": tempSessionID ?? ""])
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@objc func syncSession(_ call: CAPPluginCall) {
|
|
132
|
+
let sessionId = call.getString("sessionId") ?? ""
|
|
133
|
+
InfivizShotsSDK.shared.uploadSession(temporarySessionID: sessionId) { result in
|
|
134
|
+
switch result {
|
|
135
|
+
case .success(let response):
|
|
136
|
+
// Emit SyncCompleted event
|
|
137
|
+
self.notifyListeners("SyncEvent", data: [
|
|
138
|
+
"temporarySessionID": sessionId,
|
|
139
|
+
"status": "200",
|
|
140
|
+
"message":"Processing of images started, Will notify you once it is completed",
|
|
141
|
+
"universalSessionID": response
|
|
142
|
+
])
|
|
143
|
+
call.resolve(["status": "200", "message": response])
|
|
144
|
+
case .failure(let error):
|
|
145
|
+
// Emit SyncCompleted event with error
|
|
146
|
+
self.notifyListeners("SyncEvent", data: [
|
|
147
|
+
"sessionId": sessionId,
|
|
148
|
+
"status": error.code,
|
|
149
|
+
"message": error.message
|
|
150
|
+
])
|
|
151
|
+
call.reject(error.localizedDescription)
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@objc func syncSessions(_ call: CAPPluginCall) {
|
|
157
|
+
let temporarySessionIDs = call.getArray("temporarySessionIDs", String.self) ?? []
|
|
158
|
+
InfivizShotsSDK.shared.syncSessions(temporarySessionIDs: temporarySessionIDs) { sessionId, result in
|
|
159
|
+
switch result {
|
|
160
|
+
case .success(let response):
|
|
161
|
+
self.notifyListeners("SyncCompleted", data: [
|
|
162
|
+
"status": "success",
|
|
163
|
+
"sessionId": sessionId,
|
|
164
|
+
"message": response
|
|
165
|
+
])
|
|
166
|
+
call.resolve([
|
|
167
|
+
"status": "200",
|
|
168
|
+
"sessionId": sessionId,
|
|
169
|
+
"message": response
|
|
170
|
+
])
|
|
171
|
+
|
|
172
|
+
case .failure(let error):
|
|
173
|
+
self.notifyListeners("SyncCompleted", data: [
|
|
174
|
+
"status": "error",
|
|
175
|
+
"sessionId": sessionId,
|
|
176
|
+
"message": error.localizedDescription
|
|
177
|
+
])
|
|
178
|
+
call.resolve([
|
|
179
|
+
"status": "400",
|
|
180
|
+
"sessionId": sessionId,
|
|
181
|
+
"message": error.localizedDescription
|
|
182
|
+
])
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@objc func getSessionStatus(_ call: CAPPluginCall) {
|
|
188
|
+
let id = call.getString("sessionId") ?? ""
|
|
189
|
+
InfivizShotsSDK.shared.checkState(sessionID: id) { result in
|
|
190
|
+
switch result {
|
|
191
|
+
case .success(let response):
|
|
192
|
+
call.resolve(["sessionId": id, "status": response])
|
|
193
|
+
case .failure(let error):
|
|
194
|
+
call.reject(error.localizedDescription)
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@objc func fetchSessionDetails(_ call: CAPPluginCall) {
|
|
200
|
+
let temporarySessionID = call.getString("temporarySessionID") ?? ""
|
|
201
|
+
InfivizShotsSDK.shared.fetchSessionDetails(temporarySessionID: temporarySessionID) { result in
|
|
202
|
+
switch result {
|
|
203
|
+
case .success(let response):
|
|
204
|
+
|
|
205
|
+
let convertedResponse = self.toJsonSafe(response) as? [String: Any] ?? [:]
|
|
206
|
+
|
|
207
|
+
// Ensure status field is properly handled
|
|
208
|
+
var finalResponse = convertedResponse
|
|
209
|
+
if let statusValue = convertedResponse["status"] {
|
|
210
|
+
// If status is NSNull, try to get a default value
|
|
211
|
+
if statusValue is NSNull {
|
|
212
|
+
finalResponse["status"] = InfivizShotSDK.SessionSyncStateEnum.NOT_SYNCED.rawValue // Default fallback
|
|
213
|
+
}
|
|
214
|
+
} else {
|
|
215
|
+
finalResponse["status"] = InfivizShotSDK.SessionSyncStateEnum.NOT_SYNCED.rawValue // Default fallback
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
call.resolve(["sessionDetails": finalResponse])
|
|
219
|
+
case .failure(let error):
|
|
220
|
+
call.reject(error.localizedDescription)
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@objc func syncAllData(_ call: CAPPluginCall) {
|
|
226
|
+
// Implementation depends on SDK method - placeholder for now
|
|
227
|
+
call.reject("Method not implemented in current SDK version")
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@objc func logout(_ call: CAPPluginCall) {
|
|
231
|
+
InfivizShotsSDK.shared.callLogoutAPI { result in
|
|
232
|
+
switch result {
|
|
233
|
+
case .success(let message):
|
|
234
|
+
call.resolve(["result": message])
|
|
235
|
+
case .failure(let error):
|
|
236
|
+
call.reject(error.localizedDescription)
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@objc func getReprocessingButtonEnableTime(_ call: CAPPluginCall) {
|
|
242
|
+
let sessionID = call.getString("sessionID") ?? ""
|
|
243
|
+
// Implementation depends on SDK method - placeholder for now
|
|
244
|
+
call.reject("Method not implemented in current SDK version")
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@objc func startReprocessingWorkflow(_ call: CAPPluginCall) {
|
|
248
|
+
let sessionID = call.getString("sessionID") ?? ""
|
|
249
|
+
// Implementation depends on SDK method - placeholder for now
|
|
250
|
+
call.reject("Method not implemented in current SDK version")
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@objc func startCamera(_ call: CAPPluginCall) {
|
|
254
|
+
DispatchQueue.main.async {
|
|
255
|
+
let navigationController = self.getTopNavigationController()
|
|
256
|
+
let metaData = call.getObject("metaData") as? [String: Any]
|
|
257
|
+
|
|
258
|
+
// Store the initial view controller count to detect if SDK pushed anything
|
|
259
|
+
let initialVCCount = navigationController?.viewControllers.count ?? 0
|
|
260
|
+
|
|
261
|
+
let context = CameraContext(
|
|
262
|
+
taskName: call.getString("taskName") ?? "",
|
|
263
|
+
storeTitle: call.getString("storeTitle") ?? "",
|
|
264
|
+
storeId: call.getString("storeId") ?? "",
|
|
265
|
+
photoType: call.getString("photoType") ?? "",
|
|
266
|
+
category: call.getString("category") ?? "",
|
|
267
|
+
maxPhoto: call.getInt("maxPhoto") ?? 0,
|
|
268
|
+
maxPhotoOneGo: call.getInt("maxPhotoOneGo") ?? 0,
|
|
269
|
+
tempSessionId: nil,
|
|
270
|
+
imageURI: nil,
|
|
271
|
+
navigationController: navigationController,
|
|
272
|
+
retake: false,
|
|
273
|
+
metaData: metaData
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
let camera = InfilectSDKCameraActivityForResult(cameraContext: context)
|
|
277
|
+
camera.start { result in
|
|
278
|
+
DispatchQueue.main.async {
|
|
279
|
+
switch result {
|
|
280
|
+
case .success(let sessionID):
|
|
281
|
+
call.resolve(["sessionId": sessionID])
|
|
282
|
+
case .failure(let error):
|
|
283
|
+
self.dismissCameraOnError(navigationController: navigationController, initialVCCount: initialVCCount)
|
|
284
|
+
call.reject(error.localizedDescription)
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
private func dismissCameraOnError(navigationController: UINavigationController?, initialVCCount: Int) {
|
|
292
|
+
guard let navController = navigationController else { return }
|
|
293
|
+
|
|
294
|
+
// First, dismiss any view controller presented on top of the navigation controller
|
|
295
|
+
if let presentedVC = navController.presentedViewController {
|
|
296
|
+
presentedVC.dismiss(animated: false, completion: nil)
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
let currentVCCount = navController.viewControllers.count
|
|
300
|
+
|
|
301
|
+
if currentVCCount > initialVCCount {
|
|
302
|
+
// Pop back to the state before camera was started
|
|
303
|
+
if initialVCCount > 0 {
|
|
304
|
+
let targetVC = navController.viewControllers[initialVCCount - 1]
|
|
305
|
+
navController.popToViewController(targetVC, animated: false)
|
|
306
|
+
} else {
|
|
307
|
+
navController.popToRootViewController(animated: false)
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// If the navigation controller was created empty (by getTopNavigationController)
|
|
312
|
+
// and is still empty, dismiss it entirely
|
|
313
|
+
if navController.viewControllers.isEmpty {
|
|
314
|
+
navController.dismiss(animated: false, completion: nil)
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
@objc func resumeCamera(_ call: CAPPluginCall) {
|
|
319
|
+
DispatchQueue.main.async {
|
|
320
|
+
let tempId = call.getString("temporarySessionID") ?? ""
|
|
321
|
+
let metaData: [String: Any]? = call.getObject("metaData") as? [String: Any]
|
|
322
|
+
let navigationController = self.getTopNavigationController()
|
|
323
|
+
|
|
324
|
+
let initialVCCount = navigationController?.viewControllers.count ?? 0
|
|
325
|
+
|
|
326
|
+
let context = CameraContext(
|
|
327
|
+
taskName: "",
|
|
328
|
+
storeTitle: "",
|
|
329
|
+
storeId: "",
|
|
330
|
+
photoType: "",
|
|
331
|
+
category: "",
|
|
332
|
+
maxPhoto: 0,
|
|
333
|
+
maxPhotoOneGo: 0,
|
|
334
|
+
navigationController: navigationController
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
let controller = InfilectSDKCameraActivityForResult(cameraContext: context)
|
|
338
|
+
|
|
339
|
+
controller.resumeCamera(sessionID: tempId, metaData: metaData) { result in
|
|
340
|
+
DispatchQueue.main.async {
|
|
341
|
+
switch result {
|
|
342
|
+
case .success(let sessionID):
|
|
343
|
+
call.resolve(["sessionId": sessionID])
|
|
344
|
+
|
|
345
|
+
case .failure(let sdkError):
|
|
346
|
+
self.dismissCameraOnError(navigationController: navigationController, initialVCCount: initialVCCount)
|
|
347
|
+
let nsError = sdkError as NSError
|
|
348
|
+
call.reject(
|
|
349
|
+
"Failed to resume camera: \(nsError.localizedDescription)",
|
|
350
|
+
"ResumeCameraError",
|
|
351
|
+
nsError
|
|
352
|
+
)
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
@objc func retakeImage(_ call: CAPPluginCall) {
|
|
360
|
+
DispatchQueue.main.async {
|
|
361
|
+
let navigationController = self.getTopNavigationController()
|
|
362
|
+
let temporarySessionId = call.getString("temporarySessionId") ?? ""
|
|
363
|
+
let imageURI = call.getString("imageURI") ?? ""
|
|
364
|
+
|
|
365
|
+
let initialVCCount = navigationController?.viewControllers.count ?? 0
|
|
366
|
+
|
|
367
|
+
let context = CameraContext(
|
|
368
|
+
taskName: call.getString("taskName") ?? "",
|
|
369
|
+
storeTitle: call.getString("storeTitle") ?? "",
|
|
370
|
+
storeId: call.getString("storeId") ?? "",
|
|
371
|
+
photoType: call.getString("photoType") ?? "",
|
|
372
|
+
category: call.getString("category") ?? "",
|
|
373
|
+
maxPhoto: call.getInt("maxPhoto") ?? 0,
|
|
374
|
+
maxPhotoOneGo: call.getInt("maxPhotoOneGo") ?? 0,
|
|
375
|
+
navigationController: navigationController
|
|
376
|
+
)
|
|
377
|
+
|
|
378
|
+
let camera = InfilectSDKCameraActivityForResult(cameraContext: context)
|
|
379
|
+
camera.retakeImage(imageURL: imageURI, sessionID: temporarySessionId) { result in
|
|
380
|
+
DispatchQueue.main.async {
|
|
381
|
+
switch result {
|
|
382
|
+
case .success(let sessionID):
|
|
383
|
+
call.resolve(["sessionId": sessionID])
|
|
384
|
+
case .failure(let error):
|
|
385
|
+
self.dismissCameraOnError(navigationController: navigationController, initialVCCount: initialVCCount)
|
|
386
|
+
call.reject(error.localizedDescription)
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
@objc func deletePhoto(_ call: CAPPluginCall) {
|
|
394
|
+
let temporarySessionId = call.getString("temporarySessionId") ?? ""
|
|
395
|
+
let imageURI = call.getString("imageURI") ?? ""
|
|
396
|
+
|
|
397
|
+
let context = CameraContext(
|
|
398
|
+
taskName: call.getString("taskName") ?? ".",
|
|
399
|
+
storeTitle: call.getString("storeTitle") ?? ".",
|
|
400
|
+
storeId: call.getString("storeId") ?? ".",
|
|
401
|
+
photoType: call.getString("photoType") ?? ".",
|
|
402
|
+
category: call.getString("category") ?? ".",
|
|
403
|
+
maxPhoto: call.getInt("maxPhoto") ?? 0,
|
|
404
|
+
maxPhotoOneGo: call.getInt("maxPhotoOneGo") ?? 0,
|
|
405
|
+
navigationController: nil
|
|
406
|
+
)
|
|
407
|
+
|
|
408
|
+
let camera = InfilectSDKCameraActivityForResult(cameraContext: context)
|
|
409
|
+
camera.deleteImage(imageURL: imageURI, sessionID: temporarySessionId) { result in
|
|
410
|
+
switch result {
|
|
411
|
+
case .success(let message):
|
|
412
|
+
call.resolve(["message": message])
|
|
413
|
+
case .failure(let error):
|
|
414
|
+
call.reject(error.localizedDescription)
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
@objc func getIrResult(_ call: CAPPluginCall) {
|
|
420
|
+
let sessionId = call.getString("sessionId") ?? ""
|
|
421
|
+
InfivizShotsSDK.shared.getIrResult(sessionID: sessionId) { result, error in
|
|
422
|
+
if let error = error {
|
|
423
|
+
call.reject("Failed to get IR result: \(error)")
|
|
424
|
+
} else {
|
|
425
|
+
call.resolve([
|
|
426
|
+
"result": result ?? "",
|
|
427
|
+
"error": error
|
|
428
|
+
])
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
@objc func getActionsResult(_ call: CAPPluginCall) {
|
|
434
|
+
let sessionId = call.getString("sessionId") ?? ""
|
|
435
|
+
InfivizShotsSDK.shared.getActionsResult(sessionID: sessionId) { result, error in
|
|
436
|
+
if let error = error {
|
|
437
|
+
call.reject("Failed to get actions result: \(error)")
|
|
438
|
+
} else {
|
|
439
|
+
call.resolve([
|
|
440
|
+
"result": result ?? "",
|
|
441
|
+
"error": error
|
|
442
|
+
])
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
@objc func testNotifications(_ call: CAPPluginCall) {
|
|
448
|
+
print("🧪 Testing iOS SDK notification capture system...")
|
|
449
|
+
|
|
450
|
+
// Test the exact notification names the iOS SDK posts
|
|
451
|
+
DispatchQueue.main.async {
|
|
452
|
+
// Test ActionsGeneratedEvent
|
|
453
|
+
NotificationCenter.default.post(
|
|
454
|
+
name: Notification.Name("ActionsGeneratedEvent"),
|
|
455
|
+
object: self,
|
|
456
|
+
userInfo: ["test": "actions", "timestamp": Date().timeIntervalSince1970]
|
|
457
|
+
)
|
|
458
|
+
|
|
459
|
+
// Test SessionRealTimeResultEvent
|
|
460
|
+
NotificationCenter.default.post(
|
|
461
|
+
name: Notification.Name("SessionRealTimeResultEvent"),
|
|
462
|
+
object: self,
|
|
463
|
+
userInfo: ["test": "realtime", "timestamp": Date().timeIntervalSince1970]
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
// Test SyncCompleted event (this is already implemented in sync methods)
|
|
467
|
+
self.notifyListeners("SyncCompleted", data: [
|
|
468
|
+
"test": "sync",
|
|
469
|
+
"timestamp": Date().timeIntervalSince1970,
|
|
470
|
+
"sessionId": "test-session"
|
|
471
|
+
])
|
|
472
|
+
|
|
473
|
+
print("🧪 Test notifications posted for iOS SDK notifications")
|
|
474
|
+
call.resolve(["status": "Test notifications posted for iOS SDK notification capture"])
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
@objc func triggerNotification(_ call: CAPPluginCall) {
|
|
479
|
+
let notificationName = call.getString("name") ?? "TestNotification"
|
|
480
|
+
let payload = call.getObject("payload") as? [String: Any] ?? ["test": "manual_trigger"]
|
|
481
|
+
|
|
482
|
+
print("🧪 Manually triggering notification: \(notificationName)")
|
|
483
|
+
|
|
484
|
+
DispatchQueue.main.async {
|
|
485
|
+
NotificationCenter.default.post(
|
|
486
|
+
name: Notification.Name(notificationName),
|
|
487
|
+
object: self,
|
|
488
|
+
userInfo: payload
|
|
489
|
+
)
|
|
490
|
+
|
|
491
|
+
call.resolve([
|
|
492
|
+
"status": "success",
|
|
493
|
+
"notification": notificationName,
|
|
494
|
+
"payload": payload
|
|
495
|
+
])
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
@objc func viewIRResults(_ call: CAPPluginCall) {
|
|
500
|
+
let sessionId = call.getString("sessionId") ?? ""
|
|
501
|
+
// Implementation depends on SDK method - placeholder for now
|
|
502
|
+
call.reject("Method not implemented in current SDK version")
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
@objc func checkTokenValidity(_ call: CAPPluginCall) {
|
|
506
|
+
let clientID = call.getString("clientID") ?? ""
|
|
507
|
+
let userID = call.getString("userID") ?? ""
|
|
508
|
+
|
|
509
|
+
InfivizShotsSDK.shared.checkTokenValidity(clientID: clientID, userID: userID) { result in
|
|
510
|
+
switch result {
|
|
511
|
+
case .success(let isValid):
|
|
512
|
+
call.resolve(["isValid": isValid])
|
|
513
|
+
case .failure(let error):
|
|
514
|
+
call.reject(error.localizedDescription)
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
@objc func fetchLatestSdkStatus(_ call: CAPPluginCall) {
|
|
520
|
+
InfivizShotsSDK.shared.fetchLatestSdkStatus { [weak self] result in
|
|
521
|
+
guard let self = self else {
|
|
522
|
+
call.reject("FETCH_LATEST_SDK_STATUS_ERROR", "Plugin deallocated", nil)
|
|
523
|
+
return
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
if let sdkStatus = result {
|
|
527
|
+
let statusDict = self.convertToCleanDictionary(sdkStatus)
|
|
528
|
+
call.resolve(statusDict)
|
|
529
|
+
} else {
|
|
530
|
+
call.reject("FETCH_LATEST_SDK_STATUS_ERROR", "No data found", nil)
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
@objc func fetchSdkStatusLogs(_ call: CAPPluginCall) {
|
|
536
|
+
let days = call.getInt("days") ?? 7
|
|
537
|
+
|
|
538
|
+
InfivizShotsSDK.shared.fetchSdkStatusLogs(days: days) { [weak self] sdkStatusArray in
|
|
539
|
+
guard let self = self else {
|
|
540
|
+
call.reject("FETCH_SDK_STATUS_LOGS_ERROR", "Plugin deallocated", nil)
|
|
541
|
+
return
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
if let statusArray = sdkStatusArray {
|
|
545
|
+
let jsonArray = statusArray.map { sdkStatus -> [String: Any] in
|
|
546
|
+
return self.convertToCleanDictionary(sdkStatus)
|
|
547
|
+
}
|
|
548
|
+
call.resolve(["logs": jsonArray])
|
|
549
|
+
} else {
|
|
550
|
+
call.reject("FETCH_SDK_STATUS_LOGS_ERROR", "Failed to fetch SDK status logs", nil)
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
private func convertToCleanDictionary(_ value: Any) -> [String: Any] {
|
|
556
|
+
if let dict = toJsonSafe(value) as? [String: Any] {
|
|
557
|
+
return dict
|
|
558
|
+
}
|
|
559
|
+
return [:]
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
@objc func startActionsWorkFlow(_ call: CAPPluginCall) {
|
|
563
|
+
let storeId = call.getString("storeId") ?? ""
|
|
564
|
+
let sessionId = call.getString("sessionId") ?? ""
|
|
565
|
+
let latitude = call.getString("latitude") ?? ""
|
|
566
|
+
let longitude = call.getString("longitude") ?? ""
|
|
567
|
+
let dateTimeStamp = call.getString("dateTimeStamp") ?? ""
|
|
568
|
+
// Implementation depends on SDK method - placeholder for now
|
|
569
|
+
call.reject("Method not implemented in current SDK version")
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
private func getTopNavigationController() -> UINavigationController? {
|
|
573
|
+
var top = UIApplication.shared
|
|
574
|
+
.connectedScenes
|
|
575
|
+
.compactMap { $0 as? UIWindowScene }
|
|
576
|
+
.flatMap { $0.windows }
|
|
577
|
+
.first(where: { $0.isKeyWindow })?.rootViewController
|
|
578
|
+
while let presented = top?.presentedViewController {
|
|
579
|
+
top = presented
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
if let nav = top as? UINavigationController {
|
|
583
|
+
return nav
|
|
584
|
+
} else if let nav = top?.navigationController {
|
|
585
|
+
return nav
|
|
586
|
+
} else {
|
|
587
|
+
let nav = UINavigationController()
|
|
588
|
+
nav.modalPresentationStyle = .fullScreen
|
|
589
|
+
top?.present(nav, animated: true, completion: nil)
|
|
590
|
+
return nav
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
private func toJsonSafe(_ value: Any?) -> Any? {
|
|
595
|
+
|
|
596
|
+
guard let value = value else { return nil }
|
|
597
|
+
|
|
598
|
+
// MARK: Primitive types
|
|
599
|
+
if let v = value as? String { return v }
|
|
600
|
+
if let v = value as? Int { return v }
|
|
601
|
+
if let v = value as? Double { return v }
|
|
602
|
+
if let v = value as? Float { return Double(v) }
|
|
603
|
+
if let v = value as? Bool { return v }
|
|
604
|
+
|
|
605
|
+
// MARK: URL → String
|
|
606
|
+
if let v = value as? URL {
|
|
607
|
+
return v.absoluteString
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
// MARK: Date → String
|
|
611
|
+
if let v = value as? Date {
|
|
612
|
+
return ISO8601DateFormatter().string(from: v)
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
// MARK: JSONValue enum from InfivizShotSDK
|
|
616
|
+
if let jsonValue = value as? JSONValue {
|
|
617
|
+
return convertJSONValue(jsonValue)
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
// MARK: Array
|
|
621
|
+
if let array = value as? [Any] {
|
|
622
|
+
return array.compactMap { toJsonSafe($0) }
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
// MARK: Dictionary
|
|
626
|
+
if let dict = value as? [String: Any] {
|
|
627
|
+
var newDict: [String: Any] = [:]
|
|
628
|
+
for (key, val) in dict {
|
|
629
|
+
newDict[key] = toJsonSafe(val)
|
|
630
|
+
}
|
|
631
|
+
return newDict
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
// MARK: Dictionary with JSONValue values
|
|
635
|
+
if let dict = value as? [String: JSONValue] {
|
|
636
|
+
var newDict: [String: Any] = [:]
|
|
637
|
+
for (key, val) in dict {
|
|
638
|
+
if let converted = convertJSONValue(val) {
|
|
639
|
+
newDict[key] = converted
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
return newDict
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
// 5. Enum like SessionSyncStateEnum
|
|
646
|
+
|
|
647
|
+
if let typeName = String(describing: type(of: value)) as? String, typeName.contains("InfivizShotSDK.SessionSyncStateEnum") {
|
|
648
|
+
return String(describing: value)
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
// 5a. Handle SessionSyncStateEnum directly if it's the actual enum type
|
|
652
|
+
if let sessionState = value as? InfivizShotSDK.SessionSyncStateEnum {
|
|
653
|
+
return sessionState.rawValue
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
// MARK: Enum → String
|
|
657
|
+
if let enumValue = value as? CustomStringConvertible {
|
|
658
|
+
return enumValue.description
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
// MARK: Custom Object (Recursive)
|
|
662
|
+
let mirror = Mirror(reflecting: value)
|
|
663
|
+
|
|
664
|
+
if mirror.displayStyle == .struct || mirror.displayStyle == .class {
|
|
665
|
+
var result: [String: Any] = [:]
|
|
666
|
+
|
|
667
|
+
for child in mirror.children {
|
|
668
|
+
if let key = child.label {
|
|
669
|
+
result[key] = toJsonSafe(child.value)
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
return result
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
return nil
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
private func convertJSONValue(_ jsonValue: JSONValue) -> Any? {
|
|
679
|
+
let mirror = Mirror(reflecting: jsonValue)
|
|
680
|
+
guard let associated = mirror.children.first else {
|
|
681
|
+
return nil
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
switch associated.label {
|
|
685
|
+
case "string":
|
|
686
|
+
return associated.value as? String
|
|
687
|
+
case "bool":
|
|
688
|
+
return associated.value as? Bool
|
|
689
|
+
case "int":
|
|
690
|
+
return associated.value as? Int
|
|
691
|
+
case "double":
|
|
692
|
+
return associated.value as? Double
|
|
693
|
+
case "array":
|
|
694
|
+
if let arr = associated.value as? [JSONValue] {
|
|
695
|
+
return arr.compactMap { convertJSONValue($0) }
|
|
696
|
+
}
|
|
697
|
+
return nil
|
|
698
|
+
case "object", "dictionary":
|
|
699
|
+
if let dict = associated.value as? [String: JSONValue] {
|
|
700
|
+
var newDict: [String: Any] = [:]
|
|
701
|
+
for (key, val) in dict {
|
|
702
|
+
if let converted = convertJSONValue(val) {
|
|
703
|
+
newDict[key] = converted
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
return newDict
|
|
707
|
+
}
|
|
708
|
+
return nil
|
|
709
|
+
default:
|
|
710
|
+
return nil
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
deinit {
|
|
715
|
+
// Remove notification observers for iOS SDK notifications
|
|
716
|
+
let notificationNames = [
|
|
717
|
+
"ActionsGeneratedEvent",
|
|
718
|
+
"SessionRealTimeResultEvent",
|
|
719
|
+
"SESSION_PROCESSING_SLA_BREACHED",
|
|
720
|
+
"IMAGE_SLOW_UPLOAD",
|
|
721
|
+
"IMAGE_UPLOAD_FAILED",
|
|
722
|
+
"SESSION_UPLOAD_FAILED",
|
|
723
|
+
"HIGH_CPU_USAGE",
|
|
724
|
+
"HIGH_DEVICE_TEMPERATURE",
|
|
725
|
+
"LOW_DEVICE_STORAGE",
|
|
726
|
+
"LOW_BATTERY"
|
|
727
|
+
]
|
|
728
|
+
|
|
729
|
+
for name in notificationNames {
|
|
730
|
+
NotificationCenter.default.removeObserver(self, name: Notification.Name(name), object: nil)
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
print("🔔 iOS SDK notification observers removed")
|
|
734
|
+
}
|
|
735
|
+
}
|