@thegrizzlylabs/react-native-genius-scan 6.6.0 → 6.7.0

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.
Files changed (159) hide show
  1. package/README.md +5 -8
  2. package/android/build.gradle +1 -1
  3. package/ios/GSSDK/GSSDK.xcframework/Info.plist +4 -5
  4. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Assets.car +0 -0
  5. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/Info.plist +0 -0
  6. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
  7. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +3 -2
  8. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
  9. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +41 -13
  10. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +699 -699
  11. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  12. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +699 -699
  13. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PhoneNumberKit_GSKPhoneNumberKit.bundle/Info.plist +0 -0
  14. package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Assets.car +0 -0
  15. package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/Info.plist +0 -0
  16. package/ios/GSSDK/GSSDK.xcframework/ios-arm64-simulator/GSSDK.framework/GSSDK +0 -0
  17. package/ios/GSSDK/GSSDK.xcframework/ios-arm64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +1843 -0
  18. package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Info.plist +0 -0
  19. package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +41 -13
  20. package/ios/GSSDK/GSSDK.xcframework/ios-arm64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1247 -0
  21. package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  22. package/ios/GSSDK/GSSDK.xcframework/ios-arm64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1247 -0
  23. package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/PhoneNumberKit_GSKPhoneNumberKit.bundle/Info.plist +0 -0
  24. package/package.json +1 -1
  25. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
  26. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +0 -3680
  27. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +0 -1247
  28. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +0 -1247
  29. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +0 -45915
  30. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +0 -1247
  31. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  32. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +0 -1247
  33. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/AdobeRGB1998.icc +0 -0
  34. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/DeviceList.plist +0 -0
  35. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/PrivacyInfo.xcprivacy +0 -0
  36. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKBackgroundKind.h +0 -0
  37. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKCurvatureCorrectionConfiguration.h +0 -0
  38. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKCurvatureLevel.h +0 -0
  39. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKCurvatureResult.h +0 -0
  40. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKDefaultLogLevel.h +0 -0
  41. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKDefaultLogger.h +0 -0
  42. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKDetectQuadrangleOptions.h +0 -0
  43. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKDocumentComposition.h +0 -0
  44. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKDocumentDetector.h +0 -0
  45. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKEdgeCleaning.h +0 -0
  46. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKEnhancementConfiguration.h +0 -0
  47. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKError.h +0 -0
  48. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKFilterColorPalette.h +0 -0
  49. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKFilterStyle.h +0 -0
  50. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKLicenseKeyChecker.h +0 -0
  51. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKLog.h +0 -0
  52. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKLogger.h +0 -0
  53. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKLoggerSeverity.h +0 -0
  54. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKMagnifierView.h +0 -0
  55. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKOutputConfiguration.h +0 -0
  56. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKPerspectiveCorrectionConfiguration.h +0 -0
  57. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKProcessingConfiguration.h +0 -0
  58. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKProcessingResult.h +0 -0
  59. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKQuadrangle.h +0 -0
  60. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKReadabilityConfiguration.h +0 -0
  61. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKReadabilityLevel.h +0 -0
  62. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKReadabilityResult.h +0 -0
  63. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKResizeConfiguration.h +0 -0
  64. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKResizeResult.h +0 -0
  65. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKRotation.h +0 -0
  66. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKRotationConfiguration.h +0 -0
  67. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKScan.h +0 -0
  68. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKScanFlowError+PluginPayload.h +0 -0
  69. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKScanFlowErrorDomain.h +0 -0
  70. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKScanFlowOCROutputFormats.h +0 -0
  71. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKScanFlowPostProcessingActions.h +0 -0
  72. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +0 -0
  73. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSKScanProcessor.h +0 -0
  74. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/GSSDK.h +0 -0
  75. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Headers/UIImage+GSKUtils.h +0 -0
  76. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/Modules/module.modulemap +0 -0
  77. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/PhoneNumberKit_GSKPhoneNumberKit.bundle/PhoneNumberMetadata.json +0 -0
  78. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/PhoneNumberKit_GSKPhoneNumberKit.bundle/PrivacyInfo.xcprivacy +0 -0
  79. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/PrivacyInfo.xcprivacy +0 -0
  80. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/accommodation-keywords.txt +0 -0
  81. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/ar.lproj/GSSDK.strings +0 -0
  82. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/ar.lproj/GSSDK.stringsdict +0 -0
  83. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/ar.lproj/Localizable.strings +0 -0
  84. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/backbone.tflite +0 -0
  85. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/confusables.json +0 -0
  86. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/da.lproj/GSSDK.strings +0 -0
  87. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/da.lproj/GSSDK.stringsdict +0 -0
  88. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/da.lproj/Localizable.strings +0 -0
  89. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/de.lproj/GSSDK.strings +0 -0
  90. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/de.lproj/GSSDK.stringsdict +0 -0
  91. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/de.lproj/Localizable.strings +0 -0
  92. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/documentFinder.tflite +0 -0
  93. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
  94. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/en.lproj/GSSDK.stringsdict +0 -0
  95. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/en.lproj/Localizable.strings +0 -0
  96. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/es.lproj/GSSDK.strings +0 -0
  97. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/es.lproj/GSSDK.stringsdict +0 -0
  98. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/es.lproj/Localizable.strings +0 -0
  99. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
  100. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/fr.lproj/GSSDK.stringsdict +0 -0
  101. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/fr.lproj/Localizable.strings +0 -0
  102. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/gas-keywords.txt +0 -0
  103. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/gas-stations.txt +0 -0
  104. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/he.lproj/GSSDK.strings +0 -0
  105. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/he.lproj/GSSDK.stringsdict +0 -0
  106. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/he.lproj/Localizable.strings +0 -0
  107. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/head_classif.tflite +0 -0
  108. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/hu.lproj/GSSDK.strings +0 -0
  109. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/hu.lproj/GSSDK.stringsdict +0 -0
  110. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/hu.lproj/Localizable.strings +0 -0
  111. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/iban-patterns.csv +0 -0
  112. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/id.lproj/GSSDK.strings +0 -0
  113. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/id.lproj/GSSDK.stringsdict +0 -0
  114. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/id.lproj/Localizable.strings +0 -0
  115. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/it.lproj/GSSDK.strings +0 -0
  116. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/it.lproj/GSSDK.stringsdict +0 -0
  117. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/it.lproj/Localizable.strings +0 -0
  118. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/ja.lproj/GSSDK.strings +0 -0
  119. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/ja.lproj/GSSDK.stringsdict +0 -0
  120. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/ja.lproj/Localizable.strings +0 -0
  121. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/ko.lproj/GSSDK.strings +0 -0
  122. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/ko.lproj/GSSDK.stringsdict +0 -0
  123. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/ko.lproj/Localizable.strings +0 -0
  124. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/mobilenetV2_orientation_quant_opti.tflite +0 -0
  125. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/nl.lproj/GSSDK.strings +0 -0
  126. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/nl.lproj/GSSDK.stringsdict +0 -0
  127. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/nl.lproj/Localizable.strings +0 -0
  128. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/ocr_languages.csv +0 -0
  129. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/other-chains.txt +0 -0
  130. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/pl.lproj/GSSDK.strings +0 -0
  131. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/pl.lproj/GSSDK.stringsdict +0 -0
  132. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/pl.lproj/Localizable.strings +0 -0
  133. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/pt-BR.lproj/GSSDK.strings +0 -0
  134. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/pt-BR.lproj/GSSDK.stringsdict +0 -0
  135. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/pt-BR.lproj/Localizable.strings +0 -0
  136. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/refineBorder.tflite +0 -0
  137. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/restaurant-chains.txt +0 -0
  138. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/restaurant-keywords.txt +0 -0
  139. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/ru.lproj/GSSDK.strings +0 -0
  140. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/ru.lproj/GSSDK.stringsdict +0 -0
  141. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/ru.lproj/Localizable.strings +0 -0
  142. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/supermarket-chains.txt +0 -0
  143. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/supermarket-keywords.txt +0 -0
  144. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/sv.lproj/GSSDK.strings +0 -0
  145. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/sv.lproj/GSSDK.stringsdict +0 -0
  146. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/sv.lproj/Localizable.strings +0 -0
  147. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/tr.lproj/GSSDK.strings +0 -0
  148. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/tr.lproj/GSSDK.stringsdict +0 -0
  149. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/tr.lproj/Localizable.strings +0 -0
  150. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/transport-keywords.txt +0 -0
  151. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/vi.lproj/GSSDK.strings +0 -0
  152. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/vi.lproj/GSSDK.stringsdict +0 -0
  153. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/vi.lproj/Localizable.strings +0 -0
  154. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/zh-Hans.lproj/GSSDK.strings +0 -0
  155. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/zh-Hans.lproj/GSSDK.stringsdict +0 -0
  156. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/zh-Hans.lproj/Localizable.strings +0 -0
  157. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/zh-Hant.lproj/GSSDK.strings +0 -0
  158. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/zh-Hant.lproj/GSSDK.stringsdict +0 -0
  159. /package/ios/GSSDK/GSSDK.xcframework/{ios-arm64_x86_64-simulator → ios-arm64-simulator}/GSSDK.framework/zh-Hant.lproj/Localizable.strings +0 -0
