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