@@ -1,3680 +0,0 @@
1
- #if 0
2
- #elif defined(__arm64__) && __arm64__
3
- // Generated by Apple Swift version 6.3.1 effective-5.10 (swiftlang-6.3.1.1.2 clang-2100.0.123.102)
4
- #ifndef GSSDK_SWIFT_H
5
- #define GSSDK_SWIFT_H
6
- #pragma clang diagnostic push
7
- #pragma clang diagnostic ignored "-Wgcc-compat"
8
-
9
- #if !defined(__has_include)
10
- # define __has_include(x) 0
11
- #endif
12
- #if !defined(__has_attribute)
13
- # define __has_attribute(x) 0
14
- #endif
15
- #if !defined(__has_feature)
16
- # define __has_feature(x) 0
17
- #endif
18
- #if !defined(__has_warning)
19
- # define __has_warning(x) 0
20
- #endif
21
-
22
- #if __has_include(<swift/objc-prologue.h>)
23
- # include <swift/objc-prologue.h>
24
- #endif
25
-
26
- #pragma clang diagnostic ignored "-Wauto-import"
27
- #if defined(__OBJC__)
28
- #include <Foundation/Foundation.h>
29
- #endif // defined(__OBJC__)
30
- #if defined(__cplusplus)
31
- #include <cstdint>
32
- #include <cstddef>
33
- #include <cstdbool>
34
- #include <cstring>
35
- #include <stdlib.h>
36
- #include <new>
37
- #include <type_traits>
38
- #else
39
- #include <stdint.h>
40
- #include <stddef.h>
41
- #include <stdbool.h>
42
- #include <string.h>
43
- #endif
44
- #if defined(__cplusplus)
45
- #pragma clang diagnostic push
46
- #pragma clang diagnostic ignored "-Wnon-modular-include-in-framework-module"
47
- #if defined(__arm64e__) && __has_include(<ptrauth.h>)
48
- # include <ptrauth.h>
49
- #else
50
- #pragma clang diagnostic push
51
- #pragma clang diagnostic ignored "-Wreserved-macro-identifier"
52
- # ifndef __ptrauth_swift_value_witness_function_pointer
53
- # define __ptrauth_swift_value_witness_function_pointer(x)
54
- # endif
55
- # ifndef __ptrauth_swift_class_method_pointer
56
- # define __ptrauth_swift_class_method_pointer(x)
57
- # endif
58
- #pragma clang diagnostic pop
59
- #endif
60
- #pragma clang diagnostic pop
61
- #endif
62
-
63
- #if !defined(SWIFT_TYPEDEFS)
64
- # define SWIFT_TYPEDEFS 1
65
- # if __has_include(<uchar.h>)
66
- # include <uchar.h>
67
- # elif !defined(__cplusplus)
68
- typedef unsigned char char8_t;
69
- typedef uint_least16_t char16_t;
70
- typedef uint_least32_t char32_t;
71
- # endif
72
- typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
73
- typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
74
- typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
75
- typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
76
- typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
77
- typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
78
- typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
79
- typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
80
- typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
81
- typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
82
- typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
83
- typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
84
- #endif
85
-
86
- #if !defined(SWIFT_PASTE)
87
- # define SWIFT_PASTE_HELPER(x, y) x##y
88
- # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
89
- #endif
90
- #if !defined(SWIFT_METATYPE)
91
- # define SWIFT_METATYPE(X) Class
92
- #endif
93
- #if !defined(SWIFT_CLASS_PROPERTY)
94
- # if __has_feature(objc_class_property)
95
- # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
96
- # else
97
- # define SWIFT_CLASS_PROPERTY(...)
98
- # endif
99
- #endif
100
- #if !defined(SWIFT_RUNTIME_NAME)
101
- # if __has_attribute(objc_runtime_name)
102
- # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
103
- # else
104
- # define SWIFT_RUNTIME_NAME(X)
105
- # endif
106
- #endif
107
- #if !defined(SWIFT_COMPILE_NAME)
108
- # if __has_attribute(swift_name)
109
- # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
110
- # else
111
- # define SWIFT_COMPILE_NAME(X)
112
- # endif
113
- #endif
114
- #if !defined(SWIFT_METHOD_FAMILY)
115
- # if __has_attribute(objc_method_family)
116
- # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
117
- # else
118
- # define SWIFT_METHOD_FAMILY(X)
119
- # endif
120
- #endif
121
- #if !defined(SWIFT_NOESCAPE)
122
- # if __has_attribute(noescape)
123
- # define SWIFT_NOESCAPE __attribute__((noescape))
124
- # else
125
- # define SWIFT_NOESCAPE
126
- # endif
127
- #endif
128
- #if !defined(SWIFT_RELEASES_ARGUMENT)
129
- # if __has_attribute(ns_consumed)
130
- # define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
131
- # else
132
- # define SWIFT_RELEASES_ARGUMENT
133
- # endif
134
- #endif
135
- #if !defined(SWIFT_WARN_UNUSED_RESULT)
136
- # if __has_attribute(warn_unused_result)
137
- # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
138
- # else
139
- # define SWIFT_WARN_UNUSED_RESULT
140
- # endif
141
- #endif
142
- #if !defined(SWIFT_NORETURN)
143
- # if __has_attribute(noreturn)
144
- # define SWIFT_NORETURN __attribute__((noreturn))
145
- # else
146
- # define SWIFT_NORETURN
147
- # endif
148
- #endif
149
- #if !defined(SWIFT_CLASS_EXTRA)
150
- # define SWIFT_CLASS_EXTRA
151
- #endif
152
- #if !defined(SWIFT_PROTOCOL_EXTRA)
153
- # define SWIFT_PROTOCOL_EXTRA
154
- #endif
155
- #if !defined(SWIFT_ENUM_EXTRA)
156
- # define SWIFT_ENUM_EXTRA
157
- #endif
158
- #if !defined(SWIFT_CLASS)
159
- # if __has_attribute(objc_subclassing_restricted)
160
- # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
161
- # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
162
- # else
163
- # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
164
- # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
165
- # endif
166
- #endif
167
- #if !defined(SWIFT_RESILIENT_CLASS)
168
- # if __has_attribute(objc_class_stub)
169
- # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
170
- # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
171
- # else
172
- # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
173
- # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
174
- # endif
175
- #endif
176
- #if !defined(SWIFT_PROTOCOL)
177
- # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
178
- # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
179
- #endif
180
- #if !defined(SWIFT_EXTENSION)
181
- # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
182
- #endif
183
- #if !defined(OBJC_DESIGNATED_INITIALIZER)
184
- # if __has_attribute(objc_designated_initializer)
185
- # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
186
- # else
187
- # define OBJC_DESIGNATED_INITIALIZER
188
- # endif
189
- #endif
190
- #if !defined(SWIFT_ENUM_ATTR)
191
- # if __has_attribute(enum_extensibility)
192
- # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
193
- # else
194
- # define SWIFT_ENUM_ATTR(_extensibility)
195
- # endif
196
- #endif
197
- #if !defined(SWIFT_ENUM)
198
- # if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || __has_feature(objc_fixed_enum)
199
- # define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
200
- # if __has_feature(generalized_swift_name)
201
- # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
202
- # else
203
- # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
204
- # endif
205
- # else
206
- # define SWIFT_ENUM(_type, _name, _extensibility) _type _name; enum
207
- # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
208
- # endif
209
- #endif
210
- #if !defined(SWIFT_ENUM_TAG)
211
- # if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || __has_feature(objc_fixed_enum)
212
- # define SWIFT_ENUM_TAG enum
213
- # else
214
- # define SWIFT_ENUM_TAG
215
- # endif
216
- #endif
217
- #if !defined(SWIFT_ENUM_FWD_DECL)
218
- # if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || __has_feature(objc_fixed_enum)
219
- # define SWIFT_ENUM_FWD_DECL(_type, _name) enum _name : _type;
220
- # else
221
- # define SWIFT_ENUM_FWD_DECL(_type, _name) typedef _type _name;
222
- # endif
223
- #endif
224
- #if !defined(SWIFT_UNAVAILABLE)
225
- # define SWIFT_UNAVAILABLE __attribute__((unavailable))
226
- #endif
227
- #if !defined(SWIFT_UNAVAILABLE_MSG)
228
- # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
229
- #endif
230
- #if !defined(SWIFT_AVAILABILITY)
231
- # define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
232
- #endif
233
- #if !defined(SWIFT_AVAILABILITY_DOMAIN)
234
- # define SWIFT_AVAILABILITY_DOMAIN(dom, ...) __attribute__((availability(domain: dom, __VA_ARGS__)))
235
- #endif
236
- #if !defined(SWIFT_WEAK_IMPORT)
237
- # define SWIFT_WEAK_IMPORT __attribute__((weak_import))
238
- #endif
239
- #if !defined(SWIFT_DEPRECATED)
240
- # define SWIFT_DEPRECATED __attribute__((deprecated))
241
- #endif
242
- #if !defined(SWIFT_DEPRECATED_MSG)
243
- # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
244
- #endif
245
- #if !defined(SWIFT_DEPRECATED_OBJC)
246
- # if __has_feature(attribute_diagnose_if_objc)
247
- # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
248
- # else
249
- # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
250
- # endif
251
- #endif
252
- #if defined(__OBJC__)
253
- #if !defined(IBSegueAction)
254
- # define IBSegueAction
255
- #endif
256
- #endif
257
- #if !defined(SWIFT_EXTERN)
258
- # if defined(__cplusplus)
259
- # define SWIFT_EXTERN extern "C"
260
- # else
261
- # define SWIFT_EXTERN extern
262
- # endif
263
- #endif
264
- #if !defined(SWIFT_CALL)
265
- # define SWIFT_CALL __attribute__((swiftcall))
266
- #endif
267
- #if !defined(SWIFT_INDIRECT_RESULT)
268
- # define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
269
- #endif
270
- #if !defined(SWIFT_CONTEXT)
271
- # define SWIFT_CONTEXT __attribute__((swift_context))
272
- #endif
273
- #if !defined(SWIFT_ERROR_RESULT)
274
- # define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
275
- #endif
276
- #if defined(__cplusplus)
277
- # define SWIFT_NOEXCEPT noexcept
278
- #else
279
- # define SWIFT_NOEXCEPT
280
- #endif
281
- #if !defined(SWIFT_C_INLINE_THUNK)
282
- # if __has_attribute(always_inline)
283
- # if __has_attribute(nodebug)
284
- # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
285
- # else
286
- # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
287
- # endif
288
- # else
289
- # define SWIFT_C_INLINE_THUNK inline
290
- # endif
291
- #endif
292
- #if defined(_WIN32)
293
- #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
294
- # define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
295
- #endif
296
- #else
297
- #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
298
- # define SWIFT_IMPORT_STDLIB_SYMBOL
299
- #endif
300
- #endif
301
- #if !__has_feature(nullability)
302
- # define _Nonnull
303
- # define _Nullable
304
- # define _Null_unspecified
305
- #elif !defined(__OBJC__)
306
- # pragma clang diagnostic ignored "-Wnullability-extension"
307
- #endif
308
- #if !__has_feature(nullability_nullable_result)
309
- # define _Nullable_result _Nullable
310
- #endif
311
- #if __has_feature(objc_modules)
312
- #if __has_warning("-Watimport-in-framework-header")
313
- #pragma clang diagnostic ignored "-Watimport-in-framework-header"
314
- #endif
315
- #endif
316
-
317
- #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
318
- #pragma clang diagnostic ignored "-Wduplicate-method-arg"
319
- #if __has_warning("-Wpragma-clang-attribute")
320
- # pragma clang diagnostic ignored "-Wpragma-clang-attribute"
321
- #endif
322
- #pragma clang diagnostic ignored "-Wunknown-pragmas"
323
- #pragma clang diagnostic ignored "-Wnullability"
324
- #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
325
- #pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
326
-
327
- #if __has_attribute(external_source_symbol)
328
- # pragma push_macro("any")
329
- # undef any
330
- # pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="GSSDK",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
331
- # pragma pop_macro("any")
332
- #endif
333
-
334
- #if defined(__cplusplus)
335
- extern "C" {
336
- #endif
337
-
338
- #if defined(__cplusplus)
339
- } // extern "C"
340
- #endif
341
- #if __has_attribute(external_source_symbol)
342
- # pragma clang attribute pop
343
- #endif
344
- #if defined(__OBJC__)
345
- #if __has_feature(objc_modules)
346
- #if __has_warning("-Watimport-in-framework-header")
347
- #pragma clang diagnostic ignored "-Watimport-in-framework-header"
348
- #endif
349
- @import CoreFoundation;
350
- @import Dispatch;
351
- @import Foundation;
352
- @import ObjectiveC;
353
- @import UIKit;
354
- #endif
355
-
356
- #import <GSSDK/GSSDK.h>
357
-
358
- #endif // defined(__OBJC__)
359
- #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
360
- #pragma clang diagnostic ignored "-Wduplicate-method-arg"
361
- #if __has_warning("-Wpragma-clang-attribute")
362
- # pragma clang diagnostic ignored "-Wpragma-clang-attribute"
363
- #endif
364
- #pragma clang diagnostic ignored "-Wunknown-pragmas"
365
- #pragma clang diagnostic ignored "-Wnullability"
366
- #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
367
- #pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
368
-
369
- #if __has_attribute(external_source_symbol)
370
- # pragma push_macro("any")
371
- # undef any
372
- # pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="GSSDK",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
373
- # pragma pop_macro("any")
374
- #endif
375
-
376
- #if defined(__OBJC__)
377
-
378
- @class NSString;
379
- /// Entry point of the SDK. Use this to initialize the SDK with your license key.
380
- SWIFT_CLASS("_TtC5GSSDK3GSK")
381
- @interface GSK : NSObject
382
- /// Returns the Genius Scan SDK version
383
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull sdkVersion;)
384
- + (NSString * _Nonnull)sdkVersion SWIFT_WARN_UNUSED_RESULT;
385
- /// Sets the Genius Scan SDK license key with auto-refresh enabled.
386
- /// See <code>setLicenseKey:autoRefresh:</code>
387
- + (void)setLicenseKey:(NSString * _Nonnull)licenseKey;
388
- /// Sets the Genius Scan SDK license key, while optionally enabling auto-refresh.
389
- /// This method doesn’t return an error but will log warnings should the key be invalid or expired. All other SDK methods that return errors will report
390
- /// an error if there is a problem with the license key, and you must handle them to ensure you provide a good “degraded” experience.
391
- /// For instance, you can prompt the user to update the application to use the scanning feature in case they use a version of the application with an expired license key.
392
- /// important:
393
- /// This method must be called with a valid license key before any use of the SDK methods.
394
- /// \param licenseKey A valid license key. You must publish a new version of the app with an updated license key before the key expires.
395
- ///
396
- /// \param autoRefresh If true, the SDK will attempt to automatically refresh the license key to prevent any diruption of service on devices that wouldn’t have
397
- /// updated to the latest version of your app containing the new keys. If <code>autoRefresh</code> is enabled, the following information is sent to the Genius Scan
398
- /// SDK servers: the current license key, a device-unique UUID, and the current version of the app.
399
- ///
400
- + (void)setLicenseKey:(NSString * _Nonnull)licenseKey autoRefresh:(BOOL)autoRefresh;
401
- /// Checks that the Genius Scan SDK was correctly initialized with a valid license key.
402
- ///
403
- /// throws:
404
- /// An error if the license key is invalid or expired.
405
- + (BOOL)checkInitializationAndReturnError:(NSError * _Nullable * _Nullable)error;
406
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
407
- @end
408
-
409
- /// A barcode such as 1D barcodes or QR codes.
410
- SWIFT_CLASS("_TtC5GSSDK10GSKBarcode")
411
- @interface GSKBarcode : NSObject
412
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
413
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
414
- @end
415
-
416
- @interface GSKBarcode (SWIFT_EXTENSION(GSSDK))
417
- - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
418
- @end
419
-
420
- @interface GSKBarcode (SWIFT_EXTENSION(GSSDK))
421
- @property (nonatomic, readonly) NSUInteger hash;
422
- @end
423
-
424
- @class GSKBarcodeScanFlowConfiguration;
425
- @class UIViewController;
426
- @class GSKBarcodeScanFlowResult;
427
- /// A UI flow for scanning barcodes and QR codes using the device camera.
428
- /// Configure the flow with <code>GSKBarcodeScanFlowConfiguration</code> to select the
429
- /// barcode types to detect and whether batch mode is enabled. Present it from
430
- /// a view controller and await a <code>GSKBarcodeScanFlowResult</code> containing the
431
- /// decoded barcodes.
432
- /// important:
433
- /// Camera access requires <code>NSCameraUsageDescription</code> in
434
- /// <code>Info.plist</code>.
435
- SWIFT_CLASS("_TtC5GSSDK18GSKBarcodeScanFlow")
436
- @interface GSKBarcodeScanFlow : NSObject
437
- /// Initializes a new barcode scan flow
438
- /// \param configuration Configuration for the barcode scanning
439
- ///
440
- - (nonnull instancetype)initWithConfiguration:(GSKBarcodeScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
441
- /// Starts the barcode scanning flow by presenting a full-screen camera interface.
442
- /// This method presents a camera view controller that continuously scans for barcodes and QR codes.
443
- /// The scanning process respects the code types specified in the flow’s configuration.
444
- /// The method uses Swift’s async/await pattern, suspending until either:
445
- /// <ul>
446
- /// <li>
447
- /// A barcode is successfully detected (except in batch mode)
448
- /// </li>
449
- /// <li>
450
- /// The user taps the done button (batch mode)
451
- /// </li>
452
- /// <li>
453
- /// The user cancels the operation
454
- /// </li>
455
- /// <li>
456
- /// An error occurs during setup or scanning
457
- /// </li>
458
- /// </ul>
459
- /// The behavior varies based on the configuration’s isBatchModeEnabled:
460
- /// <ul>
461
- /// <li>
462
- /// <code>false</code>: Returns immediately after detecting one or more codes in a single frame
463
- /// </li>
464
- /// <li>
465
- /// <code>true</code>: Collects unique codes over time until the user taps the done button
466
- /// </li>
467
- /// </ul>
468
- /// Example usage:
469
- /// \code
470
- /// let flow = GSKBarcodeScanFlow()
471
- /// do {
472
- /// let result = try await flow.resultByStarting(fromViewController: self)
473
- /// print("Scanned codes: \(result.barcodes.map { $0.value })")
474
- /// } catch GSKScanFlowError.cancellation {
475
- /// print("User canceled scanning")
476
- /// } catch {
477
- /// print("Scanning failed: \(error)")
478
- /// }
479
- ///
480
- /// \endcodeimportant:
481
- /// This method requires camera permissions. Ensure your app’s Info.plist includes
482
- /// the <code>NSCameraUsageDescription</code> key with an appropriate description.
483
- /// note:
484
- /// The camera interface is presented with <code>modalPresentationStyle</code> set to <code>.fullScreen</code>
485
- /// for an immersive scanning experience.
486
- /// \param viewController The view controller from which to present the camera interface.
487
- /// This should typically be the currently visible view controller.
488
- ///
489
- ///
490
- /// throws:
491
- ///
492
- /// <ul>
493
- /// <li>
494
- /// A <code>GSKScanFlowError</code>
495
- /// </li>
496
- /// </ul>
497
- ///
498
- /// returns:
499
- /// A <code>GSKBarcodeScanFlowResult</code> containing the detected barcodes with their
500
- /// decoded values and format types.
501
- - (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKBarcodeScanFlowResult * _Nullable, NSError * _Nullable))completionHandler;
502
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
503
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
504
- @end
505
-
506
- @class NSError;
507
- @interface GSKBarcodeScanFlow (SWIFT_EXTENSION(GSSDK))
508
- /// Instantiates a <code>GSKBarcodeScanFlow</code> instance with the provided configuration.
509
- /// This initializer is only available from Objective-C.
510
- + (nonnull instancetype)barcodeScanFlowWithConfiguration:(GSKBarcodeScanFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
511
- /// Starts the barcode scanning flow.
512
- /// @param viewController The view controller to present the barcode scanning interface from.
513
- /// @param successBlock A completion block/closure that will be called on the main
514
- /// thread upon successful completion of the scan flow. It receives a <code>GSKBarcodeScanFlowResult</code> object as
515
- /// a parameter. This object gives you access to the scanned codes.
516
- /// @param failureBlock A block/closure called if an error was encountered.
517
- /// This method is only available from Objective-C.
518
- - (void)startFromViewController:(UIViewController * _Nonnull)viewController success:(void (^ _Nonnull)(GSKBarcodeScanFlowResult * _Nonnull))successBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))failureBlock;
519
- @end
520
-
521
- @class UIColor;
522
- /// Configuration for the UI barcode scanning flow
523
- /// This class allows customization of which barcode and QR code formats should be detected
524
- /// during the scanning process. By default, all supported formats are enabled.
525
- SWIFT_CLASS("_TtC5GSSDK31GSKBarcodeScanFlowConfiguration")
526
- @interface GSKBarcodeScanFlowConfiguration : NSObject
527
- /// Whether batch mode is enabled for code detection.
528
- /// This setting controls how codes are detected and when they are returned:
529
- /// <ul>
530
- /// <li>
531
- /// <code>false</code>: Detect multiple codes simultaneously in a single frame and return immediately (default)
532
- /// </li>
533
- /// <li>
534
- /// <code>true</code>: Collect multiple codes over time before returning when user taps Done
535
- /// </li>
536
- /// </ul>
537
- /// Example:
538
- /// \code
539
- /// // Standard mode - return codes immediately (default)
540
- /// let standardConfig = GSKBarcodeScanFlowConfiguration(isBatchModeEnabled: false)
541
- ///
542
- /// // Batch mode - collect codes over time
543
- /// let batchConfig = GSKBarcodeScanFlowConfiguration(isBatchModeEnabled: true)
544
- ///
545
- /// \endcode
546
- @property (nonatomic) BOOL isBatchModeEnabled;
547
- /// The highlight color used for the UI (overlay). Defaults
548
- /// to <code>.green</code>. For good contrast, we recommend using a bright color.
549
- @property (nonatomic, strong) UIColor * _Nonnull highlightColor;
550
- /// The menu color used for the UI. Defaults to <code>nil</code>, meaning that the system
551
- /// default color will be used (blue on iOS, for example).
552
- @property (nonatomic, strong) UIColor * _Nullable menuColor;
553
- /// Creates a new barcode scan flow configuration with default values
554
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
555
- @end
556
-
557
- @class NSDictionary;
558
- @interface GSKBarcodeScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
559
- /// Create a configuration from a dictionary.
560
- /// This is used for interfacing with cross-platform plugins but shouldn’t
561
- /// be used in native projects.
562
- + (GSKBarcodeScanFlowConfiguration * _Nullable)configurationWithDictionary:(NSDictionary * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
563
- /// Create a configuration from JSON data.
564
- /// This is used for interfacing with cross-platform plugins but shouldn’t
565
- /// be used in native projects.
566
- + (GSKBarcodeScanFlowConfiguration * _Nullable)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
567
- @end
568
-
569
- /// The result of a barcode scanning flow.
570
- /// This class encapsulates the successful outcome of a barcode or QR code scanning session,
571
- /// containing the detected barcode or QR code data.
572
- SWIFT_CLASS("_TtC5GSSDK24GSKBarcodeScanFlowResult")
573
- @interface GSKBarcodeScanFlowResult : NSObject
574
- /// The detected barcodes containing their decoded values and types.
575
- /// This property provides access to an array of detected codes, each containing
576
- /// both the string content and format type (e.g., QR code, Code 128, EAN-13, etc.).
577
- /// <ul>
578
- /// <li>
579
- /// For standard mode: Contains all codes detected in a single frame
580
- /// </li>
581
- /// <li>
582
- /// For batch mode: Contains all codes collected over the scanning session
583
- /// </li>
584
- /// </ul>
585
- @property (nonatomic, readonly, copy) NSArray<GSKBarcode *> * _Nonnull barcodes;
586
- /// Creates a new barcode scan flow result.
587
- /// \param barcodes The detected barcodes.
588
- ///
589
- - (nonnull instancetype)initWithBarcodes:(NSArray<GSKBarcode *> * _Nonnull)barcodes OBJC_DESIGNATED_INITIALIZER;
590
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
591
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
592
- @end
593
-
594
- @interface GSKBarcodeScanFlowResult (SWIFT_EXTENSION(GSSDK))
595
- /// Returns a dictionary representation of the result
596
- /// The dictionary contains:
597
- /// <ul>
598
- /// <li>
599
- /// barcodes: An array of code dictionaries, each containing:
600
- /// <ul>
601
- /// <li>
602
- /// value: The decoded string value
603
- /// </li>
604
- /// <li>
605
- /// type: The code type as a string (e.g., “qr”, “code128”)
606
- /// </li>
607
- /// </ul>
608
- /// </li>
609
- /// </ul>
610
- @property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nonnull dictionary;
611
- /// Returns a JSON representation of the result.
612
- /// See <code>dictionary</code> for an explanation of the JSON data’s structure.
613
- - (NSString * _Nonnull)json SWIFT_WARN_UNUSED_RESULT;
614
- @end
615
-
616
- /// Represents an error raised by the camera session
617
- typedef SWIFT_ENUM(NSInteger, GSKCameraSessionError, open) {
618
- GSKCameraSessionErrorOther = -1,
619
- GSKCameraSessionErrorNotAuthorized = -2,
620
- GSKCameraSessionErrorLockDevice = -3,
621
- GSKCameraSessionErrorNoDevice = -4,
622
- GSKCameraSessionErrorInvalidSetupDependency = -5,
623
- GSKCameraSessionErrorNoVideoCaptureConnection = -6,
624
- GSKCameraSessionErrorInvalidData = -7,
625
- GSKCameraSessionErrorBadInput = -8,
626
- GSKCameraSessionErrorWarnLockDevice = -1003,
627
- };
628
-
629
- @class NSCoder;
630
- @class NSBundle;
631
- /// A camera view controller to scan documents or barcodes.
632
- /// Inherit from this view controller to create a custom scanning experience. Lay out the <code>cameraView</code> as desired:
633
- /// By default, <code>cameraView</code> fills the entire screen. You can disable its resizing mask
634
- /// (<code>cameraView.translatesAutoresizingMaskIntoConstraints</code>) and use Auto Layout constraints.
635
- /// note:
636
- ///
637
- /// When a photo of a document is taken, whether manually or automatically, the capture session is paused
638
- /// and a delegate callback (<code>cameraViewController(_:didGenerateScan:)</code>) is called when the photo is ready.
639
- /// In this callback, you can decide whether to exit the camera view controller (if you just need to scan a
640
- /// single page), or keep scanning more images (to support a “batch scanning” flow). For the latter scenario,
641
- /// you will need to resume the camera session (see <code>resume()</code>). You also need to “reveal” the shutter screen
642
- /// (see <code>hideShutterView(animated:)</code>).
643
- SWIFT_CLASS("_TtC5GSSDK23GSKCameraViewController")
644
- @interface GSKCameraViewController : UIViewController
645
- /// Requests camera access if needed.
646
- /// This returns immediately when access is already determined. It only shows the system prompt
647
- /// when access has not been requested yet.
648
- ///
649
- /// returns:
650
- /// <code>true</code> when access is authorized.
651
- + (void)requestCameraAccessWithCompletionHandler:(void (^ _Nonnull)(BOOL))completionHandler;
652
- - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE;
653
- - (void)viewDidLoad;
654
- - (void)viewWillAppear:(BOOL)animated;
655
- - (void)viewWillDisappear:(BOOL)animated;
656
- /// Manually trigger a photo.
657
- /// Use this to handle the user tapping on a “take photo” button, or your own
658
- /// custom logic to take a photo.
659
- - (void)takePhoto;
660
- - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
661
- @end
662
-
663
- @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
664
- @end
665
-
666
- /// A document detection mode
667
- /// When detecting a document, the camera controller can just highlight the document, or also
668
- /// highlight and trigger the photo when the detection is stable enough.
669
- typedef SWIFT_ENUM(NSInteger, DocumentDetectionMode, open) {
670
- /// Visual highlighting only.
671
- /// The camera will detect document edges and provide visual feedback by drawing
672
- /// a document overlay, but will not automatically capture photos. Users must
673
- /// manually trigger photo capture.
674
- DocumentDetectionModeHighlightOnly = 0,
675
- /// Highlighting with automatic capture.
676
- /// Similar to <code>highlightOnly</code>, but the camera will automatically take a photo
677
- /// when a stable document is detected for a sufficient duration. This provides
678
- /// a hands-free scanning experience.
679
- DocumentDetectionModeHighlightAndAutoCapture = 1,
680
- };
681
-
682
- @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
683
- @end
684
-
685
- /// Constants indicating an interruption reason for the camera session.
686
- typedef SWIFT_ENUM(NSInteger, InterruptionReason, open) {
687
- /// An interruption caused by the app being sent to the background while using a camera.
688
- InterruptionReasonVideoDeviceNotAvailableInBackground = 0,
689
- /// An interruption caused by the audio hardware temporarily being made unavailable, for instance,
690
- /// for a phone call, or alarm.
691
- InterruptionReasonAudioDeviceInUseByAnotherClient = 1,
692
- /// An interruption caused by the video device temporarily being made unavailable, for instance,
693
- /// when stolen away by another app.
694
- InterruptionReasonVideoDeviceInUseByAnotherClient = 2,
695
- /// An interruption caused when the app is running in a multi-app layout, causing resource contention
696
- /// and degraded recording quality of service. Given your present session configuration, the
697
- /// session may only be run if your app occupies the full screen.
698
- InterruptionReasonVideoDeviceNotAvailableWithMultipleForegroundApps = 3,
699
- /// An interruption caused by the video device temporarily being made unavailable due to system pressure,
700
- /// such as thermal duress.
701
- InterruptionReasonVideoDeviceNotAvailableDueToSystemPressure = 4,
702
- InterruptionReasonUnknown = 5,
703
- };
704
-
705
- @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
706
- /// Factory method for a camera view controller with document detection.
707
- /// This is only to be used from Objective-C. From Swift, prefer using <code>init(configuration:)</code> instead.
708
- /// \param documentDetectionMode The document detection mode.
709
- ///
710
- /// \param documentOverlayColor The color of the document overlay.
711
- ///
712
- + (void)makeCameraViewControllerWithDocumentDetectionMode:(enum DocumentDetectionMode)documentDetectionMode documentOverlayColor:(UIColor * _Nonnull)documentOverlayColor completionHandler:(void (^ _Nonnull)(GSKCameraViewController * _Nullable, NSError * _Nullable))completionHandler;
713
- @end
714
-
715
- @class GSKQuadrangle;
716
- @class GSKScan;
717
- SWIFT_PROTOCOL("_TtP5GSSDK31GSKCameraViewControllerDelegate_")
718
- @protocol GSKCameraViewControllerDelegate
719
- @optional
720
- /// The camera view controller failed with an error.
721
- /// \param cameraViewController The camera view controller
722
- ///
723
- /// \param error The encountered error.
724
- ///
725
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFailWithError:(NSError * _Nonnull)error;
726
- /// The camera view controller encountered a non-fatal error.
727
- /// \param cameraViewController The camera view controller
728
- ///
729
- /// \param error The encountered error.
730
- ///
731
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didEncounterNonCriticalError:(NSError * _Nonnull)error;
732
- /// The camera view controller was interrupted.
733
- /// This can happen in various cases, including when the user goes to Split View mode on iPad.
734
- /// \param cameraViewController The camera view controller
735
- ///
736
- /// \param reason The reason why the camera view controller was interrupted.
737
- ///
738
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController wasInterruptedWithReason:(enum InterruptionReason)reason;
739
- /// The camera view controller resumes after interruption
740
- /// \param cameraViewController The camera view controller
741
- ///
742
- - (void)cameraViewControllerInterruptionDidEnd:(GSKCameraViewController * _Nonnull)cameraViewController;
743
- /// The camera view controller is still looking for a quadrangle.
744
- /// This is a general notification about the status of the search: we may or may not have identified
745
- /// its edges. If you want to act on identified edges, listen to the <code>cameraViewController:didFindDocumentWithQuadrangle:</code>
746
- /// delegate method.
747
- /// <ul>
748
- /// <li>
749
- /// Parameters:
750
- /// </li>
751
- /// <li>
752
- /// cameraViewController: The camera view controller
753
- /// </li>
754
- /// </ul>
755
- - (void)cameraViewControllerIsSearchingForDocument:(GSKCameraViewController * _Nonnull)cameraViewController;
756
- /// The camera view controller identified a document in the last frame of the photo stream
757
- /// \param cameraViewController The camera view controller
758
- ///
759
- /// \param quadrangle The quadrangle of the document that has been found.
760
- ///
761
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFindDocumentWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
762
- /// The camera view controller couldn’t identify a document in the last frame of the photo stream.
763
- /// This doesn’t mean that the camera view controller has stopped searching for documents or failed.
764
- /// It just means no document has been identified. In this case, you want to clear any overlay.
765
- /// \param cameraViewController The camera view controller
766
- ///
767
- - (void)cameraViewControllerFailedToFindDocument:(GSKCameraViewController * _Nonnull)cameraViewController;
768
- /// The camera view controller real-time document detection will soon capture a detected document, but if the document
769
- /// detection is not stable enough, the process can still be
770
- /// cancelled.
771
- /// It’s a good time to tell the user to remain stable.
772
- /// Only called when the document detection is set to .highlightAndAutoCapture.
773
- /// \param cameraViewController The camera view controller
774
- ///
775
- - (void)cameraViewControllerPhotoStabilizationDidStart:(GSKCameraViewController * _Nonnull)cameraViewController;
776
- /// The camera view controller is about to decide whether to automatically capture a detected document because the detection was stable enough.
777
- /// This is an override point where you can return <code>false</code> to stop that automatic process from proceeding.
778
- /// \param cameraViewController The camera view controller
779
- ///
780
- - (BOOL)cameraViewControllerShouldSnapPhoto:(GSKCameraViewController * _Nonnull)cameraViewController SWIFT_WARN_UNUSED_RESULT;
781
- /// The camera view controller is going to capture a photo, whether the capture was triggered manually or automatically.
782
- /// When the capture is automatic, this is called after <code>cameraViewController:willAutoCaptureDocumentWithQuadrangle:</code>.
783
- /// \param cameraViewController The camera view controller
784
- ///
785
- - (void)cameraViewControllerWillCapturePhoto:(GSKCameraViewController * _Nonnull)cameraViewController;
786
- /// The camera view controller is going to automatically capture a detected document because the detection was stable enough.
787
- /// The automatic capture is about to start and cannot be interrupted at this stage.
788
- /// <ul>
789
- /// <li>
790
- /// Deprecated: Use <code>cameraViewController(_:willAutoCaptureDocumentWithQuadrangle:)</code> for automatic document captures
791
- /// or <code>cameraViewControllerWillCapturePhoto(_:)</code> for any capture.
792
- /// </li>
793
- /// </ul>
794
- /// \param cameraViewController The camera view controller
795
- ///
796
- /// \param quadrangle The quadrangle of the document that will be captured.
797
- ///
798
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController willSnapPhotoWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
799
- /// The camera view controller is going to automatically capture a detected document because the detection was stable enough.
800
- /// The automatic capture is about to start and cannot be interrupted at this stage.
801
- /// \param cameraViewController The camera view controller
802
- ///
803
- /// \param quadrangle The quadrangle of the document that will be captured.
804
- ///
805
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController willAutoCaptureDocumentWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
806
- /// The camera view controller just took a photo, but it hasn’t been post-processed it yet
807
- /// \param cameraViewController The camera view controller
808
- ///
809
- - (void)cameraViewControllerDidSnapPhoto:(GSKCameraViewController * _Nonnull)cameraViewController;
810
- /// The camera view controller has finished processing the photo we just took.
811
- /// \param cameraViewController The camera view controller
812
- ///
813
- /// \param scan The scan object that has been generated. The image contained in the scan object is the full,
814
- /// unprocessed image in which the document was detected. Use <code>GSKScanProcessor</code> to process and
815
- /// warp and enhance the scanned document.
816
- ///
817
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didGenerateScan:(GSKScan * _Nonnull)scan;
818
- /// Camera view controller has detected barcodes.
819
- /// \param cameraViewController The camera view controller
820
- ///
821
- /// \param barcodes The detected barcodes
822
- ///
823
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFindBarcodes:(NSArray<GSKBarcode *> * _Nonnull)barcodes;
824
- @end
825
-
826
- /// The type of document detected by the document finder.
827
- typedef SWIFT_ENUM(NSInteger, GSKDocumentFinderImageType, closed) {
828
- /// No document present in the image
829
- GSKDocumentFinderImageTypeNoDocument = 0,
830
- /// A document is present in the image, but no crop or perspective correction has been applied.
831
- GSKDocumentFinderImageTypeUnwarped = 1,
832
- /// A document is present in the image, and crop and perspective correction have been applied.
833
- GSKDocumentFinderImageTypeWarped = 2,
834
- /// A document is present in the image, and crop/perspective correction and
835
- /// enhancement have been applied.
836
- GSKDocumentFinderImageTypeEnhanced = 3,
837
- };
838
-
839
- @class GSKPDFDocument;
840
- @protocol GSKDocumentImageProcessor;
841
- @class GSKDocumentGeneratorConfiguration;
842
- /// This class exposes the capability to generate a PDF or TIFF multi-page document file.
843
- SWIFT_CLASS("_TtC5GSSDK20GSKDocumentGenerator")
844
- @interface GSKDocumentGenerator : NSObject
845
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
846
- /// Generates a document file based on a document model and a generator configuration.
847
- /// \param document The source document to generate as PDF or TIFF depending on the configuration.
848
- ///
849
- /// \param imageProcessor An object used to process each source document’s image before inserting it in the resulting document.
850
- /// Only used when generating a PDF document
851
- ///
852
- /// \param configuration The configuration for the document generation.
853
- ///
854
- - (BOOL)generate:(GSKPDFDocument * _Nonnull)document imageProcessor:(id <GSKDocumentImageProcessor> _Nonnull)imageProcessor configuration:(GSKDocumentGeneratorConfiguration * _Nonnull)configuration error:(NSError * _Nullable * _Nullable)error;
855
- /// Generates a document file based on a document model and a generator configuration.
856
- /// \param document The source document to generate as PDF or TIFF depending on the configuration.
857
- ///
858
- /// \param configuration The configuration for the document generation.
859
- ///
860
- - (BOOL)generate:(GSKPDFDocument * _Nonnull)document configuration:(GSKDocumentGeneratorConfiguration * _Nonnull)configuration error:(NSError * _Nullable * _Nullable)error;
861
- @end
862
-
863
- SWIFT_ENUM_FWD_DECL(NSInteger, GSKDocumentGeneratorFileFormat)
864
- @class GSKDocumentGeneratorDebugConfiguration;
865
- /// A configuration for the document generator.
866
- SWIFT_CLASS("_TtC5GSSDK33GSKDocumentGeneratorConfiguration")
867
- @interface GSKDocumentGeneratorConfiguration : NSObject
868
- + (GSKDocumentGeneratorConfiguration * _Nonnull)pdfConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
869
- + (GSKDocumentGeneratorConfiguration * _Nonnull)tiffConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
870
- /// The output file format of the document generator. Must be .pdf or .tiff.
871
- @property (nonatomic, readonly) enum GSKDocumentGeneratorFileFormat outputFileFormat;
872
- /// The path where the generated document will be written. The extension will not be validated.
873
- @property (nonatomic, readonly, copy) NSString * _Nonnull outputFilePath;
874
- /// Custom font file used during the PDF generation to embed an invisible text layer.
875
- /// If nil, a default font is used, which only supports Latin languages.
876
- /// Only used when <code>outputFileFormat</code> is <code>.pdf</code>.
877
- @property (nonatomic, readonly, copy) NSString * _Nullable pdfFontFilePath;
878
- /// Generate a PDF/A document
879
- @property (nonatomic, readonly) BOOL shouldGeneratePDFA;
880
- /// An optional debug configuration to help debug PDF generation problems.
881
- /// Don’t use this in production. Default is nil.
882
- @property (nonatomic, readonly, strong) GSKDocumentGeneratorDebugConfiguration * _Nullable debugConfiguration;
883
- - (nonnull instancetype)initWithOutputFileFormat:(enum GSKDocumentGeneratorFileFormat)outputFileFormat outputFilePath:(NSString * _Nonnull)outputFilePath pdfFontFilePath:(NSString * _Nullable)pdfFontFilePath shouldGeneratePDFA:(BOOL)shouldGeneratePDFA debugConfiguration:(GSKDocumentGeneratorDebugConfiguration * _Nullable)debugConfiguration OBJC_DESIGNATED_INITIALIZER;
884
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
885
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
886
- @end
887
-
888
- @interface GSKDocumentGeneratorConfiguration (SWIFT_EXTENSION(GSSDK))
889
- /// Initialize an instance of this type with a dictionary.
890
- /// This is used for interfacing with cross-platform plugins but shouldn’t
891
- /// be used in native projects.
892
- - (nullable instancetype)initWithDictionary:(NSDictionary<NSString *, id> * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error;
893
- /// Initialize an instance of this type with JSON data.
894
- /// This is used for interfacing with cross-platform plugins but shouldn’t
895
- /// be used in native projects.
896
- - (nullable instancetype)initWithJson:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error;
897
- @end
898
-
899
- SWIFT_CLASS("_TtC5GSSDK38GSKDocumentGeneratorDebugConfiguration")
900
- @interface GSKDocumentGeneratorDebugConfiguration : NSObject
901
- /// If true, OCR’ed text will be visible on the PDF.
902
- /// Defaults to false. Use this for debug only
903
- @property (nonatomic, readonly) BOOL isOCRTextShownOnPDF;
904
- - (nonnull instancetype)initWithIsOCRTextShownOnPDF:(BOOL)isOCRTextShownOnPDF OBJC_DESIGNATED_INITIALIZER;
905
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
906
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
907
- @end
908
-
909
- /// Error raised while generating a multi-page document
910
- typedef SWIFT_ENUM(NSInteger, GSKDocumentGeneratorError, open) {
911
- /// An internal error. Look at logs or contact us for more details.
912
- GSKDocumentGeneratorErrorInternal SWIFT_COMPILE_NAME("internal") = 0,
913
- /// A provided file wasn’t found.
914
- GSKDocumentGeneratorErrorFileNotFound SWIFT_COMPILE_NAME("fileNotFound") = 1,
915
- /// The provided password is invalid for use in a PDF file.
916
- GSKDocumentGeneratorErrorInvalidPassword SWIFT_COMPILE_NAME("invalidPassword") = 2,
917
- /// The provided page size is unsupported for a PDF file.
918
- GSKDocumentGeneratorErrorInvalidPageSize SWIFT_COMPILE_NAME("invalidPageSize") = 3,
919
- /// There was an error processing the image associated to a document page.
920
- GSKDocumentGeneratorErrorProcessorError SWIFT_COMPILE_NAME("processorError") = 4,
921
- /// An input to the document generator is invalid.
922
- GSKDocumentGeneratorErrorInvalidInput SWIFT_COMPILE_NAME("invalidInput") = 5,
923
- /// PDF/A documents cannot be password-protected.
924
- GSKDocumentGeneratorErrorPDFAPasswordIncompatible SWIFT_COMPILE_NAME("pdfAPasswordIncompatible") = 6,
925
- };
926
- static NSString * _Nonnull const GSKDocumentGeneratorErrorDomain = @"GSSDK.GSKDocumentGeneratorError";
927
-
928
- typedef SWIFT_ENUM(NSInteger, GSKDocumentGeneratorFileFormat, open) {
929
- GSKDocumentGeneratorFileFormatPDF SWIFT_COMPILE_NAME("pdf") = 0,
930
- GSKDocumentGeneratorFileFormatTIFF SWIFT_COMPILE_NAME("tiff") = 1,
931
- };
932
-
933
- /// Used to preprocess pages of the PDF generation.
934
- /// When you generate a PDF document from images, you may want to apply some preprocessing to each image
935
- /// before inserting them in the document (for instance resizing them, including a watermark, etc.) You can
936
- /// implement your own PDF_image_processor and pass it when generating a PDF document.
937
- /// to achieve this.
938
- SWIFT_PROTOCOL("_TtP5GSSDK25GSKDocumentImageProcessor_")
939
- @protocol GSKDocumentImageProcessor
940
- /// Process the image and return a file path to the
941
- /// updated image. The PDF processor will delete this temporary
942
- /// image afterwards (only if it’s different from inputFilePath)
943
- /// @return nil if there is an error
944
- - (NSString * _Nullable)process:(NSString * _Nonnull)inputFilePath SWIFT_WARN_UNUSED_RESULT;
945
- @end
946
-
947
- @class UIImage;
948
- @class UIView;
949
- /// A view controller that displays a scanned image with an interactive quadrangle overlay
950
- /// for manual cropping and perspective adjustment.
951
- /// <code>GSKEditFrameViewController</code> presents an image and allows the user to refine the detected
952
- /// document boundaries by dragging the quadrangle’s corner and side handles. As the user edits the
953
- /// quadrangle, changes are reflected in the <code>quadrangle</code> property, which is Key-Value
954
- /// Observing (KVO) compliant.
955
- /// The overlay’s appearance—including colors, handle size, transparency, and magnifier
956
- /// behavior—can be customized through the exposed properties. This view controller is
957
- /// typically used after automatic document detection, to let the user fine-tune the crop
958
- /// before further processing (such as perspective correction or export).
959
- SWIFT_CLASS("_TtC5GSSDK26GSKEditFrameViewController")
960
- @interface GSKEditFrameViewController : UIViewController
961
- /// The image on which the quadrangle is overlaid.
962
- @property (nonatomic, strong) UIImage * _Nonnull image;
963
- @property (nonatomic, readonly, strong) UIView * _Nonnull frameView;
964
- /// Used to set the quadrangle to display in the view controller, and to retrieve the new quadrangle edited by the user.
965
- @property (nonatomic, strong) GSKQuadrangle * _Nonnull quadrangle;
966
- /// Insets applied around the image.
967
- /// By default this matches half the quadrangle overlay handle width, so handles remain visible even when
968
- /// the corners are on the edge of the image.
969
- @property (nonatomic) CGFloat inset;
970
- /// Customize the color of the shade within the quadrangle.
971
- @property (nonatomic, strong) UIColor * _Nonnull shadeColor SWIFT_DEPRECATED_MSG("Deprecated in favor of frameView.imageSelection.insideShadeColor.");
972
- /// Customize the color of the shade outside the quadrangle.
973
- @property (nonatomic, strong) UIColor * _Nonnull outsideShadeColor;
974
- /// Customize the color of the line used to draw the quadrangle.
975
- @property (nonatomic, strong) UIColor * _Nonnull lineColor;
976
- /// Customize the width of the frame handles.
977
- @property (nonatomic) CGFloat handleWidth;
978
- /// Customize the transparency of the entire overlay
979
- @property (nonatomic) CGFloat overlayAlpha;
980
- /// Customize the magnifier center style shown while dragging frame handles.
981
- @property (nonatomic) GSKMagnifierViewCenterStyle magnifierViewCenterStyle;
982
- /// \param image The image on which to draw the quadrangle. This is typically the original photo from the camera.
983
- ///
984
- /// \param quadrangle The initial quadrangle to display.
985
- ///
986
- - (nonnull instancetype)initWithImage:(UIImage * _Nonnull)image quadrangle:(GSKQuadrangle * _Nonnull)quadrangle OBJC_DESIGNATED_INITIALIZER;
987
- - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE;
988
- - (void)setQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle animated:(BOOL)animated;
989
- - (void)viewDidLoad;
990
- - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
991
- @end
992
-
993
- /// A configuration to specify the background cleaning to apply with GSKScanProcessor.
994
- SWIFT_CLASS("_TtC5GSSDK40GSKFilterBackgroundCleaningConfiguration")
995
- @interface GSKFilterBackgroundCleaningConfiguration : NSObject
996
- /// Determines if the edges of the document must be cleaned or not. Cleaning the edges might result in erasing
997
- /// some information that’s close the edges but yields a much cleaner document.
998
- @property (nonatomic, readonly) GSKEdgeCleaning edgeCleaning;
999
- /// Determines if the document’s background is rather light (white) or dark (black).
1000
- @property (nonatomic, readonly) GSKBackgroundKind backgroundKind;
1001
- /// Determines if the document is composed mainly of text, or contains a mix of text and photos.
1002
- @property (nonatomic, readonly) GSKDocumentComposition documentComposition;
1003
- /// Determines the strength of the background cleaning. Value between 0 and 1.
1004
- @property (nonatomic, readonly) CGFloat strength;
1005
- /// \param edgeCleaning If enabled, the document edges will be cleaned up. This helps if the document is torn or folded in
1006
- /// the corners, of if the cropping wasn’t perfectly accurate.
1007
- ///
1008
- /// \param backgroundKind If set to dark, the document is considered as having a dark background, and will be processed
1009
- /// consequently.
1010
- ///
1011
- /// \param documentComposition If set to “Text and photo”, indicates that document is a composite of text and photos (such
1012
- /// as a magazine page). The filter will be less aggressive to preserve the photos.
1013
- ///
1014
- /// \param strength The strength of the filter, between 0 and 1.
1015
- ///
1016
- - (nonnull instancetype)initWithEdgeCleaning:(GSKEdgeCleaning)edgeCleaning backgroundKind:(GSKBackgroundKind)backgroundKind documentComposition:(GSKDocumentComposition)documentComposition strength:(CGFloat)strength OBJC_DESIGNATED_INITIALIZER;
1017
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1018
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1019
- @end
1020
-
1021
- @interface GSKFilterBackgroundCleaningConfiguration (SWIFT_EXTENSION(GSSDK))
1022
- @property (nonatomic, readonly, copy) NSString * _Nonnull description;
1023
- @end
1024
-
1025
- @interface GSKFilterBackgroundCleaningConfiguration (SWIFT_EXTENSION(GSSDK))
1026
- @property (nonatomic, readonly) NSUInteger hash;
1027
- - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
1028
- @end
1029
-
1030
- /// A configuration to determine the colors of the output of the GSKScanProcessor.
1031
- SWIFT_CLASS("_TtC5GSSDK27GSKFilterColorConfiguration")
1032
- @interface GSKFilterColorConfiguration : NSObject
1033
- /// A configuration that results in a monochrome document.
1034
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterColorConfiguration * _Nonnull monochrome;)
1035
- + (GSKFilterColorConfiguration * _Nonnull)monochrome SWIFT_WARN_UNUSED_RESULT;
1036
- /// A configuration that results in a grayscale document.
1037
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterColorConfiguration * _Nonnull grayscale;)
1038
- + (GSKFilterColorConfiguration * _Nonnull)grayscale SWIFT_WARN_UNUSED_RESULT;
1039
- /// A configuration that results in a color document.
1040
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterColorConfiguration * _Nonnull color;)
1041
- + (GSKFilterColorConfiguration * _Nonnull)color SWIFT_WARN_UNUSED_RESULT;
1042
- /// The palette of colors
1043
- @property (nonatomic, readonly) GSKFilterColorPalette palette;
1044
- - (nonnull instancetype)initWithPalette:(GSKFilterColorPalette)palette OBJC_DESIGNATED_INITIALIZER;
1045
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1046
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1047
- @end
1048
-
1049
- @interface GSKFilterColorConfiguration (SWIFT_EXTENSION(GSSDK))
1050
- @property (nonatomic, readonly, copy) NSString * _Nonnull description;
1051
- @end
1052
-
1053
- @interface GSKFilterColorConfiguration (SWIFT_EXTENSION(GSSDK))
1054
- @property (nonatomic, readonly) NSUInteger hash;
1055
- - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
1056
- @end
1057
-
1058
- @class GSKFilterLightingCorrectionConfiguration;
1059
- /// The configuration to use when applying a document enhancement filter.
1060
- SWIFT_CLASS("_TtC5GSSDK22GSKFilterConfiguration")
1061
- @interface GSKFilterConfiguration : NSObject
1062
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull noOp;)
1063
- + (GSKFilterConfiguration * _Nonnull)noOp SWIFT_WARN_UNUSED_RESULT;
1064
- /// A photo filter configuration (no background cleaning)
1065
- /// \param lightingCorrectionConfiguration an optional lighting correction configuration. If nil, no correction is applied.
1066
- ///
1067
- /// \param colorConfiguration an optional color configuration. If nil, the color configuration is used.
1068
- ///
1069
- + (GSKFilterConfiguration * _Nonnull)photoWithLightingCorrectionConfiguration:(GSKFilterLightingCorrectionConfiguration * _Nullable)lightingCorrectionConfiguration colorConfiguration:(GSKFilterColorConfiguration * _Nullable)colorConfiguration SWIFT_WARN_UNUSED_RESULT;
1070
- + (GSKFilterConfiguration * _Nonnull)configurationWithLightingCorrectionConfiguration:(GSKFilterLightingCorrectionConfiguration * _Nullable)lightingCorrectionConfiguration backgroundCleaningConfiguration:(GSKFilterBackgroundCleaningConfiguration * _Nullable)backgroundCleaningConfiguration colorConfiguration:(GSKFilterColorConfiguration * _Nullable)colorConfiguration SWIFT_WARN_UNUSED_RESULT;
1071
- /// The lighting configuration
1072
- /// Determines the parameters to tune the image levels, contrast.
1073
- @property (nonatomic, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nullable lightingCorrectionConfiguration;
1074
- /// The background cleaning configuration
1075
- /// Determines the cleaning up of the document’s background.
1076
- @property (nonatomic, readonly, strong) GSKFilterBackgroundCleaningConfiguration * _Nullable backgroundCleaningConfiguration;
1077
- /// The color configuration
1078
- /// Determines the filter’s output colors.
1079
- @property (nonatomic, readonly, strong) GSKFilterColorConfiguration * _Nullable colorConfiguration;
1080
- /// A filter configuration.
1081
- /// \param lightingCorrectionConfiguration an optional lighting correction configuration. If nil, no correction is applied.
1082
- ///
1083
- /// \param backgroundCleaningConfiguration an optional background cleaning configuration. If nil, no background
1084
- /// cleaning is applied.
1085
- ///
1086
- /// \param colorConfiguration an optional color configuration. If nil, the color configuration is used.
1087
- ///
1088
- - (nonnull instancetype)initWithLightingCorrectionConfiguration:(GSKFilterLightingCorrectionConfiguration * _Nullable)lightingCorrectionConfiguration backgroundCleaningConfiguration:(GSKFilterBackgroundCleaningConfiguration * _Nullable)backgroundCleaningConfiguration colorConfiguration:(GSKFilterColorConfiguration * _Nullable)colorConfiguration OBJC_DESIGNATED_INITIALIZER;
1089
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1090
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1091
- @end
1092
-
1093
- @interface GSKFilterConfiguration (SWIFT_EXTENSION(GSSDK))
1094
- @property (nonatomic, readonly) NSUInteger hash;
1095
- - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
1096
- @end
1097
-
1098
- @interface GSKFilterConfiguration (SWIFT_EXTENSION(GSSDK))
1099
- /// A soft document filter resulting in a grayscale document.
1100
- /// This filter is ideal for documents with light print such as carbon copy,
1101
- /// documents with pale text that you need to preserve, or documents where the
1102
- /// text has little contrast with the background.
1103
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull softGrayscale;)
1104
- + (GSKFilterConfiguration * _Nonnull)softGrayscale SWIFT_WARN_UNUSED_RESULT;
1105
- /// A soft document filter resulting in a color document.
1106
- /// This filter is ideal for documents that mix text and images and it also preserves
1107
- /// text with low contrast.
1108
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull softColor;)
1109
- + (GSKFilterConfiguration * _Nonnull)softColor SWIFT_WARN_UNUSED_RESULT;
1110
- /// A strong document filter resulting in a monochrome document.
1111
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull strongMonochrome;)
1112
- + (GSKFilterConfiguration * _Nonnull)strongMonochrome SWIFT_WARN_UNUSED_RESULT;
1113
- /// A strong document filter resulting in a grayscale document.
1114
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull strongGrayscale;)
1115
- + (GSKFilterConfiguration * _Nonnull)strongGrayscale SWIFT_WARN_UNUSED_RESULT;
1116
- /// A strong document filter resulting in a color document.
1117
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull strongColor;)
1118
- + (GSKFilterConfiguration * _Nonnull)strongColor SWIFT_WARN_UNUSED_RESULT;
1119
- /// A filter specially designed for photos.
1120
- /// Unlike document filters, this filter will not attempt any background cleaning but will
1121
- /// slightly improve the lighting of the image.
1122
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull photo;)
1123
- + (GSKFilterConfiguration * _Nonnull)photo SWIFT_WARN_UNUSED_RESULT;
1124
- /// A filter specially designed to treat documents with a dark background, in particular white text
1125
- /// over a black background.
1126
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull darkBackground;)
1127
- + (GSKFilterConfiguration * _Nonnull)darkBackground SWIFT_WARN_UNUSED_RESULT;
1128
- @end
1129
-
1130
- /// A configuration to adjust the lighting of a document with GSKScanProcessor.
1131
- SWIFT_CLASS("_TtC5GSSDK40GSKFilterLightingCorrectionConfiguration")
1132
- @interface GSKFilterLightingCorrectionConfiguration : NSObject
1133
- /// A configuration that doesn’t adjust the lighting of a document.
1134
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nonnull noOp;)
1135
- + (GSKFilterLightingCorrectionConfiguration * _Nonnull)noOp SWIFT_WARN_UNUSED_RESULT;
1136
- /// A configuration to adjust the lighting of document containing text.
1137
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nonnull textDocument;)
1138
- + (GSKFilterLightingCorrectionConfiguration * _Nonnull)textDocument SWIFT_WARN_UNUSED_RESULT;
1139
- /// A configuration to adjust the lighting of a document looking like a photo.
1140
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nonnull photos;)
1141
- + (GSKFilterLightingCorrectionConfiguration * _Nonnull)photos SWIFT_WARN_UNUSED_RESULT;
1142
- /// A configuration to preserve shadow detail in a document.
1143
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nonnull shadow;)
1144
- + (GSKFilterLightingCorrectionConfiguration * _Nonnull)shadow SWIFT_WARN_UNUSED_RESULT;
1145
- @property (nonatomic, readonly) CGFloat minThreshold;
1146
- @property (nonatomic, readonly) CGFloat maxThreshold;
1147
- - (nonnull instancetype)initWithMinThreshold:(CGFloat)minThreshold maxThreshold:(CGFloat)maxThreshold OBJC_DESIGNATED_INITIALIZER;
1148
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1149
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1150
- @end
1151
-
1152
- @interface GSKFilterLightingCorrectionConfiguration (SWIFT_EXTENSION(GSSDK))
1153
- @property (nonatomic, readonly, copy) NSString * _Nonnull description;
1154
- @end
1155
-
1156
- @interface GSKFilterLightingCorrectionConfiguration (SWIFT_EXTENSION(GSSDK))
1157
- @property (nonatomic, readonly) NSUInteger hash;
1158
- - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
1159
- @end
1160
-
1161
- typedef SWIFT_ENUM(NSInteger, GSKFlashStatus, open) {
1162
- GSKFlashStatusAuto = 0,
1163
- GSKFlashStatusOn = 1,
1164
- GSKFlashStatusOff = 2,
1165
- };
1166
-
1167
- SWIFT_ENUM_FWD_DECL(NSInteger, GSKIntegrationFramework)
1168
- SWIFT_CLASS_NAMED("GSKIntegrationContext")
1169
- @interface GSKIntegrationContext : NSObject
1170
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) enum GSKIntegrationFramework currentFramework;)
1171
- + (enum GSKIntegrationFramework)currentFramework SWIFT_WARN_UNUSED_RESULT;
1172
- + (void)markScanFlowIntegrationDetected;
1173
- + (void)markLowLevelComponentUsed;
1174
- + (void)setFramework:(enum GSKIntegrationFramework)framework;
1175
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1176
- @end
1177
-
1178
- typedef SWIFT_ENUM_NAMED(NSInteger, GSKIntegrationFramework, "GSKIntegrationFramework", open) {
1179
- GSKIntegrationFrameworkNative = 0,
1180
- GSKIntegrationFrameworkReactNative = 1,
1181
- GSKIntegrationFrameworkCordova = 2,
1182
- GSKIntegrationFrameworkFlutter = 3,
1183
- GSKIntegrationFrameworkDotnet = 4,
1184
- GSKIntegrationFrameworkCapacitor = 5,
1185
- };
1186
-
1187
- /// A document image processor that performs no operation and returns the input file as an output
1188
- SWIFT_CLASS("_TtC5GSSDK29GSKNoopDocumentImageProcessor")
1189
- @interface GSKNoopDocumentImageProcessor : NSObject <GSKDocumentImageProcessor>
1190
- - (NSString * _Nullable)process:(NSString * _Nonnull)inputFilePath SWIFT_WARN_UNUSED_RESULT;
1191
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1192
- @end
1193
-
1194
- @protocol GSKLogger;
1195
- @class GSKOCRConfiguration;
1196
- @class GSKOCRResult;
1197
- /// A type that performs Optical Character Recognition (OCR) on a scanned document.
1198
- SWIFT_CLASS("_TtC5GSSDK6GSKOCR")
1199
- @interface GSKOCR : NSObject
1200
- - (nonnull instancetype)initWithLogger:(id <GSKLogger> _Nonnull)logger OBJC_DESIGNATED_INITIALIZER;
1201
- - (nonnull instancetype)init;
1202
- /// Recognize the text in the provided image
1203
- /// \param imagePath The path of the image to recognize. Ideally, provide the original, cropped image, and not the enhanced image.
1204
- /// The OCR decides what post-processing to apply for the best results.
1205
- ///
1206
- /// \param configuration Configuration for the OCR process, in particular the language in which the OCR is
1207
- /// performed. Note that you must provide the appropriate trained data.
1208
- ///
1209
- /// \param progressBlock The progress between 0 and 1. Called on the same thread.
1210
- ///
1211
- ///
1212
- /// returns:
1213
- /// An OCR result.
1214
- - (void)recognizeTextForImageAtPath:(NSString * _Nonnull)imagePath configuration:(GSKOCRConfiguration * _Nonnull)configuration onProgress:(void (^ _Nullable)(float))progressBlock completionHandler:(void (^ _Nonnull)(GSKOCRResult * _Nullable, NSError * _Nullable))completionHandler;
1215
- @end
1216
-
1217
- /// The configuration for an OCR operation.
1218
- SWIFT_CLASS("_TtC5GSSDK19GSKOCRConfiguration")
1219
- @interface GSKOCRConfiguration : NSObject
1220
- /// Initialize an OCR configuration for the modern OCR engine.
1221
- /// \param languageTags The language codes to perform OCR with.
1222
- ///
1223
- + (GSKOCRConfiguration * _Nonnull)configurationWithLanguageTags:(NSArray<NSString *> * _Nonnull)languageTags SWIFT_WARN_UNUSED_RESULT;
1224
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1225
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1226
- @end
1227
-
1228
- @class GSKTextLayout;
1229
- /// The results of an OCR operation
1230
- SWIFT_CLASS("_TtC5GSSDK12GSKOCRResult")
1231
- @interface GSKOCRResult : NSObject
1232
- /// The recognized text, formatted.
1233
- @property (nonatomic, readonly, copy) NSString * _Nonnull text;
1234
- /// The recognized text, as a structured text layout.
1235
- @property (nonatomic, readonly, strong) GSKTextLayout * _Nonnull textLayout;
1236
- - (nonnull instancetype)initWithText:(NSString * _Nonnull)text textLayout:(GSKTextLayout * _Nonnull)textLayout;
1237
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1238
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1239
- @end
1240
-
1241
- @class NSDate;
1242
- @class GSKPDFPage;
1243
- /// Describes the structure of a PDF document for the PDF generator.
1244
- SWIFT_CLASS("_TtC5GSSDK14GSKPDFDocument")
1245
- @interface GSKPDFDocument : NSObject
1246
- /// If provided, this title will be included in the PDF document properties
1247
- @property (nonatomic, readonly, copy) NSString * _Nullable title;
1248
- /// If provided, this password will be used to protect the PDF document.
1249
- /// It will need to be entered to view or edit the document.
1250
- /// AES-256 encryption is used.
1251
- /// An empty password is treated as no password.
1252
- @property (nonatomic, readonly, copy) NSString * _Nullable password;
1253
- /// If provided, the keywords will be included in the PDF document properties
1254
- @property (nonatomic, readonly, copy) NSString * _Nullable keywords;
1255
- /// If provided, this date will be included in the PDF document properties
1256
- @property (nonatomic, readonly, copy) NSDate * _Nullable creationDate;
1257
- /// If provided, this date will be included in the PDF document properties
1258
- @property (nonatomic, readonly, copy) NSDate * _Nullable lastUpdateDate;
1259
- /// List of pages that will be included in the PDF document
1260
- @property (nonatomic, readonly, copy) NSArray<GSKPDFPage *> * _Nonnull pages;
1261
- - (nonnull instancetype)initWithTitle:(NSString * _Nullable)title password:(NSString * _Nullable)password keywords:(NSString * _Nullable)keywords creationDate:(NSDate * _Nullable)creationDate lastUpdate:(NSDate * _Nullable)lastUpdate pages:(NSArray<GSKPDFPage *> * _Nonnull)pages OBJC_DESIGNATED_INITIALIZER;
1262
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1263
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1264
- @end
1265
-
1266
- @interface GSKPDFDocument (SWIFT_EXTENSION(GSSDK))
1267
- /// Initialize an instance of this type with a dictionary.
1268
- /// This is used for interfacing with cross-platform plugins but shouldn’t
1269
- /// be used in native projects.
1270
- - (nullable instancetype)initWithDictionary:(NSDictionary<NSString *, id> * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error;
1271
- /// Initialize an instance of this type with JSON data.
1272
- /// This is used for interfacing with cross-platform plugins but shouldn’t
1273
- /// be used in native projects.
1274
- - (nullable instancetype)initWithJson:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error;
1275
- @end
1276
-
1277
- @class GSKPDFSize;
1278
- /// Describes a page of a PDF document for the PDF generator.
1279
- SWIFT_CLASS("_TtC5GSSDK10GSKPDFPage")
1280
- @interface GSKPDFPage : NSObject
1281
- @property (nonatomic, readonly, copy) NSString * _Nonnull filePath;
1282
- @property (nonatomic, readonly, strong) GSKPDFSize * _Nonnull inchesSize;
1283
- @property (nonatomic, readonly, strong) GSKTextLayout * _Nullable textLayout;
1284
- - (nonnull instancetype)initWithFilePath:(NSString * _Nonnull)filePath inchesSize:(GSKPDFSize * _Nonnull)inchesSize textLayout:(GSKTextLayout * _Nullable)textLayout OBJC_DESIGNATED_INITIALIZER;
1285
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1286
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1287
- @end
1288
-
1289
- /// Physical size of a PDF page in inches.
1290
- /// If the aspect ratio doesn’t match the aspect ratio of the page in pixels,
1291
- /// margins will be added on both sides of the page image.
1292
- /// If 0 is provided for the width or height, it is computed to match the aspect ratio
1293
- /// of the image. Eg, for a receipt, we usually use width = 3.54f and height = 0.
1294
- SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
1295
- @interface GSKPDFSize : NSObject
1296
- @property (nonatomic, readonly) double width;
1297
- @property (nonatomic, readonly) double height;
1298
- - (nonnull instancetype)initWithWidth:(double)width height:(double)height OBJC_DESIGNATED_INITIALIZER;
1299
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1300
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1301
- @end
1302
-
1303
- typedef SWIFT_ENUM(NSInteger, GSKReceiptCategory, open) {
1304
- GSKReceiptCategoryGas = 0,
1305
- GSKReceiptCategoryTransportation = 1,
1306
- GSKReceiptCategoryAccomodation = 2,
1307
- GSKReceiptCategoryRestaurant = 3,
1308
- GSKReceiptCategorySupermarket = 4,
1309
- GSKReceiptCategoryOther = 5,
1310
- };
1311
-
1312
- /// A VAT rate and its associated amount detected on a receipt.
1313
- SWIFT_CLASS("_TtC5GSSDK13GSKReceiptVAT")
1314
- @interface GSKReceiptVAT : NSObject
1315
- - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
1316
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1317
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1318
- @end
1319
-
1320
- @class GSKScanFlowConfiguration;
1321
- /// A UI-driven scan flow for turning physical documents into processed digital pages.
1322
- /// Create an instance with <code>GSKScanFlowConfiguration</code> to choose the source
1323
- /// (camera, photo library, or image URL), multi-page behavior, output format,
1324
- /// filters, OCR, and structured-data extraction. Present the flow from a view
1325
- /// controller and await a <code>GSKScanFlowResult</code> with the captured pages and the
1326
- /// optional multi-page document.
1327
- /// important:
1328
- /// If you start a scan flow with the camera, your app must declare the
1329
- /// <code>NSCameraUsageDescription</code> key in <code>Info.plist</code>.
1330
- SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
1331
- @interface GSKScanFlow : NSObject
1332
- - (nonnull instancetype)initWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
1333
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1334
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1335
- @end
1336
-
1337
- @class GSKScanFlowResult;
1338
- @interface GSKScanFlow (SWIFT_EXTENSION(GSSDK))
1339
- /// Instantiates a <code>GSKScanFlow</code> instance with the provided configuration.
1340
- /// This initializer is only available from Objective-C.
1341
- + (nonnull instancetype)scanFlowWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
1342
- /// Present the scan flow.
1343
- /// @param viewController The view controller to present the scan flow from.
1344
- /// @param completionBlock A completion block/closure that will be called on the main
1345
- /// thread upon completion of the scan flow. It receives a <code>GSKScanFlowResult</code> object as
1346
- /// a parameter. This object gives you access to the scanned documents.
1347
- /// @param errorBlock A block/closure called if an error was encountered.
1348
- - (void)startFromViewController:(UIViewController * _Nonnull)viewController onSuccess:(void (^ _Nonnull)(GSKScanFlowResult * _Nonnull))completionBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))errorBlock;
1349
- @end
1350
-
1351
- SWIFT_ENUM_FWD_DECL(NSUInteger, GSKScanFlowSource)
1352
- @class NSURL;
1353
- SWIFT_ENUM_FWD_DECL(NSInteger, GSKScanOrientation)
1354
- SWIFT_ENUM_FWD_DECL(NSInteger, GSKScanFlowFilterType)
1355
- SWIFT_ENUM_FWD_DECL(NSUInteger, GSKScanFlowPDFPageSize)
1356
- SWIFT_ENUM_FWD_DECL(NSUInteger, GSKScanFlowFlashMode)
1357
- SWIFT_ENUM_FWD_DECL(NSUInteger, GSKScanFlowMultiPageFormat)
1358
- @class GSKScanFlowOCRConfiguration;
1359
- /// Enables configuration of a <code>GSKScanFlow</code> instance.
1360
- /// Pass an instance of this class to the initializer of <code>GSKScanFlow</code>
1361
- /// to build the desired scan flow.
1362
- SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
1363
- @interface GSKScanFlowConfiguration : NSObject
1364
- /// Specifies the source for the scanned documents (eg. the camera, …).
1365
- /// If source is <code>.imageURL</code>, then you must assign a <code>sourceImageURL</code>.
1366
- @property (nonatomic) enum GSKScanFlowSource source;
1367
- /// The image URL if the <code>source</code> is <code>.imageURL</code>.
1368
- @property (nonatomic, copy) NSURL * _Nullable sourceImageURL;
1369
- /// Whether multi page mode should be used. Only applies when the source
1370
- /// is <code>.camera</code>. When multipage mode is active, the user will have the
1371
- /// opportunity to snap multiple scans in a row and the output document
1372
- /// will contain all those pages. When multipage mode is off, the user
1373
- /// will only scan a single page. The output document will always contain
1374
- /// a single page. Defaults to <code>true</code>.
1375
- @property (nonatomic) BOOL multiPage;
1376
- /// Whether the user should be presented with a screen that lets them review all
1377
- /// captured scans at the end of the scan flow, where they’ll be able to edit each
1378
- /// scan once more before finally submitting the captured scans for processing.
1379
- /// Defaults to <code>false</code>.
1380
- @property (nonatomic) BOOL showFinalReview;
1381
- /// What orientation that a scan should be rotated to after it’s been captured.
1382
- /// Defaults to <code>automatic</code>. See <code>GSKScanOrientation</code> for more information.
1383
- @property (nonatomic) enum GSKScanOrientation defaultScanOrientation;
1384
- /// Any specific kind of post-processing to use. Defaults to <code>.automatic</code>.
1385
- @property (nonatomic) enum GSKScanFlowFilterType defaultFilter;
1386
- /// The minimum readability level that scanned documents are required to have. If a scan has a lower
1387
- /// readability level, then a warning will be shown as part of the scanning flow, and the user will be
1388
- /// prompted to retry the scan in question.
1389
- @property (nonatomic) GSKReadabilityLevel requiredReadabilityLevel;
1390
- /// Whether to skip showing the post-processing screen. We only recommend
1391
- /// enabling this option when scanning structured data. Generally, you want
1392
- /// the user to visually confirm the quality of each scan.
1393
- @property (nonatomic) BOOL skipPostProcessingScreen;
1394
- /// Select which actions to display within the post-processing screen.
1395
- /// Defaults to all actions.
1396
- @property (nonatomic) GSKScanFlowPostProcessingActions postProcessingActions;
1397
- /// Determines the size of the pages when generating PDFs. Defaults to <code>fit</code>.
1398
- @property (nonatomic) enum GSKScanFlowPDFPageSize pdfPageSize;
1399
- /// Whether the flash button should be hidden. Defaults to <code>false</code>.
1400
- @property (nonatomic) BOOL flashButtonHidden;
1401
- /// Whether the photo library button should be hidden during camera-based scan flows. Defaults to <code>false</code>.
1402
- @property (nonatomic) BOOL photoLibraryButtonHidden;
1403
- /// Determines the default flash mode. Combine this with <code>flashButtonHidden</code>
1404
- /// if you want to only allow a specific flash mode. Defaults to <code>.off</code>.
1405
- @property (nonatomic) enum GSKScanFlowFlashMode defaultFlashMode;
1406
- /// Determines the document format. Defaults to <code>.PDF</code>.
1407
- @property (nonatomic) enum GSKScanFlowMultiPageFormat multiPageFormat;
1408
- /// Optional password used to protect generated PDF documents.
1409
- /// An empty password is treated as no password.
1410
- /// This only applies when <code>multiPageFormat</code> is <code>.pdf</code>.
1411
- @property (nonatomic, copy) NSString * _Nullable pdfPassword;
1412
- /// Custom font file used during PDF generation to embed an invisible text
1413
- /// layer. If <code>nil</code>, a default font is used, which only supports Latin languages.
1414
- @property (nonatomic, copy) NSURL * _Nullable pdfFontFileURL;
1415
- /// The background color used for the UI. Defaults to <code>.black</code>.
1416
- @property (nonatomic, strong) UIColor * _Nonnull backgroundColor;
1417
- /// The foreground color used for the UI (text and icons). Defaults to <code>.white</code>.
1418
- @property (nonatomic, strong) UIColor * _Nonnull foregroundColor;
1419
- /// The highlight color used for the UI (document detection overlay). Defaults
1420
- /// to <code>.blue</code>.
1421
- @property (nonatomic, strong) UIColor * _Nonnull highlightColor;
1422
- /// The menu color used for the UI. Defaults to <code>nil</code>, meaning that the system
1423
- /// default color will be used (blue on iOS, for example).
1424
- @property (nonatomic, strong) UIColor * _Nullable menuColor;
1425
- /// JPEG quality used to compress captured images. Between 0 and 100, with 100
1426
- /// being the best quality. Defaults to <code>60</code>.
1427
- @property (nonatomic) NSInteger jpegQuality;
1428
- /// Max scan dimension in pixels when generating PDF files. All scans included
1429
- /// in PDF files will be scaled so that both their height and width are smaller
1430
- /// than this value, while maintaining their aspect ratio. Defaults to <code>0</code>, which
1431
- /// means no scaling is applied.
1432
- @property (nonatomic) NSInteger pdfMaxScanDimension;
1433
- /// The configuration for Optical Character Recognition. Default is <code>nil</code>, which
1434
- /// means no OCR is performed.
1435
- @property (nonatomic, strong) GSKScanFlowOCRConfiguration * _Nullable ocrConfiguration;
1436
- /// The types of structured data you want to extract from the document. This is
1437
- /// an option set so you can combine multiple values.
1438
- @property (nonatomic) GSKScanFlowStructuredData structuredData;
1439
- /// The URL of the directory to which the scan flow should write its output files (such as
1440
- /// scan images). Defaults to the application’s temporary directory. Must contain a valid
1441
- /// file URL that can either point to an existing or non-existing directory, but which must
1442
- /// not point to a file. Note: If setting this to a security-scoped URL, then you are responsible
1443
- /// for making balanced calls to the system’s <code>startAccessingSecurityScopedResource</code>
1444
- /// and <code>stopAccessingSecurityScopedResource</code> APIs before and after running a scan
1445
- /// flow session.
1446
- @property (nonatomic, copy) NSURL * _Nonnull outputDirectoryURL;
1447
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1448
- @end
1449
-
1450
- @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
1451
- - (BOOL)validate:(NSError * _Nullable * _Nullable)error;
1452
- @end
1453
-
1454
- @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
1455
- /// Create a configuration from a dictionary.
1456
- /// This is used for interfacing with cross-platform plugins but shouldn’t
1457
- /// be used in native projects.
1458
- + (nullable instancetype)configurationWithDictionary:(NSDictionary * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
1459
- /// Create a configuration from JSON data.
1460
- /// This is used for interfacing with cross-platform plugins but shouldn’t
1461
- /// be used in native projects.
1462
- + (nullable instancetype)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
1463
- @end
1464
-
1465
- /// Enum that defines various numeric error codes that can occur during a scan flow.
1466
- /// Cross-platform plugins expose the matching string code as the <code>code</code> field in their structured error payloads.
1467
- /// | String code | Description | Suggested handling |
1468
- /// | — | — | — |
1469
- /// | <code>cancellation_error</code> | The user canceled the document or barcode scan flow. | Treat as a normal exit; do not show an error. |
1470
- /// | <code>configuration_error</code> | The configuration or input parameters are invalid. | Fix the configuration before retrying. |
1471
- /// | <code>licensing_error</code> | The license key is invalid, expired, or not initialized. | Verify the license key and contact support if needed. |
1472
- /// | <code>capture_error</code> | The camera or capture session failed. | Let the user retry; restart the device if the problem persists. |
1473
- /// | <code>storage_space_error</code> | There is not enough storage space to write generated files. | Ask the user to free up storage space and retry. |
1474
- /// | <code>internal_error</code> | An unexpected SDK error occurred. | Show a generic error and collect the underlying error for diagnostics. |
1475
- typedef SWIFT_ENUM(NSInteger, GSKScanFlowErrorCode, open) {
1476
- /// User has canceled the scan flow
1477
- GSKScanFlowCancellationErrorCode SWIFT_COMPILE_NAME("cancellation") = 999,
1478
- /// A general error due to an incorrect configuration. Verify that your
1479
- /// inputs match the API requirements.
1480
- GSKScanFlowConfigurationErrorCode SWIFT_COMPILE_NAME("configuration") = 1000,
1481
- /// A licensing error. This is a developer error and you should contact the
1482
- /// Genius Scan SDK support team to make sure you have a valid license key.
1483
- GSKScanFlowLicensingErrorCode SWIFT_COMPILE_NAME("licensing") = 1001,
1484
- /// An error that happened while capturing the scans. This can sometimes be recovered
1485
- /// by restarting the device.
1486
- GSKScanFlowCaptureErrorCode SWIFT_COMPILE_NAME("capture") = 1002,
1487
- /// An error caused by low storage space. This can be recovered by cleaning up
1488
- /// storage space and trying again.
1489
- GSKScanFlowStorageSpaceErrorCode SWIFT_COMPILE_NAME("storageSpace") = 1003,
1490
- /// An internal error. This is a catch-all category, and the underlying error will
1491
- /// give more details.
1492
- GSKScanFlowInternalErrorCode SWIFT_COMPILE_NAME("internal") = 9999,
1493
- };
1494
-
1495
- SWIFT_CLASS("_TtC5GSSDK26GSKScanFlowErrorCodeBridge")
1496
- @interface GSKScanFlowErrorCodeBridge : NSObject
1497
- + (NSString * _Nonnull)stringCodeForRawValue:(NSInteger)rawValue SWIFT_WARN_UNUSED_RESULT;
1498
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1499
- @end
1500
-
1501
- /// The different possible filters for the scanner UI.
1502
- /// Each case maps to a predefined filter configuration except <code>.automatic</code>.
1503
- typedef SWIFT_ENUM(NSInteger, GSKScanFlowFilterType, open) {
1504
- GSKScanFlowFilterNone SWIFT_COMPILE_NAME("none") = 0,
1505
- /// Automatic filter
1506
- GSKScanFlowFilterAutomatic SWIFT_COMPILE_NAME("automatic") = 1,
1507
- /// Automatic filter with a monochrome output
1508
- GSKScanFlowFilterAutomaticDocumentMonochrome SWIFT_COMPILE_NAME("automaticDocumentMonochrome") = 2,
1509
- /// Automatic filter with a grayscale output
1510
- GSKScanFlowFilterAutomaticDocumentGrayscale SWIFT_COMPILE_NAME("automaticDocumentGrayscale") = 3,
1511
- /// Automatic filter with a color output
1512
- GSKScanFlowFilterAutomaticDocumentColor SWIFT_COMPILE_NAME("automaticDocumentColor") = 4,
1513
- /// A soft gray scale filter, ideal for documents containing both text and photos, or for text documents with
1514
- /// a low-contrast between the text and the background.
1515
- GSKScanFlowFilterSoftGrayscale SWIFT_COMPILE_NAME("softGrayscale") = 5,
1516
- /// A soft color filter, ideal for documents containing both text and photos
1517
- GSKScanFlowFilterSoftColor SWIFT_COMPILE_NAME("softColor") = 6,
1518
- /// A strong monochrome filter, ideal for text documents
1519
- GSKScanFlowFilterStrongMonochrome SWIFT_COMPILE_NAME("strongMonochrome") = 7,
1520
- /// A strong grayscale filter, ideal for text documents
1521
- GSKScanFlowFilterStrongGrayscale SWIFT_COMPILE_NAME("strongGrayscale") = 8,
1522
- /// A strong color filter, ideal for text documents with some color
1523
- GSKScanFlowFilterStrongColor SWIFT_COMPILE_NAME("strongColor") = 9,
1524
- /// A filter that ensures best results for documents with a dark background
1525
- GSKScanFlowFilterDarkBackground SWIFT_COMPILE_NAME("darkBackground") = 10,
1526
- /// A filter designed to improve scans of photos.
1527
- GSKScanFlowFilterPhoto SWIFT_COMPILE_NAME("photo") = 11,
1528
- };
1529
-
1530
- /// The capture screen flash mode.
1531
- typedef SWIFT_ENUM(NSUInteger, GSKScanFlowFlashMode, open) {
1532
- /// Let the system determine whether to turn on the flash based on the lighting conditions.
1533
- GSKScanFlowFlashModeAuto = 0,
1534
- /// Force the flash on.
1535
- GSKScanFlowFlashModeOn = 1,
1536
- /// Force the flash off.
1537
- GSKScanFlowFlashModeOff = 2,
1538
- };
1539
-
1540
- /// The format of the exported document.
1541
- typedef SWIFT_ENUM(NSUInteger, GSKScanFlowMultiPageFormat, open) {
1542
- GSKScanFlowNone SWIFT_COMPILE_NAME("none") = 0,
1543
- GSKScanFlowPDF SWIFT_COMPILE_NAME("pdf") = 1,
1544
- GSKScanFlowTIFF SWIFT_COMPILE_NAME("tiff") = 2,
1545
- };
1546
-
1547
- /// The configuration for text recognition
1548
- SWIFT_CLASS("_TtC5GSSDK27GSKScanFlowOCRConfiguration")
1549
- @interface GSKScanFlowOCRConfiguration : NSObject
1550
- /// The BCP47 language tags to process OCR with.
1551
- @property (nonatomic, copy) NSArray<NSString *> * _Nonnull languageTags;
1552
- /// The formats in which the OCR result is made available in
1553
- /// the ScanFlow result. Defaults to all formats.
1554
- @property (nonatomic) GSKScanFlowOCROutputFormats outputFormats;
1555
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1556
- @end
1557
-
1558
- /// The result of the text recognition.
1559
- SWIFT_CLASS("_TtC5GSSDK20GSKScanFlowOCRResult")
1560
- @interface GSKScanFlowOCRResult : NSObject
1561
- /// The raw text recognized in the document.
1562
- @property (nonatomic, copy) NSString * _Nullable text;
1563
- /// The text layout of the recognized text.
1564
- @property (nonatomic, copy) NSString * _Nullable hocrTextLayout;
1565
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1566
- @end
1567
-
1568
- /// The generated PDF paper size.
1569
- typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
1570
- /// PDF page with a width of 8.27 inch (A4 width) and fitting height.
1571
- GSKScanFlowPDFPageFit SWIFT_COMPILE_NAME("fit") = 0,
1572
- /// ISO A4 (21cm x 29.7cm).
1573
- GSKScanFlowPDFPageA4 SWIFT_COMPILE_NAME("A4") = 1,
1574
- /// US Letter (8.5in x 11in).
1575
- GSKScanFlowPDFPageLetter SWIFT_COMPILE_NAME("letter") = 2,
1576
- };
1577
-
1578
- @class GSKScanFlowScan;
1579
- /// The result of a scan flow.
1580
- SWIFT_CLASS("_TtC5GSSDK17GSKScanFlowResult")
1581
- @interface GSKScanFlowResult : NSObject
1582
- /// Document containing the pages that were scanned during the scan
1583
- /// flow. The format is specified by the <code>multiPageFormat</code> property of
1584
- /// the <code>GSKScanFlowConfiguration</code> used for the scan flow. This is <code>nil</code>
1585
- /// when <code>multiPageFormat</code> is <code>.none</code> or if document generation failed.
1586
- @property (nonatomic, copy) NSURL * _Nullable multiPageDocumentURL;
1587
- /// The individual scans taken during the scan flow.
1588
- /// Each scan object contains both the original and the enhanced scans.
1589
- @property (nonatomic, copy) NSArray<GSKScanFlowScan *> * _Nonnull scans;
1590
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1591
- @end
1592
-
1593
- @interface GSKScanFlowResult (SWIFT_EXTENSION(GSSDK))
1594
- /// A dictionary representation of the result.
1595
- /// This is used for interfacing with cross-platform plugins but shouldn’t
1596
- /// be used in native projects.
1597
- @property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nonnull dictionary;
1598
- /// Return a JSON representation of the result.
1599
- /// This is used for interfacing with cross-platform plugins but shouldn’t
1600
- /// be used in native projects.
1601
- - (NSString * _Nonnull)json SWIFT_WARN_UNUSED_RESULT;
1602
- @end
1603
-
1604
- @class GSKScanFlowStructuredDataResult;
1605
- /// A page captured by the scan flow.
1606
- SWIFT_CLASS("_TtC5GSSDK15GSKScanFlowScan")
1607
- @interface GSKScanFlowScan : NSObject
1608
- /// The original JPEG out of the camera.
1609
- /// Note that this image might be rotated, and needs to be read
1610
- /// with its EXIF orientation to be properly displayed. <code>UIImage</code>
1611
- /// methods will properly take care of that.
1612
- @property (nonatomic, copy) NSString * _Nonnull originalFilePath;
1613
- /// The enhanced, processed, image.
1614
- @property (nonatomic, copy) NSString * _Nonnull enhancedFilePath;
1615
- /// If OCR was performed, the recognized text.
1616
- @property (nonatomic, strong) GSKScanFlowOCRResult * _Nullable ocrResult;
1617
- /// If structured data extraction was performed, the structured data.
1618
- @property (nonatomic, strong) GSKScanFlowStructuredDataResult * _Nullable structuredData;
1619
- - (nonnull instancetype)initWithOriginalFilePath:(NSString * _Nonnull)originalFilePath enhancedFilePath:(NSString * _Nonnull)enhancedFilePath OBJC_DESIGNATED_INITIALIZER;
1620
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1621
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1622
- @end
1623
-
1624
- /// The source for a scan flow
1625
- typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
1626
- /// Scan using the camera
1627
- GSKScanFlowSourceCamera = 0,
1628
- /// Import a file from a URL
1629
- GSKScanFlowSourceImageURL = 1,
1630
- /// Import a file from the user’s photo library
1631
- GSKScanFlowSourceLibrary = 2,
1632
- };
1633
-
1634
- @class GSKStructuredDataBankDetails;
1635
- @class GSKStructuredDataContact;
1636
- @class GSKStructuredDataReceipt;
1637
- /// The result of a structured data extraction.
1638
- SWIFT_CLASS("_TtC5GSSDK31GSKScanFlowStructuredDataResult")
1639
- @interface GSKScanFlowStructuredDataResult : NSObject
1640
- /// Present if bank details extraction was requested, <code>nil</code> otherwise.
1641
- @property (nonatomic, strong) GSKStructuredDataBankDetails * _Nullable bankDetails;
1642
- /// Present if business card contact extraction was requested and a contact was
1643
- /// successfully extracted, <code>nil</code> otherwise.
1644
- @property (nonatomic, strong) GSKStructuredDataContact * _Nullable businessCardContact;
1645
- /// Present if receipt extraction was requested and a receipt/invoice was
1646
- /// successfully extracted, <code>nil</code> otherwise.
1647
- @property (nonatomic, strong) GSKStructuredDataReceipt * _Nullable receipt;
1648
- /// Present if barcode extraction was requested and codes were successfully extracted, empty otherwise.
1649
- @property (nonatomic, copy) NSArray<GSKBarcode *> * _Nonnull barcodes;
1650
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1651
- @end
1652
-
1653
- /// Enum that describes how a document should be oriented/rotated
1654
- /// after it’s been captured.
1655
- typedef SWIFT_ENUM(NSInteger, GSKScanOrientation, open) {
1656
- /// The document’s original orientation should be used. No rotation
1657
- /// should be applied.
1658
- GSKScanOrientationOriginal = 0,
1659
- /// The document should be automatically rotated to its ideal orientation.
1660
- GSKScanOrientationAutomatic = 1,
1661
- };
1662
-
1663
- /// Address data extracted from a business card document through OCR.
1664
- SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataAddress")
1665
- @interface GSKStructuredDataAddress : NSObject
1666
- /// The city component of the address.
1667
- @property (nonatomic, readonly, copy) NSString * _Nullable city;
1668
- /// The postal/zip code component of the address.
1669
- @property (nonatomic, readonly, copy) NSString * _Nullable postalCode;
1670
- /// The street name component of the address.
1671
- @property (nonatomic, readonly, copy) NSString * _Nullable street;
1672
- /// The state component of the address.
1673
- @property (nonatomic, readonly, copy) NSString * _Nullable state;
1674
- /// The country component of the address.
1675
- @property (nonatomic, readonly, copy) NSString * _Nullable country;
1676
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1677
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1678
- @end
1679
-
1680
- /// The bank details extracted from a document through OCR.
1681
- SWIFT_CLASS("_TtC5GSSDK28GSKStructuredDataBankDetails")
1682
- @interface GSKStructuredDataBankDetails : NSObject
1683
- /// The IBAN if successfully extracted, otherwise is <code>nil</code>.
1684
- @property (nonatomic, copy) NSString * _Nullable iban;
1685
- /// The BIC code if successfully extracted, otherwise is <code>nil</code>.
1686
- @property (nonatomic, copy) NSString * _Nullable bic;
1687
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1688
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1689
- @end
1690
-
1691
- @class GSKStructuredDataPhoneNumber;
1692
- @class CNContact;
1693
- /// Contact data extracted from a business card document through OCR.
1694
- SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataContact")
1695
- @interface GSKStructuredDataContact : NSObject
1696
- /// Any name that appears on the business card. Contains the full name, including all components.
1697
- @property (nonatomic, readonly, copy) NSString * _Nullable name;
1698
- /// Any organization that appears on the business card.
1699
- @property (nonatomic, readonly, copy) NSString * _Nullable organization;
1700
- /// Any address that appears on the business card.
1701
- @property (nonatomic, readonly, strong) GSKStructuredDataAddress * _Nullable address;
1702
- /// The phone numbers that appear on the business card.
1703
- @property (nonatomic, readonly, copy) NSArray<GSKStructuredDataPhoneNumber *> * _Nonnull phoneNumbers;
1704
- /// The links/URLs that appear on the business card.
1705
- @property (nonatomic, readonly, copy) NSArray<NSURL *> * _Nonnull links;
1706
- /// The email addresses that appear on the business card.
1707
- @property (nonatomic, readonly, copy) NSArray<NSString *> * _Nonnull emailAddresses;
1708
- /// Return a <code>CNContact</code> representation of the contact data within this instance.
1709
- - (CNContact * _Nonnull)asCNContact SWIFT_WARN_UNUSED_RESULT;
1710
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1711
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1712
- @end
1713
-
1714
- /// Class that enables structured data to be extracted from
1715
- /// scanned documents.
1716
- SWIFT_CLASS("_TtC5GSSDK26GSKStructuredDataExtractor")
1717
- @interface GSKStructuredDataExtractor : NSObject
1718
- - (nonnull instancetype)init;
1719
- @end
1720
-
1721
- @interface GSKStructuredDataExtractor (SWIFT_EXTENSION(GSSDK))
1722
- /// Extract any bank details that were found in a given document by
1723
- /// passing in the result of performing OCR on that document. Use
1724
- /// <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
1725
- /// was performed for languages that don’t support structured data extraction,
1726
- /// then this method will throw an error.
1727
- - (void)bankDetailsFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataBankDetails * _Nullable, NSError * _Nullable))completionHandler;
1728
- /// Extract any business card contact that was found in a given document
1729
- /// by passing in the result of performing OCR on that document. Use
1730
- /// <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
1731
- /// was performed for languages that don’t support structured data extraction,
1732
- /// then this method will throw an error.
1733
- - (void)businessCardContactFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataContact * _Nullable, NSError * _Nullable))completionHandler;
1734
- /// Extract any receipt/invoice information that was found in a given
1735
- /// document by passing in the result of performing OCR on that document.
1736
- /// Use <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
1737
- /// was performed for languages that don’t support structured data extraction,
1738
- /// then this method will throw an error.
1739
- - (void)receiptFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataReceipt * _Nullable, NSError * _Nullable))completionHandler;
1740
- @end
1741
-
1742
- /// Enum defining errors that can be thrown by <code>GSKStructuredDataExtractor</code>.
1743
- /// Note that thrown errors will be wrapped in <code>NSError</code> containers.
1744
- typedef SWIFT_ENUM(NSInteger, GSKStructuredDataExtractorError, open) {
1745
- GSKStructuredDataExtractorErrorMissingRequiredOCRMetadata = -1,
1746
- };
1747
- static NSString * _Nonnull const GSKStructuredDataExtractorErrorDomain = @"GSSDK.GSKStructuredDataExtractorError";
1748
-
1749
- /// Phone number data extracted from a business card document through OCR.
1750
- SWIFT_CLASS("_TtC5GSSDK28GSKStructuredDataPhoneNumber")
1751
- @interface GSKStructuredDataPhoneNumber : NSObject
1752
- /// The label of the phone number. For example “Main”, “Office”, etc.
1753
- @property (nonatomic, readonly, copy) NSString * _Nonnull label;
1754
- /// A string representation of the phone number itself.
1755
- @property (nonatomic, readonly, copy) NSString * _Nonnull number;
1756
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1757
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1758
- @end
1759
-
1760
- @class NSLocale;
1761
- /// Receipt/invoice details extracted from a document through OCR.
1762
- SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataReceipt")
1763
- @interface GSKStructuredDataReceipt : NSObject
1764
- /// The locale that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
1765
- @property (nonatomic, readonly, copy) NSLocale * _Nullable locale;
1766
- /// The merchant that the receipt is from, if successfully extracted, otherwise <code>nil</code>.
1767
- @property (nonatomic, readonly, copy) NSString * _Nullable merchant;
1768
- /// The code of currency that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
1769
- @property (nonatomic, readonly, copy) NSString * _Nullable currency;
1770
- /// Any date that appears on the receipt, if successfully extracted, otherwise <code>nil</code>.
1771
- @property (nonatomic, readonly, copy) NSDate * _Nullable date;
1772
- /// The VAT number of the merchant, if successfully extracted, otherwise <code>nil</code>.
1773
- @property (nonatomic, readonly, copy) NSString * _Nullable vatNumber;
1774
- /// The value-added tax (VAT) details.
1775
- /// This property is an array because a receipt may display multiple VAT rates applying to different items
1776
- @property (nonatomic, readonly, copy) NSArray<GSKReceiptVAT *> * _Nonnull vatValues;
1777
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1778
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1779
- @end
1780
-
1781
- SWIFT_CLASS("_TtC5GSSDK13GSKTextLayout")
1782
- @interface GSKTextLayout : NSObject
1783
- @property (nonatomic, readonly, copy) NSString * _Nullable hocr;
1784
- - (nonnull instancetype)initWithHocr:(NSString * _Nullable)hocr OBJC_DESIGNATED_INITIALIZER;
1785
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1786
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1787
- @end
1788
-
1789
- /// Converts an OCR text layout into plain text.
1790
- /// A <code>GSKOCRResult</code> contains both raw text and a <code>GSKTextLayout</code>, which preserves spatial information such as
1791
- /// bounding boxes and line/word positions. This converter reconstructs the raw text from a <code>GSKTextLayout</code> by
1792
- /// traversing its bounding boxes in reading order and grouping content into paragraphs.
1793
- /// Use this when you want to retain only the spatial representation (for highlighting, selection, reflow, etc.)
1794
- /// and regenerate the plain-text representation on demand, rather than storing both.
1795
- SWIFT_CLASS("_TtC5GSSDK28GSKTextLayoutToTextConverter")
1796
- @interface GSKTextLayoutToTextConverter : NSObject
1797
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1798
- @end
1799
-
1800
- SWIFT_CLASS("_TtC5GSSDK34GSKTextLayoutToTextConverterResult")
1801
- @interface GSKTextLayoutToTextConverterResult : NSObject
1802
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1803
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1804
- @end
1805
-
1806
- SWIFT_CLASS("_TtC5GSSDK25GSKUIBackgroundProcessing")
1807
- @interface GSKUIBackgroundProcessing : NSObject
1808
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIBackgroundProcessing * _Nonnull shared;)
1809
- + (GSKUIBackgroundProcessing * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
1810
- @property (nonatomic, readonly, strong) dispatch_queue_t _Nonnull documentGenerationQueue;
1811
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1812
- @end
1813
-
1814
- SWIFT_CLASS("_TtC5GSSDK14GSSDKResources")
1815
- @interface GSSDKResources : NSObject
1816
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _Nonnull bundle;)
1817
- + (NSBundle * _Nonnull)bundle SWIFT_WARN_UNUSED_RESULT;
1818
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1819
- @end
1820
-
1821
- @interface UIViewController (SWIFT_EXTENSION(GSSDK))
1822
- /// Return a status bar style appropriate for this view controller
1823
- /// based on the contrast between the status bar’s contents and the
1824
- /// view controller’s background color.
1825
- @property (nonatomic, readonly) UIStatusBarStyle gsk_statusBarStyleBasedOnContrast;
1826
- /// Return the interface orientations that this view controller
1827
- /// should support based on the current device.
1828
- @property (nonatomic, readonly) UIInterfaceOrientationMask gsk_supportedInterfaceOrientations;
1829
- @end
1830
-
1831
- #endif // defined(__OBJC__)
1832
- #if __has_attribute(external_source_symbol)
1833
- # pragma clang attribute pop
1834
- #endif
1835
- #if defined(__cplusplus)
1836
- #endif
1837
- #pragma clang diagnostic pop
1838
- #endif
1839
-
1840
- #elif defined(__x86_64__) && __x86_64__
1841
- // Generated by Apple Swift version 6.3.1 effective-5.10 (swiftlang-6.3.1.1.2 clang-2100.0.123.102)
1842
- #ifndef GSSDK_SWIFT_H
1843
- #define GSSDK_SWIFT_H
1844
- #pragma clang diagnostic push
1845
- #pragma clang diagnostic ignored "-Wgcc-compat"
1846
-
1847
- #if !defined(__has_include)
1848
- # define __has_include(x) 0
1849
- #endif
1850
- #if !defined(__has_attribute)
1851
- # define __has_attribute(x) 0
1852
- #endif
1853
- #if !defined(__has_feature)
1854
- # define __has_feature(x) 0
1855
- #endif
1856
- #if !defined(__has_warning)
1857
- # define __has_warning(x) 0
1858
- #endif
1859
-
1860
- #if __has_include(<swift/objc-prologue.h>)
1861
- # include <swift/objc-prologue.h>
1862
- #endif
1863
-
1864
- #pragma clang diagnostic ignored "-Wauto-import"
1865
- #if defined(__OBJC__)
1866
- #include <Foundation/Foundation.h>
1867
- #endif // defined(__OBJC__)
1868
- #if defined(__cplusplus)
1869
- #include <cstdint>
1870
- #include <cstddef>
1871
- #include <cstdbool>
1872
- #include <cstring>
1873
- #include <stdlib.h>
1874
- #include <new>
1875
- #include <type_traits>
1876
- #else
1877
- #include <stdint.h>
1878
- #include <stddef.h>
1879
- #include <stdbool.h>
1880
- #include <string.h>
1881
- #endif
1882
- #if defined(__cplusplus)
1883
- #pragma clang diagnostic push
1884
- #pragma clang diagnostic ignored "-Wnon-modular-include-in-framework-module"
1885
- #if defined(__arm64e__) && __has_include(<ptrauth.h>)
1886
- # include <ptrauth.h>
1887
- #else
1888
- #pragma clang diagnostic push
1889
- #pragma clang diagnostic ignored "-Wreserved-macro-identifier"
1890
- # ifndef __ptrauth_swift_value_witness_function_pointer
1891
- # define __ptrauth_swift_value_witness_function_pointer(x)
1892
- # endif
1893
- # ifndef __ptrauth_swift_class_method_pointer
1894
- # define __ptrauth_swift_class_method_pointer(x)
1895
- # endif
1896
- #pragma clang diagnostic pop
1897
- #endif
1898
- #pragma clang diagnostic pop
1899
- #endif
1900
-
1901
- #if !defined(SWIFT_TYPEDEFS)
1902
- # define SWIFT_TYPEDEFS 1
1903
- # if __has_include(<uchar.h>)
1904
- # include <uchar.h>
1905
- # elif !defined(__cplusplus)
1906
- typedef unsigned char char8_t;
1907
- typedef uint_least16_t char16_t;
1908
- typedef uint_least32_t char32_t;
1909
- # endif
1910
- typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
1911
- typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
1912
- typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
1913
- typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
1914
- typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
1915
- typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
1916
- typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
1917
- typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
1918
- typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
1919
- typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
1920
- typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
1921
- typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
1922
- #endif
1923
-
1924
- #if !defined(SWIFT_PASTE)
1925
- # define SWIFT_PASTE_HELPER(x, y) x##y
1926
- # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
1927
- #endif
1928
- #if !defined(SWIFT_METATYPE)
1929
- # define SWIFT_METATYPE(X) Class
1930
- #endif
1931
- #if !defined(SWIFT_CLASS_PROPERTY)
1932
- # if __has_feature(objc_class_property)
1933
- # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
1934
- # else
1935
- # define SWIFT_CLASS_PROPERTY(...)
1936
- # endif
1937
- #endif
1938
- #if !defined(SWIFT_RUNTIME_NAME)
1939
- # if __has_attribute(objc_runtime_name)
1940
- # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
1941
- # else
1942
- # define SWIFT_RUNTIME_NAME(X)
1943
- # endif
1944
- #endif
1945
- #if !defined(SWIFT_COMPILE_NAME)
1946
- # if __has_attribute(swift_name)
1947
- # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
1948
- # else
1949
- # define SWIFT_COMPILE_NAME(X)
1950
- # endif
1951
- #endif
1952
- #if !defined(SWIFT_METHOD_FAMILY)
1953
- # if __has_attribute(objc_method_family)
1954
- # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
1955
- # else
1956
- # define SWIFT_METHOD_FAMILY(X)
1957
- # endif
1958
- #endif
1959
- #if !defined(SWIFT_NOESCAPE)
1960
- # if __has_attribute(noescape)
1961
- # define SWIFT_NOESCAPE __attribute__((noescape))
1962
- # else
1963
- # define SWIFT_NOESCAPE
1964
- # endif
1965
- #endif
1966
- #if !defined(SWIFT_RELEASES_ARGUMENT)
1967
- # if __has_attribute(ns_consumed)
1968
- # define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
1969
- # else
1970
- # define SWIFT_RELEASES_ARGUMENT
1971
- # endif
1972
- #endif
1973
- #if !defined(SWIFT_WARN_UNUSED_RESULT)
1974
- # if __has_attribute(warn_unused_result)
1975
- # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
1976
- # else
1977
- # define SWIFT_WARN_UNUSED_RESULT
1978
- # endif
1979
- #endif
1980
- #if !defined(SWIFT_NORETURN)
1981
- # if __has_attribute(noreturn)
1982
- # define SWIFT_NORETURN __attribute__((noreturn))
1983
- # else
1984
- # define SWIFT_NORETURN
1985
- # endif
1986
- #endif
1987
- #if !defined(SWIFT_CLASS_EXTRA)
1988
- # define SWIFT_CLASS_EXTRA
1989
- #endif
1990
- #if !defined(SWIFT_PROTOCOL_EXTRA)
1991
- # define SWIFT_PROTOCOL_EXTRA
1992
- #endif
1993
- #if !defined(SWIFT_ENUM_EXTRA)
1994
- # define SWIFT_ENUM_EXTRA
1995
- #endif
1996
- #if !defined(SWIFT_CLASS)
1997
- # if __has_attribute(objc_subclassing_restricted)
1998
- # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
1999
- # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
2000
- # else
2001
- # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
2002
- # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
2003
- # endif
2004
- #endif
2005
- #if !defined(SWIFT_RESILIENT_CLASS)
2006
- # if __has_attribute(objc_class_stub)
2007
- # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
2008
- # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
2009
- # else
2010
- # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
2011
- # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
2012
- # endif
2013
- #endif
2014
- #if !defined(SWIFT_PROTOCOL)
2015
- # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
2016
- # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
2017
- #endif
2018
- #if !defined(SWIFT_EXTENSION)
2019
- # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
2020
- #endif
2021
- #if !defined(OBJC_DESIGNATED_INITIALIZER)
2022
- # if __has_attribute(objc_designated_initializer)
2023
- # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
2024
- # else
2025
- # define OBJC_DESIGNATED_INITIALIZER
2026
- # endif
2027
- #endif
2028
- #if !defined(SWIFT_ENUM_ATTR)
2029
- # if __has_attribute(enum_extensibility)
2030
- # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
2031
- # else
2032
- # define SWIFT_ENUM_ATTR(_extensibility)
2033
- # endif
2034
- #endif
2035
- #if !defined(SWIFT_ENUM)
2036
- # if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || __has_feature(objc_fixed_enum)
2037
- # define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
2038
- # if __has_feature(generalized_swift_name)
2039
- # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
2040
- # else
2041
- # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
2042
- # endif
2043
- # else
2044
- # define SWIFT_ENUM(_type, _name, _extensibility) _type _name; enum
2045
- # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
2046
- # endif
2047
- #endif
2048
- #if !defined(SWIFT_ENUM_TAG)
2049
- # if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || __has_feature(objc_fixed_enum)
2050
- # define SWIFT_ENUM_TAG enum
2051
- # else
2052
- # define SWIFT_ENUM_TAG
2053
- # endif
2054
- #endif
2055
- #if !defined(SWIFT_ENUM_FWD_DECL)
2056
- # if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || __has_feature(objc_fixed_enum)
2057
- # define SWIFT_ENUM_FWD_DECL(_type, _name) enum _name : _type;
2058
- # else
2059
- # define SWIFT_ENUM_FWD_DECL(_type, _name) typedef _type _name;
2060
- # endif
2061
- #endif
2062
- #if !defined(SWIFT_UNAVAILABLE)
2063
- # define SWIFT_UNAVAILABLE __attribute__((unavailable))
2064
- #endif
2065
- #if !defined(SWIFT_UNAVAILABLE_MSG)
2066
- # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
2067
- #endif
2068
- #if !defined(SWIFT_AVAILABILITY)
2069
- # define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
2070
- #endif
2071
- #if !defined(SWIFT_AVAILABILITY_DOMAIN)
2072
- # define SWIFT_AVAILABILITY_DOMAIN(dom, ...) __attribute__((availability(domain: dom, __VA_ARGS__)))
2073
- #endif
2074
- #if !defined(SWIFT_WEAK_IMPORT)
2075
- # define SWIFT_WEAK_IMPORT __attribute__((weak_import))
2076
- #endif
2077
- #if !defined(SWIFT_DEPRECATED)
2078
- # define SWIFT_DEPRECATED __attribute__((deprecated))
2079
- #endif
2080
- #if !defined(SWIFT_DEPRECATED_MSG)
2081
- # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
2082
- #endif
2083
- #if !defined(SWIFT_DEPRECATED_OBJC)
2084
- # if __has_feature(attribute_diagnose_if_objc)
2085
- # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
2086
- # else
2087
- # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
2088
- # endif
2089
- #endif
2090
- #if defined(__OBJC__)
2091
- #if !defined(IBSegueAction)
2092
- # define IBSegueAction
2093
- #endif
2094
- #endif
2095
- #if !defined(SWIFT_EXTERN)
2096
- # if defined(__cplusplus)
2097
- # define SWIFT_EXTERN extern "C"
2098
- # else
2099
- # define SWIFT_EXTERN extern
2100
- # endif
2101
- #endif
2102
- #if !defined(SWIFT_CALL)
2103
- # define SWIFT_CALL __attribute__((swiftcall))
2104
- #endif
2105
- #if !defined(SWIFT_INDIRECT_RESULT)
2106
- # define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
2107
- #endif
2108
- #if !defined(SWIFT_CONTEXT)
2109
- # define SWIFT_CONTEXT __attribute__((swift_context))
2110
- #endif
2111
- #if !defined(SWIFT_ERROR_RESULT)
2112
- # define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
2113
- #endif
2114
- #if defined(__cplusplus)
2115
- # define SWIFT_NOEXCEPT noexcept
2116
- #else
2117
- # define SWIFT_NOEXCEPT
2118
- #endif
2119
- #if !defined(SWIFT_C_INLINE_THUNK)
2120
- # if __has_attribute(always_inline)
2121
- # if __has_attribute(nodebug)
2122
- # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
2123
- # else
2124
- # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
2125
- # endif
2126
- # else
2127
- # define SWIFT_C_INLINE_THUNK inline
2128
- # endif
2129
- #endif
2130
- #if defined(_WIN32)
2131
- #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
2132
- # define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
2133
- #endif
2134
- #else
2135
- #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
2136
- # define SWIFT_IMPORT_STDLIB_SYMBOL
2137
- #endif
2138
- #endif
2139
- #if !__has_feature(nullability)
2140
- # define _Nonnull
2141
- # define _Nullable
2142
- # define _Null_unspecified
2143
- #elif !defined(__OBJC__)
2144
- # pragma clang diagnostic ignored "-Wnullability-extension"
2145
- #endif
2146
- #if !__has_feature(nullability_nullable_result)
2147
- # define _Nullable_result _Nullable
2148
- #endif
2149
- #if __has_feature(objc_modules)
2150
- #if __has_warning("-Watimport-in-framework-header")
2151
- #pragma clang diagnostic ignored "-Watimport-in-framework-header"
2152
- #endif
2153
- #endif
2154
-
2155
- #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
2156
- #pragma clang diagnostic ignored "-Wduplicate-method-arg"
2157
- #if __has_warning("-Wpragma-clang-attribute")
2158
- # pragma clang diagnostic ignored "-Wpragma-clang-attribute"
2159
- #endif
2160
- #pragma clang diagnostic ignored "-Wunknown-pragmas"
2161
- #pragma clang diagnostic ignored "-Wnullability"
2162
- #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
2163
- #pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
2164
-
2165
- #if __has_attribute(external_source_symbol)
2166
- # pragma push_macro("any")
2167
- # undef any
2168
- # pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="GSSDK",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
2169
- # pragma pop_macro("any")
2170
- #endif
2171
-
2172
- #if defined(__cplusplus)
2173
- extern "C" {
2174
- #endif
2175
-
2176
- #if defined(__cplusplus)
2177
- } // extern "C"
2178
- #endif
2179
- #if __has_attribute(external_source_symbol)
2180
- # pragma clang attribute pop
2181
- #endif
2182
- #if defined(__OBJC__)
2183
- #if __has_feature(objc_modules)
2184
- #if __has_warning("-Watimport-in-framework-header")
2185
- #pragma clang diagnostic ignored "-Watimport-in-framework-header"
2186
- #endif
2187
- @import CoreFoundation;
2188
- @import Dispatch;
2189
- @import Foundation;
2190
- @import ObjectiveC;
2191
- @import UIKit;
2192
- #endif
2193
-
2194
- #import <GSSDK/GSSDK.h>
2195
-
2196
- #endif // defined(__OBJC__)
2197
- #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
2198
- #pragma clang diagnostic ignored "-Wduplicate-method-arg"
2199
- #if __has_warning("-Wpragma-clang-attribute")
2200
- # pragma clang diagnostic ignored "-Wpragma-clang-attribute"
2201
- #endif
2202
- #pragma clang diagnostic ignored "-Wunknown-pragmas"
2203
- #pragma clang diagnostic ignored "-Wnullability"
2204
- #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
2205
- #pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
2206
-
2207
- #if __has_attribute(external_source_symbol)
2208
- # pragma push_macro("any")
2209
- # undef any
2210
- # pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="GSSDK",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
2211
- # pragma pop_macro("any")
2212
- #endif
2213
-
2214
- #if defined(__OBJC__)
2215
-
2216
- @class NSString;
2217
- /// Entry point of the SDK. Use this to initialize the SDK with your license key.
2218
- SWIFT_CLASS("_TtC5GSSDK3GSK")
2219
- @interface GSK : NSObject
2220
- /// Returns the Genius Scan SDK version
2221
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull sdkVersion;)
2222
- + (NSString * _Nonnull)sdkVersion SWIFT_WARN_UNUSED_RESULT;
2223
- /// Sets the Genius Scan SDK license key with auto-refresh enabled.
2224
- /// See <code>setLicenseKey:autoRefresh:</code>
2225
- + (void)setLicenseKey:(NSString * _Nonnull)licenseKey;
2226
- /// Sets the Genius Scan SDK license key, while optionally enabling auto-refresh.
2227
- /// This method doesn’t return an error but will log warnings should the key be invalid or expired. All other SDK methods that return errors will report
2228
- /// an error if there is a problem with the license key, and you must handle them to ensure you provide a good “degraded” experience.
2229
- /// For instance, you can prompt the user to update the application to use the scanning feature in case they use a version of the application with an expired license key.
2230
- /// important:
2231
- /// This method must be called with a valid license key before any use of the SDK methods.
2232
- /// \param licenseKey A valid license key. You must publish a new version of the app with an updated license key before the key expires.
2233
- ///
2234
- /// \param autoRefresh If true, the SDK will attempt to automatically refresh the license key to prevent any diruption of service on devices that wouldn’t have
2235
- /// updated to the latest version of your app containing the new keys. If <code>autoRefresh</code> is enabled, the following information is sent to the Genius Scan
2236
- /// SDK servers: the current license key, a device-unique UUID, and the current version of the app.
2237
- ///
2238
- + (void)setLicenseKey:(NSString * _Nonnull)licenseKey autoRefresh:(BOOL)autoRefresh;
2239
- /// Checks that the Genius Scan SDK was correctly initialized with a valid license key.
2240
- ///
2241
- /// throws:
2242
- /// An error if the license key is invalid or expired.
2243
- + (BOOL)checkInitializationAndReturnError:(NSError * _Nullable * _Nullable)error;
2244
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
2245
- @end
2246
-
2247
- /// A barcode such as 1D barcodes or QR codes.
2248
- SWIFT_CLASS("_TtC5GSSDK10GSKBarcode")
2249
- @interface GSKBarcode : NSObject
2250
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2251
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2252
- @end
2253
-
2254
- @interface GSKBarcode (SWIFT_EXTENSION(GSSDK))
2255
- - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
2256
- @end
2257
-
2258
- @interface GSKBarcode (SWIFT_EXTENSION(GSSDK))
2259
- @property (nonatomic, readonly) NSUInteger hash;
2260
- @end
2261
-
2262
- @class GSKBarcodeScanFlowConfiguration;
2263
- @class UIViewController;
2264
- @class GSKBarcodeScanFlowResult;
2265
- /// A UI flow for scanning barcodes and QR codes using the device camera.
2266
- /// Configure the flow with <code>GSKBarcodeScanFlowConfiguration</code> to select the
2267
- /// barcode types to detect and whether batch mode is enabled. Present it from
2268
- /// a view controller and await a <code>GSKBarcodeScanFlowResult</code> containing the
2269
- /// decoded barcodes.
2270
- /// important:
2271
- /// Camera access requires <code>NSCameraUsageDescription</code> in
2272
- /// <code>Info.plist</code>.
2273
- SWIFT_CLASS("_TtC5GSSDK18GSKBarcodeScanFlow")
2274
- @interface GSKBarcodeScanFlow : NSObject
2275
- /// Initializes a new barcode scan flow
2276
- /// \param configuration Configuration for the barcode scanning
2277
- ///
2278
- - (nonnull instancetype)initWithConfiguration:(GSKBarcodeScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
2279
- /// Starts the barcode scanning flow by presenting a full-screen camera interface.
2280
- /// This method presents a camera view controller that continuously scans for barcodes and QR codes.
2281
- /// The scanning process respects the code types specified in the flow’s configuration.
2282
- /// The method uses Swift’s async/await pattern, suspending until either:
2283
- /// <ul>
2284
- /// <li>
2285
- /// A barcode is successfully detected (except in batch mode)
2286
- /// </li>
2287
- /// <li>
2288
- /// The user taps the done button (batch mode)
2289
- /// </li>
2290
- /// <li>
2291
- /// The user cancels the operation
2292
- /// </li>
2293
- /// <li>
2294
- /// An error occurs during setup or scanning
2295
- /// </li>
2296
- /// </ul>
2297
- /// The behavior varies based on the configuration’s isBatchModeEnabled:
2298
- /// <ul>
2299
- /// <li>
2300
- /// <code>false</code>: Returns immediately after detecting one or more codes in a single frame
2301
- /// </li>
2302
- /// <li>
2303
- /// <code>true</code>: Collects unique codes over time until the user taps the done button
2304
- /// </li>
2305
- /// </ul>
2306
- /// Example usage:
2307
- /// \code
2308
- /// let flow = GSKBarcodeScanFlow()
2309
- /// do {
2310
- /// let result = try await flow.resultByStarting(fromViewController: self)
2311
- /// print("Scanned codes: \(result.barcodes.map { $0.value })")
2312
- /// } catch GSKScanFlowError.cancellation {
2313
- /// print("User canceled scanning")
2314
- /// } catch {
2315
- /// print("Scanning failed: \(error)")
2316
- /// }
2317
- ///
2318
- /// \endcodeimportant:
2319
- /// This method requires camera permissions. Ensure your app’s Info.plist includes
2320
- /// the <code>NSCameraUsageDescription</code> key with an appropriate description.
2321
- /// note:
2322
- /// The camera interface is presented with <code>modalPresentationStyle</code> set to <code>.fullScreen</code>
2323
- /// for an immersive scanning experience.
2324
- /// \param viewController The view controller from which to present the camera interface.
2325
- /// This should typically be the currently visible view controller.
2326
- ///
2327
- ///
2328
- /// throws:
2329
- ///
2330
- /// <ul>
2331
- /// <li>
2332
- /// A <code>GSKScanFlowError</code>
2333
- /// </li>
2334
- /// </ul>
2335
- ///
2336
- /// returns:
2337
- /// A <code>GSKBarcodeScanFlowResult</code> containing the detected barcodes with their
2338
- /// decoded values and format types.
2339
- - (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKBarcodeScanFlowResult * _Nullable, NSError * _Nullable))completionHandler;
2340
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2341
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2342
- @end
2343
-
2344
- @class NSError;
2345
- @interface GSKBarcodeScanFlow (SWIFT_EXTENSION(GSSDK))
2346
- /// Instantiates a <code>GSKBarcodeScanFlow</code> instance with the provided configuration.
2347
- /// This initializer is only available from Objective-C.
2348
- + (nonnull instancetype)barcodeScanFlowWithConfiguration:(GSKBarcodeScanFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
2349
- /// Starts the barcode scanning flow.
2350
- /// @param viewController The view controller to present the barcode scanning interface from.
2351
- /// @param successBlock A completion block/closure that will be called on the main
2352
- /// thread upon successful completion of the scan flow. It receives a <code>GSKBarcodeScanFlowResult</code> object as
2353
- /// a parameter. This object gives you access to the scanned codes.
2354
- /// @param failureBlock A block/closure called if an error was encountered.
2355
- /// This method is only available from Objective-C.
2356
- - (void)startFromViewController:(UIViewController * _Nonnull)viewController success:(void (^ _Nonnull)(GSKBarcodeScanFlowResult * _Nonnull))successBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))failureBlock;
2357
- @end
2358
-
2359
- @class UIColor;
2360
- /// Configuration for the UI barcode scanning flow
2361
- /// This class allows customization of which barcode and QR code formats should be detected
2362
- /// during the scanning process. By default, all supported formats are enabled.
2363
- SWIFT_CLASS("_TtC5GSSDK31GSKBarcodeScanFlowConfiguration")
2364
- @interface GSKBarcodeScanFlowConfiguration : NSObject
2365
- /// Whether batch mode is enabled for code detection.
2366
- /// This setting controls how codes are detected and when they are returned:
2367
- /// <ul>
2368
- /// <li>
2369
- /// <code>false</code>: Detect multiple codes simultaneously in a single frame and return immediately (default)
2370
- /// </li>
2371
- /// <li>
2372
- /// <code>true</code>: Collect multiple codes over time before returning when user taps Done
2373
- /// </li>
2374
- /// </ul>
2375
- /// Example:
2376
- /// \code
2377
- /// // Standard mode - return codes immediately (default)
2378
- /// let standardConfig = GSKBarcodeScanFlowConfiguration(isBatchModeEnabled: false)
2379
- ///
2380
- /// // Batch mode - collect codes over time
2381
- /// let batchConfig = GSKBarcodeScanFlowConfiguration(isBatchModeEnabled: true)
2382
- ///
2383
- /// \endcode
2384
- @property (nonatomic) BOOL isBatchModeEnabled;
2385
- /// The highlight color used for the UI (overlay). Defaults
2386
- /// to <code>.green</code>. For good contrast, we recommend using a bright color.
2387
- @property (nonatomic, strong) UIColor * _Nonnull highlightColor;
2388
- /// The menu color used for the UI. Defaults to <code>nil</code>, meaning that the system
2389
- /// default color will be used (blue on iOS, for example).
2390
- @property (nonatomic, strong) UIColor * _Nullable menuColor;
2391
- /// Creates a new barcode scan flow configuration with default values
2392
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
2393
- @end
2394
-
2395
- @class NSDictionary;
2396
- @interface GSKBarcodeScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
2397
- /// Create a configuration from a dictionary.
2398
- /// This is used for interfacing with cross-platform plugins but shouldn’t
2399
- /// be used in native projects.
2400
- + (GSKBarcodeScanFlowConfiguration * _Nullable)configurationWithDictionary:(NSDictionary * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
2401
- /// Create a configuration from JSON data.
2402
- /// This is used for interfacing with cross-platform plugins but shouldn’t
2403
- /// be used in native projects.
2404
- + (GSKBarcodeScanFlowConfiguration * _Nullable)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
2405
- @end
2406
-
2407
- /// The result of a barcode scanning flow.
2408
- /// This class encapsulates the successful outcome of a barcode or QR code scanning session,
2409
- /// containing the detected barcode or QR code data.
2410
- SWIFT_CLASS("_TtC5GSSDK24GSKBarcodeScanFlowResult")
2411
- @interface GSKBarcodeScanFlowResult : NSObject
2412
- /// The detected barcodes containing their decoded values and types.
2413
- /// This property provides access to an array of detected codes, each containing
2414
- /// both the string content and format type (e.g., QR code, Code 128, EAN-13, etc.).
2415
- /// <ul>
2416
- /// <li>
2417
- /// For standard mode: Contains all codes detected in a single frame
2418
- /// </li>
2419
- /// <li>
2420
- /// For batch mode: Contains all codes collected over the scanning session
2421
- /// </li>
2422
- /// </ul>
2423
- @property (nonatomic, readonly, copy) NSArray<GSKBarcode *> * _Nonnull barcodes;
2424
- /// Creates a new barcode scan flow result.
2425
- /// \param barcodes The detected barcodes.
2426
- ///
2427
- - (nonnull instancetype)initWithBarcodes:(NSArray<GSKBarcode *> * _Nonnull)barcodes OBJC_DESIGNATED_INITIALIZER;
2428
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2429
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2430
- @end
2431
-
2432
- @interface GSKBarcodeScanFlowResult (SWIFT_EXTENSION(GSSDK))
2433
- /// Returns a dictionary representation of the result
2434
- /// The dictionary contains:
2435
- /// <ul>
2436
- /// <li>
2437
- /// barcodes: An array of code dictionaries, each containing:
2438
- /// <ul>
2439
- /// <li>
2440
- /// value: The decoded string value
2441
- /// </li>
2442
- /// <li>
2443
- /// type: The code type as a string (e.g., “qr”, “code128”)
2444
- /// </li>
2445
- /// </ul>
2446
- /// </li>
2447
- /// </ul>
2448
- @property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nonnull dictionary;
2449
- /// Returns a JSON representation of the result.
2450
- /// See <code>dictionary</code> for an explanation of the JSON data’s structure.
2451
- - (NSString * _Nonnull)json SWIFT_WARN_UNUSED_RESULT;
2452
- @end
2453
-
2454
- /// Represents an error raised by the camera session
2455
- typedef SWIFT_ENUM(NSInteger, GSKCameraSessionError, open) {
2456
- GSKCameraSessionErrorOther = -1,
2457
- GSKCameraSessionErrorNotAuthorized = -2,
2458
- GSKCameraSessionErrorLockDevice = -3,
2459
- GSKCameraSessionErrorNoDevice = -4,
2460
- GSKCameraSessionErrorInvalidSetupDependency = -5,
2461
- GSKCameraSessionErrorNoVideoCaptureConnection = -6,
2462
- GSKCameraSessionErrorInvalidData = -7,
2463
- GSKCameraSessionErrorBadInput = -8,
2464
- GSKCameraSessionErrorWarnLockDevice = -1003,
2465
- };
2466
-
2467
- @class NSCoder;
2468
- @class NSBundle;
2469
- /// A camera view controller to scan documents or barcodes.
2470
- /// Inherit from this view controller to create a custom scanning experience. Lay out the <code>cameraView</code> as desired:
2471
- /// By default, <code>cameraView</code> fills the entire screen. You can disable its resizing mask
2472
- /// (<code>cameraView.translatesAutoresizingMaskIntoConstraints</code>) and use Auto Layout constraints.
2473
- /// note:
2474
- ///
2475
- /// When a photo of a document is taken, whether manually or automatically, the capture session is paused
2476
- /// and a delegate callback (<code>cameraViewController(_:didGenerateScan:)</code>) is called when the photo is ready.
2477
- /// In this callback, you can decide whether to exit the camera view controller (if you just need to scan a
2478
- /// single page), or keep scanning more images (to support a “batch scanning” flow). For the latter scenario,
2479
- /// you will need to resume the camera session (see <code>resume()</code>). You also need to “reveal” the shutter screen
2480
- /// (see <code>hideShutterView(animated:)</code>).
2481
- SWIFT_CLASS("_TtC5GSSDK23GSKCameraViewController")
2482
- @interface GSKCameraViewController : UIViewController
2483
- /// Requests camera access if needed.
2484
- /// This returns immediately when access is already determined. It only shows the system prompt
2485
- /// when access has not been requested yet.
2486
- ///
2487
- /// returns:
2488
- /// <code>true</code> when access is authorized.
2489
- + (void)requestCameraAccessWithCompletionHandler:(void (^ _Nonnull)(BOOL))completionHandler;
2490
- - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE;
2491
- - (void)viewDidLoad;
2492
- - (void)viewWillAppear:(BOOL)animated;
2493
- - (void)viewWillDisappear:(BOOL)animated;
2494
- /// Manually trigger a photo.
2495
- /// Use this to handle the user tapping on a “take photo” button, or your own
2496
- /// custom logic to take a photo.
2497
- - (void)takePhoto;
2498
- - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
2499
- @end
2500
-
2501
- @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
2502
- @end
2503
-
2504
- /// A document detection mode
2505
- /// When detecting a document, the camera controller can just highlight the document, or also
2506
- /// highlight and trigger the photo when the detection is stable enough.
2507
- typedef SWIFT_ENUM(NSInteger, DocumentDetectionMode, open) {
2508
- /// Visual highlighting only.
2509
- /// The camera will detect document edges and provide visual feedback by drawing
2510
- /// a document overlay, but will not automatically capture photos. Users must
2511
- /// manually trigger photo capture.
2512
- DocumentDetectionModeHighlightOnly = 0,
2513
- /// Highlighting with automatic capture.
2514
- /// Similar to <code>highlightOnly</code>, but the camera will automatically take a photo
2515
- /// when a stable document is detected for a sufficient duration. This provides
2516
- /// a hands-free scanning experience.
2517
- DocumentDetectionModeHighlightAndAutoCapture = 1,
2518
- };
2519
-
2520
- @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
2521
- @end
2522
-
2523
- /// Constants indicating an interruption reason for the camera session.
2524
- typedef SWIFT_ENUM(NSInteger, InterruptionReason, open) {
2525
- /// An interruption caused by the app being sent to the background while using a camera.
2526
- InterruptionReasonVideoDeviceNotAvailableInBackground = 0,
2527
- /// An interruption caused by the audio hardware temporarily being made unavailable, for instance,
2528
- /// for a phone call, or alarm.
2529
- InterruptionReasonAudioDeviceInUseByAnotherClient = 1,
2530
- /// An interruption caused by the video device temporarily being made unavailable, for instance,
2531
- /// when stolen away by another app.
2532
- InterruptionReasonVideoDeviceInUseByAnotherClient = 2,
2533
- /// An interruption caused when the app is running in a multi-app layout, causing resource contention
2534
- /// and degraded recording quality of service. Given your present session configuration, the
2535
- /// session may only be run if your app occupies the full screen.
2536
- InterruptionReasonVideoDeviceNotAvailableWithMultipleForegroundApps = 3,
2537
- /// An interruption caused by the video device temporarily being made unavailable due to system pressure,
2538
- /// such as thermal duress.
2539
- InterruptionReasonVideoDeviceNotAvailableDueToSystemPressure = 4,
2540
- InterruptionReasonUnknown = 5,
2541
- };
2542
-
2543
- @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
2544
- /// Factory method for a camera view controller with document detection.
2545
- /// This is only to be used from Objective-C. From Swift, prefer using <code>init(configuration:)</code> instead.
2546
- /// \param documentDetectionMode The document detection mode.
2547
- ///
2548
- /// \param documentOverlayColor The color of the document overlay.
2549
- ///
2550
- + (void)makeCameraViewControllerWithDocumentDetectionMode:(enum DocumentDetectionMode)documentDetectionMode documentOverlayColor:(UIColor * _Nonnull)documentOverlayColor completionHandler:(void (^ _Nonnull)(GSKCameraViewController * _Nullable, NSError * _Nullable))completionHandler;
2551
- @end
2552
-
2553
- @class GSKQuadrangle;
2554
- @class GSKScan;
2555
- SWIFT_PROTOCOL("_TtP5GSSDK31GSKCameraViewControllerDelegate_")
2556
- @protocol GSKCameraViewControllerDelegate
2557
- @optional
2558
- /// The camera view controller failed with an error.
2559
- /// \param cameraViewController The camera view controller
2560
- ///
2561
- /// \param error The encountered error.
2562
- ///
2563
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFailWithError:(NSError * _Nonnull)error;
2564
- /// The camera view controller encountered a non-fatal error.
2565
- /// \param cameraViewController The camera view controller
2566
- ///
2567
- /// \param error The encountered error.
2568
- ///
2569
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didEncounterNonCriticalError:(NSError * _Nonnull)error;
2570
- /// The camera view controller was interrupted.
2571
- /// This can happen in various cases, including when the user goes to Split View mode on iPad.
2572
- /// \param cameraViewController The camera view controller
2573
- ///
2574
- /// \param reason The reason why the camera view controller was interrupted.
2575
- ///
2576
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController wasInterruptedWithReason:(enum InterruptionReason)reason;
2577
- /// The camera view controller resumes after interruption
2578
- /// \param cameraViewController The camera view controller
2579
- ///
2580
- - (void)cameraViewControllerInterruptionDidEnd:(GSKCameraViewController * _Nonnull)cameraViewController;
2581
- /// The camera view controller is still looking for a quadrangle.
2582
- /// This is a general notification about the status of the search: we may or may not have identified
2583
- /// its edges. If you want to act on identified edges, listen to the <code>cameraViewController:didFindDocumentWithQuadrangle:</code>
2584
- /// delegate method.
2585
- /// <ul>
2586
- /// <li>
2587
- /// Parameters:
2588
- /// </li>
2589
- /// <li>
2590
- /// cameraViewController: The camera view controller
2591
- /// </li>
2592
- /// </ul>
2593
- - (void)cameraViewControllerIsSearchingForDocument:(GSKCameraViewController * _Nonnull)cameraViewController;
2594
- /// The camera view controller identified a document in the last frame of the photo stream
2595
- /// \param cameraViewController The camera view controller
2596
- ///
2597
- /// \param quadrangle The quadrangle of the document that has been found.
2598
- ///
2599
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFindDocumentWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
2600
- /// The camera view controller couldn’t identify a document in the last frame of the photo stream.
2601
- /// This doesn’t mean that the camera view controller has stopped searching for documents or failed.
2602
- /// It just means no document has been identified. In this case, you want to clear any overlay.
2603
- /// \param cameraViewController The camera view controller
2604
- ///
2605
- - (void)cameraViewControllerFailedToFindDocument:(GSKCameraViewController * _Nonnull)cameraViewController;
2606
- /// The camera view controller real-time document detection will soon capture a detected document, but if the document
2607
- /// detection is not stable enough, the process can still be
2608
- /// cancelled.
2609
- /// It’s a good time to tell the user to remain stable.
2610
- /// Only called when the document detection is set to .highlightAndAutoCapture.
2611
- /// \param cameraViewController The camera view controller
2612
- ///
2613
- - (void)cameraViewControllerPhotoStabilizationDidStart:(GSKCameraViewController * _Nonnull)cameraViewController;
2614
- /// The camera view controller is about to decide whether to automatically capture a detected document because the detection was stable enough.
2615
- /// This is an override point where you can return <code>false</code> to stop that automatic process from proceeding.
2616
- /// \param cameraViewController The camera view controller
2617
- ///
2618
- - (BOOL)cameraViewControllerShouldSnapPhoto:(GSKCameraViewController * _Nonnull)cameraViewController SWIFT_WARN_UNUSED_RESULT;
2619
- /// The camera view controller is going to capture a photo, whether the capture was triggered manually or automatically.
2620
- /// When the capture is automatic, this is called after <code>cameraViewController:willAutoCaptureDocumentWithQuadrangle:</code>.
2621
- /// \param cameraViewController The camera view controller
2622
- ///
2623
- - (void)cameraViewControllerWillCapturePhoto:(GSKCameraViewController * _Nonnull)cameraViewController;
2624
- /// The camera view controller is going to automatically capture a detected document because the detection was stable enough.
2625
- /// The automatic capture is about to start and cannot be interrupted at this stage.
2626
- /// <ul>
2627
- /// <li>
2628
- /// Deprecated: Use <code>cameraViewController(_:willAutoCaptureDocumentWithQuadrangle:)</code> for automatic document captures
2629
- /// or <code>cameraViewControllerWillCapturePhoto(_:)</code> for any capture.
2630
- /// </li>
2631
- /// </ul>
2632
- /// \param cameraViewController The camera view controller
2633
- ///
2634
- /// \param quadrangle The quadrangle of the document that will be captured.
2635
- ///
2636
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController willSnapPhotoWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
2637
- /// The camera view controller is going to automatically capture a detected document because the detection was stable enough.
2638
- /// The automatic capture is about to start and cannot be interrupted at this stage.
2639
- /// \param cameraViewController The camera view controller
2640
- ///
2641
- /// \param quadrangle The quadrangle of the document that will be captured.
2642
- ///
2643
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController willAutoCaptureDocumentWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
2644
- /// The camera view controller just took a photo, but it hasn’t been post-processed it yet
2645
- /// \param cameraViewController The camera view controller
2646
- ///
2647
- - (void)cameraViewControllerDidSnapPhoto:(GSKCameraViewController * _Nonnull)cameraViewController;
2648
- /// The camera view controller has finished processing the photo we just took.
2649
- /// \param cameraViewController The camera view controller
2650
- ///
2651
- /// \param scan The scan object that has been generated. The image contained in the scan object is the full,
2652
- /// unprocessed image in which the document was detected. Use <code>GSKScanProcessor</code> to process and
2653
- /// warp and enhance the scanned document.
2654
- ///
2655
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didGenerateScan:(GSKScan * _Nonnull)scan;
2656
- /// Camera view controller has detected barcodes.
2657
- /// \param cameraViewController The camera view controller
2658
- ///
2659
- /// \param barcodes The detected barcodes
2660
- ///
2661
- - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFindBarcodes:(NSArray<GSKBarcode *> * _Nonnull)barcodes;
2662
- @end
2663
-
2664
- /// The type of document detected by the document finder.
2665
- typedef SWIFT_ENUM(NSInteger, GSKDocumentFinderImageType, closed) {
2666
- /// No document present in the image
2667
- GSKDocumentFinderImageTypeNoDocument = 0,
2668
- /// A document is present in the image, but no crop or perspective correction has been applied.
2669
- GSKDocumentFinderImageTypeUnwarped = 1,
2670
- /// A document is present in the image, and crop and perspective correction have been applied.
2671
- GSKDocumentFinderImageTypeWarped = 2,
2672
- /// A document is present in the image, and crop/perspective correction and
2673
- /// enhancement have been applied.
2674
- GSKDocumentFinderImageTypeEnhanced = 3,
2675
- };
2676
-
2677
- @class GSKPDFDocument;
2678
- @protocol GSKDocumentImageProcessor;
2679
- @class GSKDocumentGeneratorConfiguration;
2680
- /// This class exposes the capability to generate a PDF or TIFF multi-page document file.
2681
- SWIFT_CLASS("_TtC5GSSDK20GSKDocumentGenerator")
2682
- @interface GSKDocumentGenerator : NSObject
2683
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
2684
- /// Generates a document file based on a document model and a generator configuration.
2685
- /// \param document The source document to generate as PDF or TIFF depending on the configuration.
2686
- ///
2687
- /// \param imageProcessor An object used to process each source document’s image before inserting it in the resulting document.
2688
- /// Only used when generating a PDF document
2689
- ///
2690
- /// \param configuration The configuration for the document generation.
2691
- ///
2692
- - (BOOL)generate:(GSKPDFDocument * _Nonnull)document imageProcessor:(id <GSKDocumentImageProcessor> _Nonnull)imageProcessor configuration:(GSKDocumentGeneratorConfiguration * _Nonnull)configuration error:(NSError * _Nullable * _Nullable)error;
2693
- /// Generates a document file based on a document model and a generator configuration.
2694
- /// \param document The source document to generate as PDF or TIFF depending on the configuration.
2695
- ///
2696
- /// \param configuration The configuration for the document generation.
2697
- ///
2698
- - (BOOL)generate:(GSKPDFDocument * _Nonnull)document configuration:(GSKDocumentGeneratorConfiguration * _Nonnull)configuration error:(NSError * _Nullable * _Nullable)error;
2699
- @end
2700
-
2701
- SWIFT_ENUM_FWD_DECL(NSInteger, GSKDocumentGeneratorFileFormat)
2702
- @class GSKDocumentGeneratorDebugConfiguration;
2703
- /// A configuration for the document generator.
2704
- SWIFT_CLASS("_TtC5GSSDK33GSKDocumentGeneratorConfiguration")
2705
- @interface GSKDocumentGeneratorConfiguration : NSObject
2706
- + (GSKDocumentGeneratorConfiguration * _Nonnull)pdfConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
2707
- + (GSKDocumentGeneratorConfiguration * _Nonnull)tiffConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
2708
- /// The output file format of the document generator. Must be .pdf or .tiff.
2709
- @property (nonatomic, readonly) enum GSKDocumentGeneratorFileFormat outputFileFormat;
2710
- /// The path where the generated document will be written. The extension will not be validated.
2711
- @property (nonatomic, readonly, copy) NSString * _Nonnull outputFilePath;
2712
- /// Custom font file used during the PDF generation to embed an invisible text layer.
2713
- /// If nil, a default font is used, which only supports Latin languages.
2714
- /// Only used when <code>outputFileFormat</code> is <code>.pdf</code>.
2715
- @property (nonatomic, readonly, copy) NSString * _Nullable pdfFontFilePath;
2716
- /// Generate a PDF/A document
2717
- @property (nonatomic, readonly) BOOL shouldGeneratePDFA;
2718
- /// An optional debug configuration to help debug PDF generation problems.
2719
- /// Don’t use this in production. Default is nil.
2720
- @property (nonatomic, readonly, strong) GSKDocumentGeneratorDebugConfiguration * _Nullable debugConfiguration;
2721
- - (nonnull instancetype)initWithOutputFileFormat:(enum GSKDocumentGeneratorFileFormat)outputFileFormat outputFilePath:(NSString * _Nonnull)outputFilePath pdfFontFilePath:(NSString * _Nullable)pdfFontFilePath shouldGeneratePDFA:(BOOL)shouldGeneratePDFA debugConfiguration:(GSKDocumentGeneratorDebugConfiguration * _Nullable)debugConfiguration OBJC_DESIGNATED_INITIALIZER;
2722
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2723
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2724
- @end
2725
-
2726
- @interface GSKDocumentGeneratorConfiguration (SWIFT_EXTENSION(GSSDK))
2727
- /// Initialize an instance of this type with a dictionary.
2728
- /// This is used for interfacing with cross-platform plugins but shouldn’t
2729
- /// be used in native projects.
2730
- - (nullable instancetype)initWithDictionary:(NSDictionary<NSString *, id> * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error;
2731
- /// Initialize an instance of this type with JSON data.
2732
- /// This is used for interfacing with cross-platform plugins but shouldn’t
2733
- /// be used in native projects.
2734
- - (nullable instancetype)initWithJson:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error;
2735
- @end
2736
-
2737
- SWIFT_CLASS("_TtC5GSSDK38GSKDocumentGeneratorDebugConfiguration")
2738
- @interface GSKDocumentGeneratorDebugConfiguration : NSObject
2739
- /// If true, OCR’ed text will be visible on the PDF.
2740
- /// Defaults to false. Use this for debug only
2741
- @property (nonatomic, readonly) BOOL isOCRTextShownOnPDF;
2742
- - (nonnull instancetype)initWithIsOCRTextShownOnPDF:(BOOL)isOCRTextShownOnPDF OBJC_DESIGNATED_INITIALIZER;
2743
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2744
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2745
- @end
2746
-
2747
- /// Error raised while generating a multi-page document
2748
- typedef SWIFT_ENUM(NSInteger, GSKDocumentGeneratorError, open) {
2749
- /// An internal error. Look at logs or contact us for more details.
2750
- GSKDocumentGeneratorErrorInternal SWIFT_COMPILE_NAME("internal") = 0,
2751
- /// A provided file wasn’t found.
2752
- GSKDocumentGeneratorErrorFileNotFound SWIFT_COMPILE_NAME("fileNotFound") = 1,
2753
- /// The provided password is invalid for use in a PDF file.
2754
- GSKDocumentGeneratorErrorInvalidPassword SWIFT_COMPILE_NAME("invalidPassword") = 2,
2755
- /// The provided page size is unsupported for a PDF file.
2756
- GSKDocumentGeneratorErrorInvalidPageSize SWIFT_COMPILE_NAME("invalidPageSize") = 3,
2757
- /// There was an error processing the image associated to a document page.
2758
- GSKDocumentGeneratorErrorProcessorError SWIFT_COMPILE_NAME("processorError") = 4,
2759
- /// An input to the document generator is invalid.
2760
- GSKDocumentGeneratorErrorInvalidInput SWIFT_COMPILE_NAME("invalidInput") = 5,
2761
- /// PDF/A documents cannot be password-protected.
2762
- GSKDocumentGeneratorErrorPDFAPasswordIncompatible SWIFT_COMPILE_NAME("pdfAPasswordIncompatible") = 6,
2763
- };
2764
- static NSString * _Nonnull const GSKDocumentGeneratorErrorDomain = @"GSSDK.GSKDocumentGeneratorError";
2765
-
2766
- typedef SWIFT_ENUM(NSInteger, GSKDocumentGeneratorFileFormat, open) {
2767
- GSKDocumentGeneratorFileFormatPDF SWIFT_COMPILE_NAME("pdf") = 0,
2768
- GSKDocumentGeneratorFileFormatTIFF SWIFT_COMPILE_NAME("tiff") = 1,
2769
- };
2770
-
2771
- /// Used to preprocess pages of the PDF generation.
2772
- /// When you generate a PDF document from images, you may want to apply some preprocessing to each image
2773
- /// before inserting them in the document (for instance resizing them, including a watermark, etc.) You can
2774
- /// implement your own PDF_image_processor and pass it when generating a PDF document.
2775
- /// to achieve this.
2776
- SWIFT_PROTOCOL("_TtP5GSSDK25GSKDocumentImageProcessor_")
2777
- @protocol GSKDocumentImageProcessor
2778
- /// Process the image and return a file path to the
2779
- /// updated image. The PDF processor will delete this temporary
2780
- /// image afterwards (only if it’s different from inputFilePath)
2781
- /// @return nil if there is an error
2782
- - (NSString * _Nullable)process:(NSString * _Nonnull)inputFilePath SWIFT_WARN_UNUSED_RESULT;
2783
- @end
2784
-
2785
- @class UIImage;
2786
- @class UIView;
2787
- /// A view controller that displays a scanned image with an interactive quadrangle overlay
2788
- /// for manual cropping and perspective adjustment.
2789
- /// <code>GSKEditFrameViewController</code> presents an image and allows the user to refine the detected
2790
- /// document boundaries by dragging the quadrangle’s corner and side handles. As the user edits the
2791
- /// quadrangle, changes are reflected in the <code>quadrangle</code> property, which is Key-Value
2792
- /// Observing (KVO) compliant.
2793
- /// The overlay’s appearance—including colors, handle size, transparency, and magnifier
2794
- /// behavior—can be customized through the exposed properties. This view controller is
2795
- /// typically used after automatic document detection, to let the user fine-tune the crop
2796
- /// before further processing (such as perspective correction or export).
2797
- SWIFT_CLASS("_TtC5GSSDK26GSKEditFrameViewController")
2798
- @interface GSKEditFrameViewController : UIViewController
2799
- /// The image on which the quadrangle is overlaid.
2800
- @property (nonatomic, strong) UIImage * _Nonnull image;
2801
- @property (nonatomic, readonly, strong) UIView * _Nonnull frameView;
2802
- /// Used to set the quadrangle to display in the view controller, and to retrieve the new quadrangle edited by the user.
2803
- @property (nonatomic, strong) GSKQuadrangle * _Nonnull quadrangle;
2804
- /// Insets applied around the image.
2805
- /// By default this matches half the quadrangle overlay handle width, so handles remain visible even when
2806
- /// the corners are on the edge of the image.
2807
- @property (nonatomic) CGFloat inset;
2808
- /// Customize the color of the shade within the quadrangle.
2809
- @property (nonatomic, strong) UIColor * _Nonnull shadeColor SWIFT_DEPRECATED_MSG("Deprecated in favor of frameView.imageSelection.insideShadeColor.");
2810
- /// Customize the color of the shade outside the quadrangle.
2811
- @property (nonatomic, strong) UIColor * _Nonnull outsideShadeColor;
2812
- /// Customize the color of the line used to draw the quadrangle.
2813
- @property (nonatomic, strong) UIColor * _Nonnull lineColor;
2814
- /// Customize the width of the frame handles.
2815
- @property (nonatomic) CGFloat handleWidth;
2816
- /// Customize the transparency of the entire overlay
2817
- @property (nonatomic) CGFloat overlayAlpha;
2818
- /// Customize the magnifier center style shown while dragging frame handles.
2819
- @property (nonatomic) GSKMagnifierViewCenterStyle magnifierViewCenterStyle;
2820
- /// \param image The image on which to draw the quadrangle. This is typically the original photo from the camera.
2821
- ///
2822
- /// \param quadrangle The initial quadrangle to display.
2823
- ///
2824
- - (nonnull instancetype)initWithImage:(UIImage * _Nonnull)image quadrangle:(GSKQuadrangle * _Nonnull)quadrangle OBJC_DESIGNATED_INITIALIZER;
2825
- - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE;
2826
- - (void)setQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle animated:(BOOL)animated;
2827
- - (void)viewDidLoad;
2828
- - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
2829
- @end
2830
-
2831
- /// A configuration to specify the background cleaning to apply with GSKScanProcessor.
2832
- SWIFT_CLASS("_TtC5GSSDK40GSKFilterBackgroundCleaningConfiguration")
2833
- @interface GSKFilterBackgroundCleaningConfiguration : NSObject
2834
- /// Determines if the edges of the document must be cleaned or not. Cleaning the edges might result in erasing
2835
- /// some information that’s close the edges but yields a much cleaner document.
2836
- @property (nonatomic, readonly) GSKEdgeCleaning edgeCleaning;
2837
- /// Determines if the document’s background is rather light (white) or dark (black).
2838
- @property (nonatomic, readonly) GSKBackgroundKind backgroundKind;
2839
- /// Determines if the document is composed mainly of text, or contains a mix of text and photos.
2840
- @property (nonatomic, readonly) GSKDocumentComposition documentComposition;
2841
- /// Determines the strength of the background cleaning. Value between 0 and 1.
2842
- @property (nonatomic, readonly) CGFloat strength;
2843
- /// \param edgeCleaning If enabled, the document edges will be cleaned up. This helps if the document is torn or folded in
2844
- /// the corners, of if the cropping wasn’t perfectly accurate.
2845
- ///
2846
- /// \param backgroundKind If set to dark, the document is considered as having a dark background, and will be processed
2847
- /// consequently.
2848
- ///
2849
- /// \param documentComposition If set to “Text and photo”, indicates that document is a composite of text and photos (such
2850
- /// as a magazine page). The filter will be less aggressive to preserve the photos.
2851
- ///
2852
- /// \param strength The strength of the filter, between 0 and 1.
2853
- ///
2854
- - (nonnull instancetype)initWithEdgeCleaning:(GSKEdgeCleaning)edgeCleaning backgroundKind:(GSKBackgroundKind)backgroundKind documentComposition:(GSKDocumentComposition)documentComposition strength:(CGFloat)strength OBJC_DESIGNATED_INITIALIZER;
2855
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2856
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2857
- @end
2858
-
2859
- @interface GSKFilterBackgroundCleaningConfiguration (SWIFT_EXTENSION(GSSDK))
2860
- @property (nonatomic, readonly, copy) NSString * _Nonnull description;
2861
- @end
2862
-
2863
- @interface GSKFilterBackgroundCleaningConfiguration (SWIFT_EXTENSION(GSSDK))
2864
- @property (nonatomic, readonly) NSUInteger hash;
2865
- - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
2866
- @end
2867
-
2868
- /// A configuration to determine the colors of the output of the GSKScanProcessor.
2869
- SWIFT_CLASS("_TtC5GSSDK27GSKFilterColorConfiguration")
2870
- @interface GSKFilterColorConfiguration : NSObject
2871
- /// A configuration that results in a monochrome document.
2872
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterColorConfiguration * _Nonnull monochrome;)
2873
- + (GSKFilterColorConfiguration * _Nonnull)monochrome SWIFT_WARN_UNUSED_RESULT;
2874
- /// A configuration that results in a grayscale document.
2875
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterColorConfiguration * _Nonnull grayscale;)
2876
- + (GSKFilterColorConfiguration * _Nonnull)grayscale SWIFT_WARN_UNUSED_RESULT;
2877
- /// A configuration that results in a color document.
2878
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterColorConfiguration * _Nonnull color;)
2879
- + (GSKFilterColorConfiguration * _Nonnull)color SWIFT_WARN_UNUSED_RESULT;
2880
- /// The palette of colors
2881
- @property (nonatomic, readonly) GSKFilterColorPalette palette;
2882
- - (nonnull instancetype)initWithPalette:(GSKFilterColorPalette)palette OBJC_DESIGNATED_INITIALIZER;
2883
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2884
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2885
- @end
2886
-
2887
- @interface GSKFilterColorConfiguration (SWIFT_EXTENSION(GSSDK))
2888
- @property (nonatomic, readonly, copy) NSString * _Nonnull description;
2889
- @end
2890
-
2891
- @interface GSKFilterColorConfiguration (SWIFT_EXTENSION(GSSDK))
2892
- @property (nonatomic, readonly) NSUInteger hash;
2893
- - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
2894
- @end
2895
-
2896
- @class GSKFilterLightingCorrectionConfiguration;
2897
- /// The configuration to use when applying a document enhancement filter.
2898
- SWIFT_CLASS("_TtC5GSSDK22GSKFilterConfiguration")
2899
- @interface GSKFilterConfiguration : NSObject
2900
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull noOp;)
2901
- + (GSKFilterConfiguration * _Nonnull)noOp SWIFT_WARN_UNUSED_RESULT;
2902
- /// A photo filter configuration (no background cleaning)
2903
- /// \param lightingCorrectionConfiguration an optional lighting correction configuration. If nil, no correction is applied.
2904
- ///
2905
- /// \param colorConfiguration an optional color configuration. If nil, the color configuration is used.
2906
- ///
2907
- + (GSKFilterConfiguration * _Nonnull)photoWithLightingCorrectionConfiguration:(GSKFilterLightingCorrectionConfiguration * _Nullable)lightingCorrectionConfiguration colorConfiguration:(GSKFilterColorConfiguration * _Nullable)colorConfiguration SWIFT_WARN_UNUSED_RESULT;
2908
- + (GSKFilterConfiguration * _Nonnull)configurationWithLightingCorrectionConfiguration:(GSKFilterLightingCorrectionConfiguration * _Nullable)lightingCorrectionConfiguration backgroundCleaningConfiguration:(GSKFilterBackgroundCleaningConfiguration * _Nullable)backgroundCleaningConfiguration colorConfiguration:(GSKFilterColorConfiguration * _Nullable)colorConfiguration SWIFT_WARN_UNUSED_RESULT;
2909
- /// The lighting configuration
2910
- /// Determines the parameters to tune the image levels, contrast.
2911
- @property (nonatomic, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nullable lightingCorrectionConfiguration;
2912
- /// The background cleaning configuration
2913
- /// Determines the cleaning up of the document’s background.
2914
- @property (nonatomic, readonly, strong) GSKFilterBackgroundCleaningConfiguration * _Nullable backgroundCleaningConfiguration;
2915
- /// The color configuration
2916
- /// Determines the filter’s output colors.
2917
- @property (nonatomic, readonly, strong) GSKFilterColorConfiguration * _Nullable colorConfiguration;
2918
- /// A filter configuration.
2919
- /// \param lightingCorrectionConfiguration an optional lighting correction configuration. If nil, no correction is applied.
2920
- ///
2921
- /// \param backgroundCleaningConfiguration an optional background cleaning configuration. If nil, no background
2922
- /// cleaning is applied.
2923
- ///
2924
- /// \param colorConfiguration an optional color configuration. If nil, the color configuration is used.
2925
- ///
2926
- - (nonnull instancetype)initWithLightingCorrectionConfiguration:(GSKFilterLightingCorrectionConfiguration * _Nullable)lightingCorrectionConfiguration backgroundCleaningConfiguration:(GSKFilterBackgroundCleaningConfiguration * _Nullable)backgroundCleaningConfiguration colorConfiguration:(GSKFilterColorConfiguration * _Nullable)colorConfiguration OBJC_DESIGNATED_INITIALIZER;
2927
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2928
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2929
- @end
2930
-
2931
- @interface GSKFilterConfiguration (SWIFT_EXTENSION(GSSDK))
2932
- @property (nonatomic, readonly) NSUInteger hash;
2933
- - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
2934
- @end
2935
-
2936
- @interface GSKFilterConfiguration (SWIFT_EXTENSION(GSSDK))
2937
- /// A soft document filter resulting in a grayscale document.
2938
- /// This filter is ideal for documents with light print such as carbon copy,
2939
- /// documents with pale text that you need to preserve, or documents where the
2940
- /// text has little contrast with the background.
2941
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull softGrayscale;)
2942
- + (GSKFilterConfiguration * _Nonnull)softGrayscale SWIFT_WARN_UNUSED_RESULT;
2943
- /// A soft document filter resulting in a color document.
2944
- /// This filter is ideal for documents that mix text and images and it also preserves
2945
- /// text with low contrast.
2946
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull softColor;)
2947
- + (GSKFilterConfiguration * _Nonnull)softColor SWIFT_WARN_UNUSED_RESULT;
2948
- /// A strong document filter resulting in a monochrome document.
2949
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull strongMonochrome;)
2950
- + (GSKFilterConfiguration * _Nonnull)strongMonochrome SWIFT_WARN_UNUSED_RESULT;
2951
- /// A strong document filter resulting in a grayscale document.
2952
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull strongGrayscale;)
2953
- + (GSKFilterConfiguration * _Nonnull)strongGrayscale SWIFT_WARN_UNUSED_RESULT;
2954
- /// A strong document filter resulting in a color document.
2955
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull strongColor;)
2956
- + (GSKFilterConfiguration * _Nonnull)strongColor SWIFT_WARN_UNUSED_RESULT;
2957
- /// A filter specially designed for photos.
2958
- /// Unlike document filters, this filter will not attempt any background cleaning but will
2959
- /// slightly improve the lighting of the image.
2960
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull photo;)
2961
- + (GSKFilterConfiguration * _Nonnull)photo SWIFT_WARN_UNUSED_RESULT;
2962
- /// A filter specially designed to treat documents with a dark background, in particular white text
2963
- /// over a black background.
2964
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull darkBackground;)
2965
- + (GSKFilterConfiguration * _Nonnull)darkBackground SWIFT_WARN_UNUSED_RESULT;
2966
- @end
2967
-
2968
- /// A configuration to adjust the lighting of a document with GSKScanProcessor.
2969
- SWIFT_CLASS("_TtC5GSSDK40GSKFilterLightingCorrectionConfiguration")
2970
- @interface GSKFilterLightingCorrectionConfiguration : NSObject
2971
- /// A configuration that doesn’t adjust the lighting of a document.
2972
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nonnull noOp;)
2973
- + (GSKFilterLightingCorrectionConfiguration * _Nonnull)noOp SWIFT_WARN_UNUSED_RESULT;
2974
- /// A configuration to adjust the lighting of document containing text.
2975
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nonnull textDocument;)
2976
- + (GSKFilterLightingCorrectionConfiguration * _Nonnull)textDocument SWIFT_WARN_UNUSED_RESULT;
2977
- /// A configuration to adjust the lighting of a document looking like a photo.
2978
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nonnull photos;)
2979
- + (GSKFilterLightingCorrectionConfiguration * _Nonnull)photos SWIFT_WARN_UNUSED_RESULT;
2980
- /// A configuration to preserve shadow detail in a document.
2981
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nonnull shadow;)
2982
- + (GSKFilterLightingCorrectionConfiguration * _Nonnull)shadow SWIFT_WARN_UNUSED_RESULT;
2983
- @property (nonatomic, readonly) CGFloat minThreshold;
2984
- @property (nonatomic, readonly) CGFloat maxThreshold;
2985
- - (nonnull instancetype)initWithMinThreshold:(CGFloat)minThreshold maxThreshold:(CGFloat)maxThreshold OBJC_DESIGNATED_INITIALIZER;
2986
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2987
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2988
- @end
2989
-
2990
- @interface GSKFilterLightingCorrectionConfiguration (SWIFT_EXTENSION(GSSDK))
2991
- @property (nonatomic, readonly, copy) NSString * _Nonnull description;
2992
- @end
2993
-
2994
- @interface GSKFilterLightingCorrectionConfiguration (SWIFT_EXTENSION(GSSDK))
2995
- @property (nonatomic, readonly) NSUInteger hash;
2996
- - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
2997
- @end
2998
-
2999
- typedef SWIFT_ENUM(NSInteger, GSKFlashStatus, open) {
3000
- GSKFlashStatusAuto = 0,
3001
- GSKFlashStatusOn = 1,
3002
- GSKFlashStatusOff = 2,
3003
- };
3004
-
3005
- SWIFT_ENUM_FWD_DECL(NSInteger, GSKIntegrationFramework)
3006
- SWIFT_CLASS_NAMED("GSKIntegrationContext")
3007
- @interface GSKIntegrationContext : NSObject
3008
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) enum GSKIntegrationFramework currentFramework;)
3009
- + (enum GSKIntegrationFramework)currentFramework SWIFT_WARN_UNUSED_RESULT;
3010
- + (void)markScanFlowIntegrationDetected;
3011
- + (void)markLowLevelComponentUsed;
3012
- + (void)setFramework:(enum GSKIntegrationFramework)framework;
3013
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3014
- @end
3015
-
3016
- typedef SWIFT_ENUM_NAMED(NSInteger, GSKIntegrationFramework, "GSKIntegrationFramework", open) {
3017
- GSKIntegrationFrameworkNative = 0,
3018
- GSKIntegrationFrameworkReactNative = 1,
3019
- GSKIntegrationFrameworkCordova = 2,
3020
- GSKIntegrationFrameworkFlutter = 3,
3021
- GSKIntegrationFrameworkDotnet = 4,
3022
- GSKIntegrationFrameworkCapacitor = 5,
3023
- };
3024
-
3025
- /// A document image processor that performs no operation and returns the input file as an output
3026
- SWIFT_CLASS("_TtC5GSSDK29GSKNoopDocumentImageProcessor")
3027
- @interface GSKNoopDocumentImageProcessor : NSObject <GSKDocumentImageProcessor>
3028
- - (NSString * _Nullable)process:(NSString * _Nonnull)inputFilePath SWIFT_WARN_UNUSED_RESULT;
3029
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3030
- @end
3031
-
3032
- @protocol GSKLogger;
3033
- @class GSKOCRConfiguration;
3034
- @class GSKOCRResult;
3035
- /// A type that performs Optical Character Recognition (OCR) on a scanned document.
3036
- SWIFT_CLASS("_TtC5GSSDK6GSKOCR")
3037
- @interface GSKOCR : NSObject
3038
- - (nonnull instancetype)initWithLogger:(id <GSKLogger> _Nonnull)logger OBJC_DESIGNATED_INITIALIZER;
3039
- - (nonnull instancetype)init;
3040
- /// Recognize the text in the provided image
3041
- /// \param imagePath The path of the image to recognize. Ideally, provide the original, cropped image, and not the enhanced image.
3042
- /// The OCR decides what post-processing to apply for the best results.
3043
- ///
3044
- /// \param configuration Configuration for the OCR process, in particular the language in which the OCR is
3045
- /// performed. Note that you must provide the appropriate trained data.
3046
- ///
3047
- /// \param progressBlock The progress between 0 and 1. Called on the same thread.
3048
- ///
3049
- ///
3050
- /// returns:
3051
- /// An OCR result.
3052
- - (void)recognizeTextForImageAtPath:(NSString * _Nonnull)imagePath configuration:(GSKOCRConfiguration * _Nonnull)configuration onProgress:(void (^ _Nullable)(float))progressBlock completionHandler:(void (^ _Nonnull)(GSKOCRResult * _Nullable, NSError * _Nullable))completionHandler;
3053
- @end
3054
-
3055
- /// The configuration for an OCR operation.
3056
- SWIFT_CLASS("_TtC5GSSDK19GSKOCRConfiguration")
3057
- @interface GSKOCRConfiguration : NSObject
3058
- /// Initialize an OCR configuration for the modern OCR engine.
3059
- /// \param languageTags The language codes to perform OCR with.
3060
- ///
3061
- + (GSKOCRConfiguration * _Nonnull)configurationWithLanguageTags:(NSArray<NSString *> * _Nonnull)languageTags SWIFT_WARN_UNUSED_RESULT;
3062
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3063
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3064
- @end
3065
-
3066
- @class GSKTextLayout;
3067
- /// The results of an OCR operation
3068
- SWIFT_CLASS("_TtC5GSSDK12GSKOCRResult")
3069
- @interface GSKOCRResult : NSObject
3070
- /// The recognized text, formatted.
3071
- @property (nonatomic, readonly, copy) NSString * _Nonnull text;
3072
- /// The recognized text, as a structured text layout.
3073
- @property (nonatomic, readonly, strong) GSKTextLayout * _Nonnull textLayout;
3074
- - (nonnull instancetype)initWithText:(NSString * _Nonnull)text textLayout:(GSKTextLayout * _Nonnull)textLayout;
3075
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3076
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3077
- @end
3078
-
3079
- @class NSDate;
3080
- @class GSKPDFPage;
3081
- /// Describes the structure of a PDF document for the PDF generator.
3082
- SWIFT_CLASS("_TtC5GSSDK14GSKPDFDocument")
3083
- @interface GSKPDFDocument : NSObject
3084
- /// If provided, this title will be included in the PDF document properties
3085
- @property (nonatomic, readonly, copy) NSString * _Nullable title;
3086
- /// If provided, this password will be used to protect the PDF document.
3087
- /// It will need to be entered to view or edit the document.
3088
- /// AES-256 encryption is used.
3089
- /// An empty password is treated as no password.
3090
- @property (nonatomic, readonly, copy) NSString * _Nullable password;
3091
- /// If provided, the keywords will be included in the PDF document properties
3092
- @property (nonatomic, readonly, copy) NSString * _Nullable keywords;
3093
- /// If provided, this date will be included in the PDF document properties
3094
- @property (nonatomic, readonly, copy) NSDate * _Nullable creationDate;
3095
- /// If provided, this date will be included in the PDF document properties
3096
- @property (nonatomic, readonly, copy) NSDate * _Nullable lastUpdateDate;
3097
- /// List of pages that will be included in the PDF document
3098
- @property (nonatomic, readonly, copy) NSArray<GSKPDFPage *> * _Nonnull pages;
3099
- - (nonnull instancetype)initWithTitle:(NSString * _Nullable)title password:(NSString * _Nullable)password keywords:(NSString * _Nullable)keywords creationDate:(NSDate * _Nullable)creationDate lastUpdate:(NSDate * _Nullable)lastUpdate pages:(NSArray<GSKPDFPage *> * _Nonnull)pages OBJC_DESIGNATED_INITIALIZER;
3100
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3101
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3102
- @end
3103
-
3104
- @interface GSKPDFDocument (SWIFT_EXTENSION(GSSDK))
3105
- /// Initialize an instance of this type with a dictionary.
3106
- /// This is used for interfacing with cross-platform plugins but shouldn’t
3107
- /// be used in native projects.
3108
- - (nullable instancetype)initWithDictionary:(NSDictionary<NSString *, id> * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error;
3109
- /// Initialize an instance of this type with JSON data.
3110
- /// This is used for interfacing with cross-platform plugins but shouldn’t
3111
- /// be used in native projects.
3112
- - (nullable instancetype)initWithJson:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error;
3113
- @end
3114
-
3115
- @class GSKPDFSize;
3116
- /// Describes a page of a PDF document for the PDF generator.
3117
- SWIFT_CLASS("_TtC5GSSDK10GSKPDFPage")
3118
- @interface GSKPDFPage : NSObject
3119
- @property (nonatomic, readonly, copy) NSString * _Nonnull filePath;
3120
- @property (nonatomic, readonly, strong) GSKPDFSize * _Nonnull inchesSize;
3121
- @property (nonatomic, readonly, strong) GSKTextLayout * _Nullable textLayout;
3122
- - (nonnull instancetype)initWithFilePath:(NSString * _Nonnull)filePath inchesSize:(GSKPDFSize * _Nonnull)inchesSize textLayout:(GSKTextLayout * _Nullable)textLayout OBJC_DESIGNATED_INITIALIZER;
3123
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3124
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3125
- @end
3126
-
3127
- /// Physical size of a PDF page in inches.
3128
- /// If the aspect ratio doesn’t match the aspect ratio of the page in pixels,
3129
- /// margins will be added on both sides of the page image.
3130
- /// If 0 is provided for the width or height, it is computed to match the aspect ratio
3131
- /// of the image. Eg, for a receipt, we usually use width = 3.54f and height = 0.
3132
- SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
3133
- @interface GSKPDFSize : NSObject
3134
- @property (nonatomic, readonly) double width;
3135
- @property (nonatomic, readonly) double height;
3136
- - (nonnull instancetype)initWithWidth:(double)width height:(double)height OBJC_DESIGNATED_INITIALIZER;
3137
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3138
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3139
- @end
3140
-
3141
- typedef SWIFT_ENUM(NSInteger, GSKReceiptCategory, open) {
3142
- GSKReceiptCategoryGas = 0,
3143
- GSKReceiptCategoryTransportation = 1,
3144
- GSKReceiptCategoryAccomodation = 2,
3145
- GSKReceiptCategoryRestaurant = 3,
3146
- GSKReceiptCategorySupermarket = 4,
3147
- GSKReceiptCategoryOther = 5,
3148
- };
3149
-
3150
- /// A VAT rate and its associated amount detected on a receipt.
3151
- SWIFT_CLASS("_TtC5GSSDK13GSKReceiptVAT")
3152
- @interface GSKReceiptVAT : NSObject
3153
- - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
3154
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3155
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3156
- @end
3157
-
3158
- @class GSKScanFlowConfiguration;
3159
- /// A UI-driven scan flow for turning physical documents into processed digital pages.
3160
- /// Create an instance with <code>GSKScanFlowConfiguration</code> to choose the source
3161
- /// (camera, photo library, or image URL), multi-page behavior, output format,
3162
- /// filters, OCR, and structured-data extraction. Present the flow from a view
3163
- /// controller and await a <code>GSKScanFlowResult</code> with the captured pages and the
3164
- /// optional multi-page document.
3165
- /// important:
3166
- /// If you start a scan flow with the camera, your app must declare the
3167
- /// <code>NSCameraUsageDescription</code> key in <code>Info.plist</code>.
3168
- SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
3169
- @interface GSKScanFlow : NSObject
3170
- - (nonnull instancetype)initWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
3171
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3172
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3173
- @end
3174
-
3175
- @class GSKScanFlowResult;
3176
- @interface GSKScanFlow (SWIFT_EXTENSION(GSSDK))
3177
- /// Instantiates a <code>GSKScanFlow</code> instance with the provided configuration.
3178
- /// This initializer is only available from Objective-C.
3179
- + (nonnull instancetype)scanFlowWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
3180
- /// Present the scan flow.
3181
- /// @param viewController The view controller to present the scan flow from.
3182
- /// @param completionBlock A completion block/closure that will be called on the main
3183
- /// thread upon completion of the scan flow. It receives a <code>GSKScanFlowResult</code> object as
3184
- /// a parameter. This object gives you access to the scanned documents.
3185
- /// @param errorBlock A block/closure called if an error was encountered.
3186
- - (void)startFromViewController:(UIViewController * _Nonnull)viewController onSuccess:(void (^ _Nonnull)(GSKScanFlowResult * _Nonnull))completionBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))errorBlock;
3187
- @end
3188
-
3189
- SWIFT_ENUM_FWD_DECL(NSUInteger, GSKScanFlowSource)
3190
- @class NSURL;
3191
- SWIFT_ENUM_FWD_DECL(NSInteger, GSKScanOrientation)
3192
- SWIFT_ENUM_FWD_DECL(NSInteger, GSKScanFlowFilterType)
3193
- SWIFT_ENUM_FWD_DECL(NSUInteger, GSKScanFlowPDFPageSize)
3194
- SWIFT_ENUM_FWD_DECL(NSUInteger, GSKScanFlowFlashMode)
3195
- SWIFT_ENUM_FWD_DECL(NSUInteger, GSKScanFlowMultiPageFormat)
3196
- @class GSKScanFlowOCRConfiguration;
3197
- /// Enables configuration of a <code>GSKScanFlow</code> instance.
3198
- /// Pass an instance of this class to the initializer of <code>GSKScanFlow</code>
3199
- /// to build the desired scan flow.
3200
- SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
3201
- @interface GSKScanFlowConfiguration : NSObject
3202
- /// Specifies the source for the scanned documents (eg. the camera, …).
3203
- /// If source is <code>.imageURL</code>, then you must assign a <code>sourceImageURL</code>.
3204
- @property (nonatomic) enum GSKScanFlowSource source;
3205
- /// The image URL if the <code>source</code> is <code>.imageURL</code>.
3206
- @property (nonatomic, copy) NSURL * _Nullable sourceImageURL;
3207
- /// Whether multi page mode should be used. Only applies when the source
3208
- /// is <code>.camera</code>. When multipage mode is active, the user will have the
3209
- /// opportunity to snap multiple scans in a row and the output document
3210
- /// will contain all those pages. When multipage mode is off, the user
3211
- /// will only scan a single page. The output document will always contain
3212
- /// a single page. Defaults to <code>true</code>.
3213
- @property (nonatomic) BOOL multiPage;
3214
- /// Whether the user should be presented with a screen that lets them review all
3215
- /// captured scans at the end of the scan flow, where they’ll be able to edit each
3216
- /// scan once more before finally submitting the captured scans for processing.
3217
- /// Defaults to <code>false</code>.
3218
- @property (nonatomic) BOOL showFinalReview;
3219
- /// What orientation that a scan should be rotated to after it’s been captured.
3220
- /// Defaults to <code>automatic</code>. See <code>GSKScanOrientation</code> for more information.
3221
- @property (nonatomic) enum GSKScanOrientation defaultScanOrientation;
3222
- /// Any specific kind of post-processing to use. Defaults to <code>.automatic</code>.
3223
- @property (nonatomic) enum GSKScanFlowFilterType defaultFilter;
3224
- /// The minimum readability level that scanned documents are required to have. If a scan has a lower
3225
- /// readability level, then a warning will be shown as part of the scanning flow, and the user will be
3226
- /// prompted to retry the scan in question.
3227
- @property (nonatomic) GSKReadabilityLevel requiredReadabilityLevel;
3228
- /// Whether to skip showing the post-processing screen. We only recommend
3229
- /// enabling this option when scanning structured data. Generally, you want
3230
- /// the user to visually confirm the quality of each scan.
3231
- @property (nonatomic) BOOL skipPostProcessingScreen;
3232
- /// Select which actions to display within the post-processing screen.
3233
- /// Defaults to all actions.
3234
- @property (nonatomic) GSKScanFlowPostProcessingActions postProcessingActions;
3235
- /// Determines the size of the pages when generating PDFs. Defaults to <code>fit</code>.
3236
- @property (nonatomic) enum GSKScanFlowPDFPageSize pdfPageSize;
3237
- /// Whether the flash button should be hidden. Defaults to <code>false</code>.
3238
- @property (nonatomic) BOOL flashButtonHidden;
3239
- /// Whether the photo library button should be hidden during camera-based scan flows. Defaults to <code>false</code>.
3240
- @property (nonatomic) BOOL photoLibraryButtonHidden;
3241
- /// Determines the default flash mode. Combine this with <code>flashButtonHidden</code>
3242
- /// if you want to only allow a specific flash mode. Defaults to <code>.off</code>.
3243
- @property (nonatomic) enum GSKScanFlowFlashMode defaultFlashMode;
3244
- /// Determines the document format. Defaults to <code>.PDF</code>.
3245
- @property (nonatomic) enum GSKScanFlowMultiPageFormat multiPageFormat;
3246
- /// Optional password used to protect generated PDF documents.
3247
- /// An empty password is treated as no password.
3248
- /// This only applies when <code>multiPageFormat</code> is <code>.pdf</code>.
3249
- @property (nonatomic, copy) NSString * _Nullable pdfPassword;
3250
- /// Custom font file used during PDF generation to embed an invisible text
3251
- /// layer. If <code>nil</code>, a default font is used, which only supports Latin languages.
3252
- @property (nonatomic, copy) NSURL * _Nullable pdfFontFileURL;
3253
- /// The background color used for the UI. Defaults to <code>.black</code>.
3254
- @property (nonatomic, strong) UIColor * _Nonnull backgroundColor;
3255
- /// The foreground color used for the UI (text and icons). Defaults to <code>.white</code>.
3256
- @property (nonatomic, strong) UIColor * _Nonnull foregroundColor;
3257
- /// The highlight color used for the UI (document detection overlay). Defaults
3258
- /// to <code>.blue</code>.
3259
- @property (nonatomic, strong) UIColor * _Nonnull highlightColor;
3260
- /// The menu color used for the UI. Defaults to <code>nil</code>, meaning that the system
3261
- /// default color will be used (blue on iOS, for example).
3262
- @property (nonatomic, strong) UIColor * _Nullable menuColor;
3263
- /// JPEG quality used to compress captured images. Between 0 and 100, with 100
3264
- /// being the best quality. Defaults to <code>60</code>.
3265
- @property (nonatomic) NSInteger jpegQuality;
3266
- /// Max scan dimension in pixels when generating PDF files. All scans included
3267
- /// in PDF files will be scaled so that both their height and width are smaller
3268
- /// than this value, while maintaining their aspect ratio. Defaults to <code>0</code>, which
3269
- /// means no scaling is applied.
3270
- @property (nonatomic) NSInteger pdfMaxScanDimension;
3271
- /// The configuration for Optical Character Recognition. Default is <code>nil</code>, which
3272
- /// means no OCR is performed.
3273
- @property (nonatomic, strong) GSKScanFlowOCRConfiguration * _Nullable ocrConfiguration;
3274
- /// The types of structured data you want to extract from the document. This is
3275
- /// an option set so you can combine multiple values.
3276
- @property (nonatomic) GSKScanFlowStructuredData structuredData;
3277
- /// The URL of the directory to which the scan flow should write its output files (such as
3278
- /// scan images). Defaults to the application’s temporary directory. Must contain a valid
3279
- /// file URL that can either point to an existing or non-existing directory, but which must
3280
- /// not point to a file. Note: If setting this to a security-scoped URL, then you are responsible
3281
- /// for making balanced calls to the system’s <code>startAccessingSecurityScopedResource</code>
3282
- /// and <code>stopAccessingSecurityScopedResource</code> APIs before and after running a scan
3283
- /// flow session.
3284
- @property (nonatomic, copy) NSURL * _Nonnull outputDirectoryURL;
3285
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3286
- @end
3287
-
3288
- @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
3289
- - (BOOL)validate:(NSError * _Nullable * _Nullable)error;
3290
- @end
3291
-
3292
- @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
3293
- /// Create a configuration from a dictionary.
3294
- /// This is used for interfacing with cross-platform plugins but shouldn’t
3295
- /// be used in native projects.
3296
- + (nullable instancetype)configurationWithDictionary:(NSDictionary * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
3297
- /// Create a configuration from JSON data.
3298
- /// This is used for interfacing with cross-platform plugins but shouldn’t
3299
- /// be used in native projects.
3300
- + (nullable instancetype)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
3301
- @end
3302
-
3303
- /// Enum that defines various numeric error codes that can occur during a scan flow.
3304
- /// Cross-platform plugins expose the matching string code as the <code>code</code> field in their structured error payloads.
3305
- /// | String code | Description | Suggested handling |
3306
- /// | — | — | — |
3307
- /// | <code>cancellation_error</code> | The user canceled the document or barcode scan flow. | Treat as a normal exit; do not show an error. |
3308
- /// | <code>configuration_error</code> | The configuration or input parameters are invalid. | Fix the configuration before retrying. |
3309
- /// | <code>licensing_error</code> | The license key is invalid, expired, or not initialized. | Verify the license key and contact support if needed. |
3310
- /// | <code>capture_error</code> | The camera or capture session failed. | Let the user retry; restart the device if the problem persists. |
3311
- /// | <code>storage_space_error</code> | There is not enough storage space to write generated files. | Ask the user to free up storage space and retry. |
3312
- /// | <code>internal_error</code> | An unexpected SDK error occurred. | Show a generic error and collect the underlying error for diagnostics. |
3313
- typedef SWIFT_ENUM(NSInteger, GSKScanFlowErrorCode, open) {
3314
- /// User has canceled the scan flow
3315
- GSKScanFlowCancellationErrorCode SWIFT_COMPILE_NAME("cancellation") = 999,
3316
- /// A general error due to an incorrect configuration. Verify that your
3317
- /// inputs match the API requirements.
3318
- GSKScanFlowConfigurationErrorCode SWIFT_COMPILE_NAME("configuration") = 1000,
3319
- /// A licensing error. This is a developer error and you should contact the
3320
- /// Genius Scan SDK support team to make sure you have a valid license key.
3321
- GSKScanFlowLicensingErrorCode SWIFT_COMPILE_NAME("licensing") = 1001,
3322
- /// An error that happened while capturing the scans. This can sometimes be recovered
3323
- /// by restarting the device.
3324
- GSKScanFlowCaptureErrorCode SWIFT_COMPILE_NAME("capture") = 1002,
3325
- /// An error caused by low storage space. This can be recovered by cleaning up
3326
- /// storage space and trying again.
3327
- GSKScanFlowStorageSpaceErrorCode SWIFT_COMPILE_NAME("storageSpace") = 1003,
3328
- /// An internal error. This is a catch-all category, and the underlying error will
3329
- /// give more details.
3330
- GSKScanFlowInternalErrorCode SWIFT_COMPILE_NAME("internal") = 9999,
3331
- };
3332
-
3333
- SWIFT_CLASS("_TtC5GSSDK26GSKScanFlowErrorCodeBridge")
3334
- @interface GSKScanFlowErrorCodeBridge : NSObject
3335
- + (NSString * _Nonnull)stringCodeForRawValue:(NSInteger)rawValue SWIFT_WARN_UNUSED_RESULT;
3336
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3337
- @end
3338
-
3339
- /// The different possible filters for the scanner UI.
3340
- /// Each case maps to a predefined filter configuration except <code>.automatic</code>.
3341
- typedef SWIFT_ENUM(NSInteger, GSKScanFlowFilterType, open) {
3342
- GSKScanFlowFilterNone SWIFT_COMPILE_NAME("none") = 0,
3343
- /// Automatic filter
3344
- GSKScanFlowFilterAutomatic SWIFT_COMPILE_NAME("automatic") = 1,
3345
- /// Automatic filter with a monochrome output
3346
- GSKScanFlowFilterAutomaticDocumentMonochrome SWIFT_COMPILE_NAME("automaticDocumentMonochrome") = 2,
3347
- /// Automatic filter with a grayscale output
3348
- GSKScanFlowFilterAutomaticDocumentGrayscale SWIFT_COMPILE_NAME("automaticDocumentGrayscale") = 3,
3349
- /// Automatic filter with a color output
3350
- GSKScanFlowFilterAutomaticDocumentColor SWIFT_COMPILE_NAME("automaticDocumentColor") = 4,
3351
- /// A soft gray scale filter, ideal for documents containing both text and photos, or for text documents with
3352
- /// a low-contrast between the text and the background.
3353
- GSKScanFlowFilterSoftGrayscale SWIFT_COMPILE_NAME("softGrayscale") = 5,
3354
- /// A soft color filter, ideal for documents containing both text and photos
3355
- GSKScanFlowFilterSoftColor SWIFT_COMPILE_NAME("softColor") = 6,
3356
- /// A strong monochrome filter, ideal for text documents
3357
- GSKScanFlowFilterStrongMonochrome SWIFT_COMPILE_NAME("strongMonochrome") = 7,
3358
- /// A strong grayscale filter, ideal for text documents
3359
- GSKScanFlowFilterStrongGrayscale SWIFT_COMPILE_NAME("strongGrayscale") = 8,
3360
- /// A strong color filter, ideal for text documents with some color
3361
- GSKScanFlowFilterStrongColor SWIFT_COMPILE_NAME("strongColor") = 9,
3362
- /// A filter that ensures best results for documents with a dark background
3363
- GSKScanFlowFilterDarkBackground SWIFT_COMPILE_NAME("darkBackground") = 10,
3364
- /// A filter designed to improve scans of photos.
3365
- GSKScanFlowFilterPhoto SWIFT_COMPILE_NAME("photo") = 11,
3366
- };
3367
-
3368
- /// The capture screen flash mode.
3369
- typedef SWIFT_ENUM(NSUInteger, GSKScanFlowFlashMode, open) {
3370
- /// Let the system determine whether to turn on the flash based on the lighting conditions.
3371
- GSKScanFlowFlashModeAuto = 0,
3372
- /// Force the flash on.
3373
- GSKScanFlowFlashModeOn = 1,
3374
- /// Force the flash off.
3375
- GSKScanFlowFlashModeOff = 2,
3376
- };
3377
-
3378
- /// The format of the exported document.
3379
- typedef SWIFT_ENUM(NSUInteger, GSKScanFlowMultiPageFormat, open) {
3380
- GSKScanFlowNone SWIFT_COMPILE_NAME("none") = 0,
3381
- GSKScanFlowPDF SWIFT_COMPILE_NAME("pdf") = 1,
3382
- GSKScanFlowTIFF SWIFT_COMPILE_NAME("tiff") = 2,
3383
- };
3384
-
3385
- /// The configuration for text recognition
3386
- SWIFT_CLASS("_TtC5GSSDK27GSKScanFlowOCRConfiguration")
3387
- @interface GSKScanFlowOCRConfiguration : NSObject
3388
- /// The BCP47 language tags to process OCR with.
3389
- @property (nonatomic, copy) NSArray<NSString *> * _Nonnull languageTags;
3390
- /// The formats in which the OCR result is made available in
3391
- /// the ScanFlow result. Defaults to all formats.
3392
- @property (nonatomic) GSKScanFlowOCROutputFormats outputFormats;
3393
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3394
- @end
3395
-
3396
- /// The result of the text recognition.
3397
- SWIFT_CLASS("_TtC5GSSDK20GSKScanFlowOCRResult")
3398
- @interface GSKScanFlowOCRResult : NSObject
3399
- /// The raw text recognized in the document.
3400
- @property (nonatomic, copy) NSString * _Nullable text;
3401
- /// The text layout of the recognized text.
3402
- @property (nonatomic, copy) NSString * _Nullable hocrTextLayout;
3403
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3404
- @end
3405
-
3406
- /// The generated PDF paper size.
3407
- typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
3408
- /// PDF page with a width of 8.27 inch (A4 width) and fitting height.
3409
- GSKScanFlowPDFPageFit SWIFT_COMPILE_NAME("fit") = 0,
3410
- /// ISO A4 (21cm x 29.7cm).
3411
- GSKScanFlowPDFPageA4 SWIFT_COMPILE_NAME("A4") = 1,
3412
- /// US Letter (8.5in x 11in).
3413
- GSKScanFlowPDFPageLetter SWIFT_COMPILE_NAME("letter") = 2,
3414
- };
3415
-
3416
- @class GSKScanFlowScan;
3417
- /// The result of a scan flow.
3418
- SWIFT_CLASS("_TtC5GSSDK17GSKScanFlowResult")
3419
- @interface GSKScanFlowResult : NSObject
3420
- /// Document containing the pages that were scanned during the scan
3421
- /// flow. The format is specified by the <code>multiPageFormat</code> property of
3422
- /// the <code>GSKScanFlowConfiguration</code> used for the scan flow. This is <code>nil</code>
3423
- /// when <code>multiPageFormat</code> is <code>.none</code> or if document generation failed.
3424
- @property (nonatomic, copy) NSURL * _Nullable multiPageDocumentURL;
3425
- /// The individual scans taken during the scan flow.
3426
- /// Each scan object contains both the original and the enhanced scans.
3427
- @property (nonatomic, copy) NSArray<GSKScanFlowScan *> * _Nonnull scans;
3428
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3429
- @end
3430
-
3431
- @interface GSKScanFlowResult (SWIFT_EXTENSION(GSSDK))
3432
- /// A dictionary representation of the result.
3433
- /// This is used for interfacing with cross-platform plugins but shouldn’t
3434
- /// be used in native projects.
3435
- @property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nonnull dictionary;
3436
- /// Return a JSON representation of the result.
3437
- /// This is used for interfacing with cross-platform plugins but shouldn’t
3438
- /// be used in native projects.
3439
- - (NSString * _Nonnull)json SWIFT_WARN_UNUSED_RESULT;
3440
- @end
3441
-
3442
- @class GSKScanFlowStructuredDataResult;
3443
- /// A page captured by the scan flow.
3444
- SWIFT_CLASS("_TtC5GSSDK15GSKScanFlowScan")
3445
- @interface GSKScanFlowScan : NSObject
3446
- /// The original JPEG out of the camera.
3447
- /// Note that this image might be rotated, and needs to be read
3448
- /// with its EXIF orientation to be properly displayed. <code>UIImage</code>
3449
- /// methods will properly take care of that.
3450
- @property (nonatomic, copy) NSString * _Nonnull originalFilePath;
3451
- /// The enhanced, processed, image.
3452
- @property (nonatomic, copy) NSString * _Nonnull enhancedFilePath;
3453
- /// If OCR was performed, the recognized text.
3454
- @property (nonatomic, strong) GSKScanFlowOCRResult * _Nullable ocrResult;
3455
- /// If structured data extraction was performed, the structured data.
3456
- @property (nonatomic, strong) GSKScanFlowStructuredDataResult * _Nullable structuredData;
3457
- - (nonnull instancetype)initWithOriginalFilePath:(NSString * _Nonnull)originalFilePath enhancedFilePath:(NSString * _Nonnull)enhancedFilePath OBJC_DESIGNATED_INITIALIZER;
3458
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3459
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3460
- @end
3461
-
3462
- /// The source for a scan flow
3463
- typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
3464
- /// Scan using the camera
3465
- GSKScanFlowSourceCamera = 0,
3466
- /// Import a file from a URL
3467
- GSKScanFlowSourceImageURL = 1,
3468
- /// Import a file from the user’s photo library
3469
- GSKScanFlowSourceLibrary = 2,
3470
- };
3471
-
3472
- @class GSKStructuredDataBankDetails;
3473
- @class GSKStructuredDataContact;
3474
- @class GSKStructuredDataReceipt;
3475
- /// The result of a structured data extraction.
3476
- SWIFT_CLASS("_TtC5GSSDK31GSKScanFlowStructuredDataResult")
3477
- @interface GSKScanFlowStructuredDataResult : NSObject
3478
- /// Present if bank details extraction was requested, <code>nil</code> otherwise.
3479
- @property (nonatomic, strong) GSKStructuredDataBankDetails * _Nullable bankDetails;
3480
- /// Present if business card contact extraction was requested and a contact was
3481
- /// successfully extracted, <code>nil</code> otherwise.
3482
- @property (nonatomic, strong) GSKStructuredDataContact * _Nullable businessCardContact;
3483
- /// Present if receipt extraction was requested and a receipt/invoice was
3484
- /// successfully extracted, <code>nil</code> otherwise.
3485
- @property (nonatomic, strong) GSKStructuredDataReceipt * _Nullable receipt;
3486
- /// Present if barcode extraction was requested and codes were successfully extracted, empty otherwise.
3487
- @property (nonatomic, copy) NSArray<GSKBarcode *> * _Nonnull barcodes;
3488
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3489
- @end
3490
-
3491
- /// Enum that describes how a document should be oriented/rotated
3492
- /// after it’s been captured.
3493
- typedef SWIFT_ENUM(NSInteger, GSKScanOrientation, open) {
3494
- /// The document’s original orientation should be used. No rotation
3495
- /// should be applied.
3496
- GSKScanOrientationOriginal = 0,
3497
- /// The document should be automatically rotated to its ideal orientation.
3498
- GSKScanOrientationAutomatic = 1,
3499
- };
3500
-
3501
- /// Address data extracted from a business card document through OCR.
3502
- SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataAddress")
3503
- @interface GSKStructuredDataAddress : NSObject
3504
- /// The city component of the address.
3505
- @property (nonatomic, readonly, copy) NSString * _Nullable city;
3506
- /// The postal/zip code component of the address.
3507
- @property (nonatomic, readonly, copy) NSString * _Nullable postalCode;
3508
- /// The street name component of the address.
3509
- @property (nonatomic, readonly, copy) NSString * _Nullable street;
3510
- /// The state component of the address.
3511
- @property (nonatomic, readonly, copy) NSString * _Nullable state;
3512
- /// The country component of the address.
3513
- @property (nonatomic, readonly, copy) NSString * _Nullable country;
3514
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3515
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3516
- @end
3517
-
3518
- /// The bank details extracted from a document through OCR.
3519
- SWIFT_CLASS("_TtC5GSSDK28GSKStructuredDataBankDetails")
3520
- @interface GSKStructuredDataBankDetails : NSObject
3521
- /// The IBAN if successfully extracted, otherwise is <code>nil</code>.
3522
- @property (nonatomic, copy) NSString * _Nullable iban;
3523
- /// The BIC code if successfully extracted, otherwise is <code>nil</code>.
3524
- @property (nonatomic, copy) NSString * _Nullable bic;
3525
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3526
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3527
- @end
3528
-
3529
- @class GSKStructuredDataPhoneNumber;
3530
- @class CNContact;
3531
- /// Contact data extracted from a business card document through OCR.
3532
- SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataContact")
3533
- @interface GSKStructuredDataContact : NSObject
3534
- /// Any name that appears on the business card. Contains the full name, including all components.
3535
- @property (nonatomic, readonly, copy) NSString * _Nullable name;
3536
- /// Any organization that appears on the business card.
3537
- @property (nonatomic, readonly, copy) NSString * _Nullable organization;
3538
- /// Any address that appears on the business card.
3539
- @property (nonatomic, readonly, strong) GSKStructuredDataAddress * _Nullable address;
3540
- /// The phone numbers that appear on the business card.
3541
- @property (nonatomic, readonly, copy) NSArray<GSKStructuredDataPhoneNumber *> * _Nonnull phoneNumbers;
3542
- /// The links/URLs that appear on the business card.
3543
- @property (nonatomic, readonly, copy) NSArray<NSURL *> * _Nonnull links;
3544
- /// The email addresses that appear on the business card.
3545
- @property (nonatomic, readonly, copy) NSArray<NSString *> * _Nonnull emailAddresses;
3546
- /// Return a <code>CNContact</code> representation of the contact data within this instance.
3547
- - (CNContact * _Nonnull)asCNContact SWIFT_WARN_UNUSED_RESULT;
3548
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3549
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3550
- @end
3551
-
3552
- /// Class that enables structured data to be extracted from
3553
- /// scanned documents.
3554
- SWIFT_CLASS("_TtC5GSSDK26GSKStructuredDataExtractor")
3555
- @interface GSKStructuredDataExtractor : NSObject
3556
- - (nonnull instancetype)init;
3557
- @end
3558
-
3559
- @interface GSKStructuredDataExtractor (SWIFT_EXTENSION(GSSDK))
3560
- /// Extract any bank details that were found in a given document by
3561
- /// passing in the result of performing OCR on that document. Use
3562
- /// <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
3563
- /// was performed for languages that don’t support structured data extraction,
3564
- /// then this method will throw an error.
3565
- - (void)bankDetailsFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataBankDetails * _Nullable, NSError * _Nullable))completionHandler;
3566
- /// Extract any business card contact that was found in a given document
3567
- /// by passing in the result of performing OCR on that document. Use
3568
- /// <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
3569
- /// was performed for languages that don’t support structured data extraction,
3570
- /// then this method will throw an error.
3571
- - (void)businessCardContactFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataContact * _Nullable, NSError * _Nullable))completionHandler;
3572
- /// Extract any receipt/invoice information that was found in a given
3573
- /// document by passing in the result of performing OCR on that document.
3574
- /// Use <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
3575
- /// was performed for languages that don’t support structured data extraction,
3576
- /// then this method will throw an error.
3577
- - (void)receiptFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataReceipt * _Nullable, NSError * _Nullable))completionHandler;
3578
- @end
3579
-
3580
- /// Enum defining errors that can be thrown by <code>GSKStructuredDataExtractor</code>.
3581
- /// Note that thrown errors will be wrapped in <code>NSError</code> containers.
3582
- typedef SWIFT_ENUM(NSInteger, GSKStructuredDataExtractorError, open) {
3583
- GSKStructuredDataExtractorErrorMissingRequiredOCRMetadata = -1,
3584
- };
3585
- static NSString * _Nonnull const GSKStructuredDataExtractorErrorDomain = @"GSSDK.GSKStructuredDataExtractorError";
3586
-
3587
- /// Phone number data extracted from a business card document through OCR.
3588
- SWIFT_CLASS("_TtC5GSSDK28GSKStructuredDataPhoneNumber")
3589
- @interface GSKStructuredDataPhoneNumber : NSObject
3590
- /// The label of the phone number. For example “Main”, “Office”, etc.
3591
- @property (nonatomic, readonly, copy) NSString * _Nonnull label;
3592
- /// A string representation of the phone number itself.
3593
- @property (nonatomic, readonly, copy) NSString * _Nonnull number;
3594
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3595
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3596
- @end
3597
-
3598
- @class NSLocale;
3599
- /// Receipt/invoice details extracted from a document through OCR.
3600
- SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataReceipt")
3601
- @interface GSKStructuredDataReceipt : NSObject
3602
- /// The locale that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
3603
- @property (nonatomic, readonly, copy) NSLocale * _Nullable locale;
3604
- /// The merchant that the receipt is from, if successfully extracted, otherwise <code>nil</code>.
3605
- @property (nonatomic, readonly, copy) NSString * _Nullable merchant;
3606
- /// The code of currency that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
3607
- @property (nonatomic, readonly, copy) NSString * _Nullable currency;
3608
- /// Any date that appears on the receipt, if successfully extracted, otherwise <code>nil</code>.
3609
- @property (nonatomic, readonly, copy) NSDate * _Nullable date;
3610
- /// The VAT number of the merchant, if successfully extracted, otherwise <code>nil</code>.
3611
- @property (nonatomic, readonly, copy) NSString * _Nullable vatNumber;
3612
- /// The value-added tax (VAT) details.
3613
- /// This property is an array because a receipt may display multiple VAT rates applying to different items
3614
- @property (nonatomic, readonly, copy) NSArray<GSKReceiptVAT *> * _Nonnull vatValues;
3615
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3616
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3617
- @end
3618
-
3619
- SWIFT_CLASS("_TtC5GSSDK13GSKTextLayout")
3620
- @interface GSKTextLayout : NSObject
3621
- @property (nonatomic, readonly, copy) NSString * _Nullable hocr;
3622
- - (nonnull instancetype)initWithHocr:(NSString * _Nullable)hocr OBJC_DESIGNATED_INITIALIZER;
3623
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3624
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3625
- @end
3626
-
3627
- /// Converts an OCR text layout into plain text.
3628
- /// A <code>GSKOCRResult</code> contains both raw text and a <code>GSKTextLayout</code>, which preserves spatial information such as
3629
- /// bounding boxes and line/word positions. This converter reconstructs the raw text from a <code>GSKTextLayout</code> by
3630
- /// traversing its bounding boxes in reading order and grouping content into paragraphs.
3631
- /// Use this when you want to retain only the spatial representation (for highlighting, selection, reflow, etc.)
3632
- /// and regenerate the plain-text representation on demand, rather than storing both.
3633
- SWIFT_CLASS("_TtC5GSSDK28GSKTextLayoutToTextConverter")
3634
- @interface GSKTextLayoutToTextConverter : NSObject
3635
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3636
- @end
3637
-
3638
- SWIFT_CLASS("_TtC5GSSDK34GSKTextLayoutToTextConverterResult")
3639
- @interface GSKTextLayoutToTextConverterResult : NSObject
3640
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3641
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3642
- @end
3643
-
3644
- SWIFT_CLASS("_TtC5GSSDK25GSKUIBackgroundProcessing")
3645
- @interface GSKUIBackgroundProcessing : NSObject
3646
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIBackgroundProcessing * _Nonnull shared;)
3647
- + (GSKUIBackgroundProcessing * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
3648
- @property (nonatomic, readonly, strong) dispatch_queue_t _Nonnull documentGenerationQueue;
3649
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3650
- @end
3651
-
3652
- SWIFT_CLASS("_TtC5GSSDK14GSSDKResources")
3653
- @interface GSSDKResources : NSObject
3654
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _Nonnull bundle;)
3655
- + (NSBundle * _Nonnull)bundle SWIFT_WARN_UNUSED_RESULT;
3656
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3657
- @end
3658
-
3659
- @interface UIViewController (SWIFT_EXTENSION(GSSDK))
3660
- /// Return a status bar style appropriate for this view controller
3661
- /// based on the contrast between the status bar’s contents and the
3662
- /// view controller’s background color.
3663
- @property (nonatomic, readonly) UIStatusBarStyle gsk_statusBarStyleBasedOnContrast;
3664
- /// Return the interface orientations that this view controller
3665
- /// should support based on the current device.
3666
- @property (nonatomic, readonly) UIInterfaceOrientationMask gsk_supportedInterfaceOrientations;
3667
- @end
3668
-
3669
- #endif // defined(__OBJC__)
3670
- #if __has_attribute(external_source_symbol)
3671
- # pragma clang attribute pop
3672
- #endif
3673
- #if defined(__cplusplus)
3674
- #endif
3675
- #pragma clang diagnostic pop
3676
- #endif
3677
-
3678
- #else
3679
- #error unsupported Swift architecture
3680
- #endif