@vppos/react-native-nfc 1.0.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 (223) hide show
  1. package/LICENSE +20 -0
  2. package/NFCSDK.podspec +40 -0
  3. package/android/build.gradle +85 -0
  4. package/android/gradle.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +31 -0
  6. package/android/src/main/AndroidManifestNew.xml +30 -0
  7. package/android/src/main/java/com/nfcsdk/ChipReader.kt +237 -0
  8. package/android/src/main/java/com/nfcsdk/NFCSDKModule.kt +78 -0
  9. package/android/src/main/java/com/nfcsdk/NFCSDKPackage.kt +17 -0
  10. package/android/src/main/java/com/nfcsdk/NFCScanActivity.kt +299 -0
  11. package/android/src/main/java/com/nfcsdk/utils/Dg13Parser.kt +278 -0
  12. package/android/src/main/java/com/nfcsdk/utils/FaceExtractor.kt +40 -0
  13. package/android/src/main/java/com/nfcsdk/utils/MrzUtils.kt +75 -0
  14. package/android/src/main/res/drawable/bg_nfc_bottom_sheet.xml +13 -0
  15. package/android/src/main/res/drawable/bg_nfc_sheet_handle.xml +9 -0
  16. package/android/src/main/res/layout/activity_nfc.xml +110 -0
  17. package/android/src/main/res/values/styles.xml +10 -0
  18. package/android/src/main/res/xml/nfc_tech_filter.xml +8 -0
  19. package/ios/ChipReader.swift +258 -0
  20. package/ios/NFCSDK-Bridging-Header.h +2 -0
  21. package/ios/NFCSDK.mm +9 -0
  22. package/ios/NFCSDK.swift +112 -0
  23. package/ios/NFCSDKSession.swift +5 -0
  24. package/ios/utils/DG13Parser.swift +302 -0
  25. package/ios/utils/MrzUtils.swift +49 -0
  26. package/lib/module/errors.js +9 -0
  27. package/lib/module/errors.js.map +1 -0
  28. package/lib/module/index.js +118 -0
  29. package/lib/module/index.js.map +1 -0
  30. package/lib/module/package.json +1 -0
  31. package/lib/module/types.js +2 -0
  32. package/lib/module/types.js.map +1 -0
  33. package/lib/typescript/package.json +1 -0
  34. package/lib/typescript/src/errors.d.ts +4 -0
  35. package/lib/typescript/src/errors.d.ts.map +1 -0
  36. package/lib/typescript/src/index.d.ts +80 -0
  37. package/lib/typescript/src/index.d.ts.map +1 -0
  38. package/lib/typescript/src/types.d.ts +45 -0
  39. package/lib/typescript/src/types.d.ts.map +1 -0
  40. package/package.json +155 -0
  41. package/src/errors.ts +6 -0
  42. package/src/index.tsx +141 -0
  43. package/src/types.ts +45 -0
  44. package/vendor/ios-passport-reader/CHANGELOG +362 -0
  45. package/vendor/ios-passport-reader/CODE_OF_CONDUCT.md +77 -0
  46. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/AppDelegate.swift +39 -0
  47. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/Contents.json +158 -0
  48. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-40.png +0 -0
  49. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png +0 -0
  50. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png +0 -0
  51. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png +0 -0
  52. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png +0 -0
  53. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-72.png +0 -0
  54. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png +0 -0
  55. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-76.png +0 -0
  56. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png +0 -0
  57. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png +0 -0
  58. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-small-50.png +0 -0
  59. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-small-50@2x.png +0 -0
  60. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-small.png +0 -0
  61. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png +0 -0
  62. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png +0 -0
  63. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon.png +0 -0
  64. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon@2x.png +0 -0
  65. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/ios-marketing.png +0 -0
  66. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/notification-icon@2x.png +0 -0
  67. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png +0 -0
  68. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png +0 -0
  69. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad@2x.png +0 -0
  70. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/Contents.json +6 -0
  71. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/background.imageset/Contents.json +21 -0
  72. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/background.imageset/background.png +0 -0
  73. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/head.imageset/Contents.json +21 -0
  74. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Assets.xcassets/head.imageset/head.png +0 -0
  75. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Base.lproj/LaunchScreen.storyboard +25 -0
  76. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Extensions/FileManagerExt.swift +16 -0
  77. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Extensions/StringExt.swift +40 -0
  78. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Extensions/UIApplicationExt.swift +21 -0
  79. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Info.plist +77 -0
  80. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Model/PassportUtils.swift +76 -0
  81. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Model/SettingsStore.swift +107 -0
  82. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/NFCPassportReader.entitlements +10 -0
  83. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/SceneDelegate.swift +57 -0
  84. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Views/DetailsView.swift +197 -0
  85. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Views/ExportPassportView.swift +164 -0
  86. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Views/HelperViews/CheckBoxView.swift +48 -0
  87. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Views/HelperViews/ViewExt.swift +20 -0
  88. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Views/HelperViews/ViewModifiers.swift +41 -0
  89. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Views/MRZEntryView.swift +125 -0
  90. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Views/MRZScannerViewController.swift +90 -0
  91. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Views/MainView.swift +214 -0
  92. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Views/PassportSummaryView.swift +111 -0
  93. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Views/PassportView.swift +73 -0
  94. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Views/SettingsView.swift +63 -0
  95. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/Views/StoredPassportView.swift +152 -0
  96. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/masterList.pem +32 -0
  97. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp/readme.md +10 -0
  98. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp.xcodeproj/project.pbxproj +695 -0
  99. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp.xcodeproj/xcshareddata/xcschemes/NFCPassportReader.xcscheme +106 -0
  100. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp.xcworkspace/contents.xcworkspacedata +10 -0
  101. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  102. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderApp.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  103. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderAppTests/DataGroupParsingTests.swift +189 -0
  104. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderAppTests/Info.plist +22 -0
  105. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderAppTests/NFCPassportReaderTests.swift +260 -0
  106. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/NFCPassportReaderAppTests/PACETests.swift +112 -0
  107. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/Podfile +22 -0
  108. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/Podfile.lock +35 -0
  109. package/vendor/ios-passport-reader/Examples/Example_CocoaPods/README.md +2 -0
  110. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/AppDelegate.swift +39 -0
  111. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/Contents.json +158 -0
  112. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-40.png +0 -0
  113. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png +0 -0
  114. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png +0 -0
  115. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png +0 -0
  116. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png +0 -0
  117. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-72.png +0 -0
  118. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png +0 -0
  119. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-76.png +0 -0
  120. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png +0 -0
  121. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png +0 -0
  122. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-small-50.png +0 -0
  123. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-small-50@2x.png +0 -0
  124. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-small.png +0 -0
  125. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png +0 -0
  126. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png +0 -0
  127. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon.png +0 -0
  128. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/icon@2x.png +0 -0
  129. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/ios-marketing.png +0 -0
  130. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/notification-icon@2x.png +0 -0
  131. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png +0 -0
  132. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png +0 -0
  133. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad@2x.png +0 -0
  134. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/Contents.json +6 -0
  135. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/background.imageset/Contents.json +21 -0
  136. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/background.imageset/background.png +0 -0
  137. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/head.imageset/Contents.json +21 -0
  138. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Assets.xcassets/head.imageset/head.png +0 -0
  139. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Base.lproj/LaunchScreen.storyboard +25 -0
  140. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Extensions/FileManagerExt.swift +16 -0
  141. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Extensions/StringExt.swift +40 -0
  142. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Extensions/UIApplicationExt.swift +21 -0
  143. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Info.plist +79 -0
  144. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Model/PassportUtils.swift +99 -0
  145. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Model/SettingsStore.swift +98 -0
  146. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Model/SettingsStoreCAN.swift +75 -0
  147. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/MrzScanner/LICENSE +21 -0
  148. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/MrzScanner/PreviewView.swift +34 -0
  149. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/MrzScanner/StringUtils.swift +160 -0
  150. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/MrzScanner/ViewController.swift +320 -0
  151. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/MrzScanner/VisionViewController.swift +163 -0
  152. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/NFCPassportReader.entitlements +10 -0
  153. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/SceneDelegate.swift +58 -0
  154. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/CANViews/CanKeyView.swift +251 -0
  155. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/CANViews/MRZEntryViewCanKey.swift +65 -0
  156. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/CANViews/PassportViewCAN.swift +73 -0
  157. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/DetailsView.swift +193 -0
  158. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/ExportPassportView.swift +164 -0
  159. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/HelperViews/CheckBoxView.swift +48 -0
  160. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/HelperViews/ViewExt.swift +20 -0
  161. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/HelperViews/ViewModifiers.swift +41 -0
  162. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/MRZEntryView.swift +125 -0
  163. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/MRZScannerViewController.swift +90 -0
  164. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/MainView.swift +264 -0
  165. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/PassportSummaryView.swift +111 -0
  166. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/PassportView.swift +73 -0
  167. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/SettingsView.swift +47 -0
  168. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/Views/StoredPassportView.swift +149 -0
  169. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/masterList.pem +32 -0
  170. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp/readme.md +10 -0
  171. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp.xcodeproj/project.pbxproj +683 -0
  172. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  173. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +25 -0
  174. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderApp.xcodeproj/xcshareddata/xcschemes/NFCPassportReader.xcscheme +106 -0
  175. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderAppTests/DataGroupParsingTests.swift +190 -0
  176. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderAppTests/Info.plist +22 -0
  177. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderAppTests/NFCPassportReaderTests.swift +260 -0
  178. package/vendor/ios-passport-reader/Examples/Example_SPM/NFCPassportReaderAppTests/PACETests.swift +112 -0
  179. package/vendor/ios-passport-reader/LICENSE +21 -0
  180. package/vendor/ios-passport-reader/NFCPassportReader.podspec +27 -0
  181. package/vendor/ios-passport-reader/Package.swift +29 -0
  182. package/vendor/ios-passport-reader/README.md +141 -0
  183. package/vendor/ios-passport-reader/Sources/NFCPassportReader/AES_3DES_DESEncryption.swift +377 -0
  184. package/vendor/ios-passport-reader/Sources/NFCPassportReader/BACHandler.swift +194 -0
  185. package/vendor/ios-passport-reader/Sources/NFCPassportReader/ChipAuthenticationHandler.swift +224 -0
  186. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroupHash.swift +16 -0
  187. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroupParser.swift +36 -0
  188. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/ActiveAuthenticationInfo.swift +69 -0
  189. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/COM.swift +61 -0
  190. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/CardAccess.swift +38 -0
  191. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/ChipAuthenticationInfo.swift +135 -0
  192. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/ChipAuthenticationPublicKeyInfo.swift +53 -0
  193. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/DataGroup.swift +103 -0
  194. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/DataGroup1.swift +111 -0
  195. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/DataGroup11.swift +66 -0
  196. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/DataGroup12.swift +75 -0
  197. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/DataGroup14.swift +37 -0
  198. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/DataGroup15.swift +46 -0
  199. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/DataGroup2.swift +163 -0
  200. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/DataGroup7.swift +46 -0
  201. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/DataGroupId.swift +105 -0
  202. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/NotImplementedDG.swift +16 -0
  203. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/PACEInfo.swift +415 -0
  204. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/SOD.swift +240 -0
  205. package/vendor/ios-passport-reader/Sources/NFCPassportReader/DataGroups/SecurityInfo.swift +136 -0
  206. package/vendor/ios-passport-reader/Sources/NFCPassportReader/Errors.swift +148 -0
  207. package/vendor/ios-passport-reader/Sources/NFCPassportReader/Logging.swift +32 -0
  208. package/vendor/ios-passport-reader/Sources/NFCPassportReader/Models/FaceImageInfo.swift +161 -0
  209. package/vendor/ios-passport-reader/Sources/NFCPassportReader/NFCPassportModel.swift +540 -0
  210. package/vendor/ios-passport-reader/Sources/NFCPassportReader/NFCViewDisplayMessage.swift +60 -0
  211. package/vendor/ios-passport-reader/Sources/NFCPassportReader/OpenSSLUtils.swift +705 -0
  212. package/vendor/ios-passport-reader/Sources/NFCPassportReader/PACEHandler.swift +627 -0
  213. package/vendor/ios-passport-reader/Sources/NFCPassportReader/PassportReader.swift +387 -0
  214. package/vendor/ios-passport-reader/Sources/NFCPassportReader/Resources/PrivacyInfo.xcprivacy +14 -0
  215. package/vendor/ios-passport-reader/Sources/NFCPassportReader/ResponseAPDU.swift +25 -0
  216. package/vendor/ios-passport-reader/Sources/NFCPassportReader/SecureMessaging.swift +301 -0
  217. package/vendor/ios-passport-reader/Sources/NFCPassportReader/SecureMessagingSessionKeyGenerator.swift +156 -0
  218. package/vendor/ios-passport-reader/Sources/NFCPassportReader/SimpleASN1DumpParser.swift +173 -0
  219. package/vendor/ios-passport-reader/Sources/NFCPassportReader/TagReader.swift +374 -0
  220. package/vendor/ios-passport-reader/Sources/NFCPassportReader/Utils.swift +430 -0
  221. package/vendor/ios-passport-reader/Sources/NFCPassportReader/X509Wrapper.swift +168 -0
  222. package/vendor/ios-passport-reader/scripts/README.md +45 -0
  223. package/vendor/ios-passport-reader/scripts/extract.py +197 -0
@@ -0,0 +1,362 @@
1
+ v2.1.1 Implemented a fix for when Active Authentication fails as there are more bytes available - thanks to @petteri-huusko-op
2
+
3
+ v2.1.0
4
+ Bumped minimum version to iOS 14
5
+ Logging has changed to use OSLog framework. This removes the different loglevel settings, and the export will only include the last passport read.
6
+ There is currently an issue reading some passports (I've noticed it with the iPhone 15 Pro) in that the
7
+ connection with the tag randoly drops. This also happens with the ReadID app too so suspect its an
8
+ issue with CoreNFC
9
+
10
+ Merged PR 189 - Handle change in MasterList extraction script
11
+ Changed from CscaMasterListData to pkdMasterListContent - thanks @jakudolejs and @Thormeard
12
+
13
+ Merged PR 186 - handle iOS 16 error message when user removed tag during scanning
14
+ Added additional error check - thanks @TLOn1
15
+ Added public invalidate method to end tag reader session - thanks @sergeyshalnov
16
+
17
+ Merged PR 181 - Expose mapped values for Face Image Information - thanks @TerjeLon
18
+
19
+ Merged PR 178 - Improve error reporting of invalid response
20
+ Updated NFCPassportReaderError.InvalidResponse to provide more information regarding the datagroup and the read tag
21
+ Added a new error case Unknown(Error) to handle errors not directly handled by the SDK
22
+ Added tests to cover the improved output
23
+ dataGroupType is now a computed property. This change makes it readonly and also available when an error needs to be
24
+ thrown in parse method
25
+ Fixed an issue in PassportReader by removing nfcContinuation calls here as this is called in invalidateSession
26
+ Thanks - @markus-mohemian
27
+
28
+ Merged PR 172 - Introduced new display message for activate authentication state
29
+
30
+ v2.0.3
31
+ Fix - for issue 170 - DO99 Fatal error provided by @jjynus
32
+ Guard check for size of rapduBin array
33
+
34
+ v2.0.2
35
+ Fix - change expected response length to -1 in TagReader:selectPassportApplication.
36
+ Should have been part of @TimoTegtmeier's PR (#153) but missed!
37
+ Thanks to @Thormeard for spotting this
38
+
39
+ v2.0.1
40
+ Updated to latest version of OpenSSL - 1.1.1900
41
+ Fixed warnings of publishing updates on background thread when scanning MRZ (example SPM)
42
+ DataGroup12 class is now public (PR152) - thanks @recp
43
+ Improved compatibility with some documents by omitting LE (PR153) - set LE to -1 for commands not expected to return data - thanks @TimoTegtmeier
44
+
45
+ v2.0.0
46
+ Switched app over to user async/await - makes the code paths much simpler
47
+ Added fix for DG11 names - thanks @TerjeLon
48
+ Added fix for missing reader session invalidation - thanks @TerjeLon
49
+ Added fix for crash when there is no image in the DG2 - thanks @brkerturk
50
+
51
+ v1.1.9
52
+ Retrieves names from DG11 if present otherwise fall back to DG1 - thanks @TerjeLon
53
+ Fixed bug with Chip Authentication - thanks @pauphi and @jennytellne-cygni
54
+ Fix Active Authentication with ECDSA signature - thanks @pauphi
55
+ Fix for CA when keyId is not nil - thanks @pauphi
56
+
57
+ This will be the last < iOS 13 version as will be moving to async/await
58
+
59
+ v1.1.8
60
+ Retrieves personal number from DG11 (if its present) otherwise fall back to DG1 (as per ICAO Docs) - thanks @TerjeLon
61
+ Added support for BDC Date/time encoding for DG12 - thanks @jakub-vallo
62
+ Fixed wrong type in DG12 - thanks @jakub-vallo and @markus-mohemian
63
+ Fixed extract of ICAO Masterlist extract - openssl cms verify and extract signed command output format changed
64
+ thanks @georgepadayatti
65
+ Fixed issue with continuing scan after read session has been invalidated - thanks @markus-mohemian
66
+
67
+ V1.1.7
68
+ Fix for SecureMessaging - buildD097 where we ignored if length was >= 256 - thanks to @pmitche
69
+
70
+ V1.1.6
71
+ Fixed tag in DG11 - Thanks @Jusstas.
72
+ Fixed deploying to iOS 12 - added weak framework CryptoTokenKit to podspec - thanks @Jeroenbb94
73
+ Fixed crash in getNextTag when not enough data is present (happens with some passports) - thanks @Benny-iPhone
74
+
75
+ V1.1.5
76
+ Fixed potential issue when checking for invalid ECDSA signatures. Now rather than assuming if both BigNums
77
+ have a zero prefix, we actually check the bignums for validity.
78
+ Added ability to skip Chip Authentication and PACE (use the new skipCA and skipPACE parameters on
79
+ readPassport)
80
+ Added some additional logging and changed some existing logging catagories
81
+
82
+ v1.1.4
83
+ Fixed use of ephemeral params that managed to get reverted!
84
+ Added a couple of addition error messages to TagReader
85
+ Added MRZ key logging
86
+ Added ability to turn off logging completely
87
+
88
+ v1.1.3
89
+ Fix for some ECDSA based message digests which seem to have invalid format (0x00 prefixed on the integers)
90
+ See OpenSSLUtils :: verifySignature for details on the fix
91
+ Thanks to @wellbranding for the report and helping test
92
+
93
+ v1.1.2
94
+ Implemented PACE
95
+ Currently only GM mapping is supported (IM and CAM not yet), but supports both ECDH and DH encryption
96
+ Many thanks to @filom again for really helping me debug and fix the DH implementation!
97
+ Added ability to select MasterFile and also reselect the eMRTD application record
98
+ Now tries to read the CardAccess file (in master record) - required for PACE
99
+ Fix to use extended length if the size of the protected APDU is more than 255 chars
100
+ Changed wrapDO/unwrapDO to use TKBERTLVRecord to handle the encoding/decoding rather than doing it manually
101
+ Thanks again to @filom for this fix.
102
+ Some fixes to Chip Authentication not freeing up some objects correctly,
103
+ and also fixes where no ChipAuthenticationInfo sections are included, try to guess what oid it would be.)
104
+ binToHexRep can now optionally output hex as array text (defaults to existing behaviour)
105
+ SHA224 hashes should now be supported
106
+
107
+ v1.1.1
108
+ Implemented ChipAuthentication - currently only ECDH DES and AES based keys are tested. DH DES & AES keys should work though
109
+ Demo app now includes the SecurityInfos information
110
+
111
+ v1.1.0
112
+ This release contains the following minor breaking changes:
113
+ TagError has been renamed to NFCPassportReaderError
114
+ Upgraded to OpenSSL 1.1.1i
115
+ This moved from typed pointers (e.g. UnsafeMutablePointer<X509>) to OpaquePointers (due to OpenSSL changes)
116
+ No longer accessing OpenSSL structures directly - now using OpenSSL methods (as we should)
117
+ Can use most of it under macOS (not the NFC reading bits though part yet as thats not supported)
118
+ Also, currently can't get images out under Mac as not done the NSImage/UIImage conversion
119
+ Should support macOS 10.15+
120
+ Implemented SOD Verification as per RFC 5652 - this is set as the default behaviour but can be switched back
121
+ to OpenSSL CMS Verification if desired. This fixes the issue where the datagroup hashes are hashed using SHA512 but the
122
+ SOD signed digest is hashed with SHA256.
123
+ Added SimpleASN1DumpParser to parse ASN1 data - bit of a cheat as we just parse the OpenSSL ASN1Dump output rather
124
+ then parsing the ASN1 directly (no time yet to write an ASN1 parser)
125
+ Restructured code:
126
+ split DataGroups out into own files
127
+ moved other structs into own file
128
+ Sample app is a little more feature rich - redesign to make it a little more friendly and usable
129
+ Can export raw passport data (as JSON with Base64 encoded binary fields for each datagroup)
130
+ Select which DataGroups are included in the export
131
+ Can also export the Active Authentication challenge and signature for later verification testing
132
+ Can import previously exported passports (through the Files app)
133
+ Passports can be saved on scan or import (default is off). Saved passports are stored in caches folder (not backed up)
134
+ and stored with .complete file protection (encrypted while device locked)
135
+ Can scan MRZ from passport (Currently using the QKMRZScanner component)
136
+
137
+ v1.0.17
138
+ Active Authentication now supports RSA Keys (thanks to @himtim for testing and sharing data)
139
+
140
+ v1.0.16
141
+ Fix to SampleApp - to actually use the padded fields rather than using them for the checksum calculation only!
142
+
143
+ v1.0.15
144
+ Reverted previous TagReader change and dropped MaxReadData back back to 160 (A0) as this causes issues with older passports
145
+ not supporting arbitrary amounts and failing to re-establish connection. Means a slightly longer read time but better
146
+ reliability (I hope)
147
+ Added ability to customise the MaxDataRead field - Use PassportReader :: overrideNFCDataAmountToRead(). This is useful for development only
148
+ Now supports SHA384 and SHA512 Datagroup Hashes
149
+ Added better error messages (fixes the TagError 11 message) and debug messages
150
+ Locked OpenSSL version to 1.0.2.20 - (OpenSSL 1.0.2u). There are currently issues upgrading to latest OpenSSL due to underlying
151
+ c-struct changes.
152
+ Sample app now correctly pads fields if not valid length (e.g. if a passport number if < 9 chars then pads with filler char (<)
153
+ Added ability for Sample App to import a passport dump file IF a passport.json is included in the app bundle (will possibly look at being able to import from Files later)
154
+ Version is displayed in sample app
155
+
156
+
157
+ v1.0.14
158
+ Merged pull request from @JokeCoder - to expose phone number, residence address and place of birth from DG11 if present.
159
+ Changed logging to be able to store all passport logs to a temporary array for sharing
160
+ Example app can now capture logs and share them
161
+ Changed TagReader - now uses LE - 256 for most reads, and only read a specific data amount if maxDataToRead (le) is not set to 256.
162
+ This seems to fix an issue when reading the image and it fails on the last read and drops down to a smaller size. (iOS14 change?)
163
+
164
+ v1.0.13
165
+ Extract script (for creating masterlist files) now skips embedded masterlists which fail verification
166
+ e.g. UnitedNations CSCA in current ICAO list (icaopkd-002-ml-000161.ldif).
167
+ You can now get the whole byte array for a datagroup (including headers) not just the body
168
+ Added dumpPassportData method to NFCPassportModel to save the passport datagroups as a String:base64String dictionary
169
+ Can now set the logLevel on the PassportReader - defaults to info
170
+ Added better comments for the ASN1 functions
171
+ Demo app now has ability to clear textfields
172
+ Demo app now has the ability to export passport data as JSON file (via ShareSheet)
173
+ v1.0.12
174
+ Fix for verifyECDSASignature - better handling of sigData so it compiles with Swift 5.3
175
+ ResponseError now displays the SW tag values
176
+
177
+ v1.0.11
178
+ TagReaader starts off trying to read arbitary data amounts, however this can fail on some passports which
179
+ seem to need an explicit length so in this case, when we get a failure, fall back to reading smaller specific
180
+ amounts - Thanks for @douglasg for reporting and testing and @SaliienkoAleksandr for testing this.
181
+
182
+ V1.0.10
183
+ Added ability to customise the mesasges displayed in NFCReaderSession View - Thanks to @danydev for PR 41
184
+
185
+ V1.0.9
186
+ Add better error handling on different session invalidation error conditions - Thanks to @danydev - PR 39
187
+
188
+ v1.0.8
189
+ Changed readingBinary data use 256 (0x100) instead of an expected read amount - this tells the reader that an arbitrary long chunk of data is expected in response. Thanks to @maxxx777 for this
190
+ Made DataGroup fields publicly readable (after review of PR 38 by @danydev)
191
+ Adds SHA384 support for calculating DataGroup Hashes - Thanks to @maxxx777 for PR 37
192
+
193
+ V1.0.7
194
+ Change to allow direct access to the underlying DataGroups through read only property dataGroupsRead
195
+ Changed public properties on MFCPassportModel to read only (private set)
196
+ Renamed readDataGroups to dataGroupsAvailable and changed from [String] to [DataGroupId]
197
+ Made getName() and getIDFromName() on DataGroupId public
198
+ Fixed some logging
199
+
200
+ V1.0.6
201
+ Change so that SOD hashes are always extracted (if SOD is present) and checked even if no master list set
202
+
203
+ V1.0.5
204
+ Fixes for Active Authentication and encoding of Le in DO97 - thanks to @smlu for this.
205
+ Minor SwiftUI fixes for the example app
206
+ Better handling of wrong length (hopefully)
207
+
208
+ V1.0.4
209
+ So, turns out some passports can't send 255 bytes of data in one go, so if we get a wrong length error
210
+ then reduce the amount of data we are attempting to read
211
+
212
+ V1.0.3
213
+ PassportReader now handles DG not found
214
+ Only tries to read DG's that are available
215
+ Now defaults to not even attempting to read DataGroups 3 & 4 (as Extended Access Control required and this
216
+ isn't implemented (you can force the read if you want by setting skipSecureElements to false on the
217
+ readPassport call.
218
+
219
+ V1.0.2
220
+ Sample app now has an icon (passport image from FontAwesome)
221
+ Sample app date fields now includes date format in placeholder text
222
+ Previous fix for handling errors in DG elements didn't quite work if elements came in the wrong order
223
+ Hopefully this will - thanks to maxxx777 for his help with this
224
+
225
+ V1.0.1
226
+ Added OS_ACTIVITY_MODE = disabled to Example project scheme to hide internall CoreNFC Logging
227
+ Fixed bug where specific data groups were requested to be read but COM overrode this and caused everything to be read
228
+ Fixed bug where if DG3 element came last (which we can't read due to security), then the entire passport read failed
229
+
230
+ V1.0.0
231
+ Considered stable enough to release properly
232
+
233
+ V0.0.13
234
+ Updated README with new supported features
235
+ Removed tests folder as they have been moved into the Example Project
236
+ Removed old Passport model (NFCPassportModel replaces it)
237
+ Detail view now shows more information on verification status of passport
238
+ Datagroups 11, 12, and 15 now implemented (DG14 has stub but data not parsed yet)
239
+ Datagroup 15 only parses out an ECDSA public key (RSA still to be done)
240
+
241
+ Passive Authentication now properly verifies the SOD data is correctly signed by the Document Signing Certificate
242
+ Passive Authentication now checks all read data group hashes
243
+
244
+ Now supports Active Authentication - ONLY for ECDSA certificates in DG15
245
+
246
+ PassportReader now show progress when reading
247
+ Will re-try up-to 3 times to read passport fields (to reduce failed reads), and also attempts to re-establish BAC if we get an error whilst reading
248
+
249
+ Added Tests back in to Example project
250
+
251
+ V0.0.12
252
+ Removed old version of getSignedDataFromPKCS72
253
+
254
+ Changed getSignedDataFromPKCS7 to verifyAndGetSignedDataFromPKCS7
255
+ Updated above method to use CMS (PKCS7) for verifying the contents of the SOD rather than just dumping the contents
256
+ out (which previously was the case). The PKCS7_Verify function used only supports PKCS7 V1.5 not the new formats (e.g. RSA-OAEP signed messages)
257
+ NOTE -if the contents can't be verified then an exception is now returned rather than just returning the non-verified signed data.
258
+
259
+ Fixed a bug with display of Tampered data in the sample app
260
+ Fixed a feature where I was only reading out DG1 in the sample app
261
+
262
+ V0.0.11
263
+ Major (breaking) changes (sorry)
264
+ Restructured a lot of functionalilty - see sample app
265
+ LDS and Unicode Version now correctly parsed
266
+ MRZ element correctly stored
267
+ Certificates extracted and stored
268
+ Updated NFCPassportModel to have properties that return data in more meaningful form
269
+ e.g. documentNumber, name, documentSigningCertificate, countrySigningCertificate (if found)
270
+ Moved PassiveAuthentication into NFCPassportModel and can be done automatically as passport is read
271
+ PassportReader now accepts an optional URL to masterlist (currenrly needs to be either included in app bundle or downloaded onto device)
272
+ If masterlist url is present, PassiveAuthentication is done as part of passport read.
273
+ Added new X509Wrapper class that wraps up an OpenSSL X509 certificate and can extract elements from it.
274
+
275
+ V0.0.10
276
+ Added missing parameter
277
+ Removed passiveAuthentication from Example app
278
+ Fixed bug where model changes weren't correctly sent to SwiftUI
279
+ Bitcode disabled as doesn't compile properly without it!
280
+ Removed Package.swift
281
+ Merged in ChristianNorbertBraun's patch for Cocoapod support
282
+ Added JPEG2000CodestreamButmap header check when parsing DG2 (thanks to stack1overflow for finding and reporting this)
283
+
284
+ V0.0.9
285
+ Added check for openssl supporting the cms command
286
+ Updated sample app to work with to iOS 13 Beta 8 and XCode 11 Beta 6
287
+
288
+ V0.0.8
289
+ Updated with iOS 13 Beta 4 changes
290
+ Merge pull request #8 from haydarKarkin/master
291
+ Fix that getting MRZ type for ID cards
292
+ Removed included OpenSSL C code
293
+ Ported above C code over to Swift and reduced to only what was needed
294
+ Added .gitattributes files to make project as swift
295
+ Added additional troubleshooting information for when Mutual Authentication fails due to invalid MRZKey
296
+ Merge pull request #4 from WooD1k/bugfix/textfield-deprecated-placeholder-init
297
+ TextFields are using deprecated at iOS 13 beta 3 init
298
+ Merge pull request #3 from WooD1k/bugfix/content-view-visibility
299
+ The main screen of the app is not shown at iOS 13 beta 3
300
+ Use TextField's init without a placeholder property as it's deprecated at iOS 13 beta 3
301
+ Use UIWindow(windowScene:) instead of UIWindow(frame:) at SceneDelegate
302
+ Removed storyboard from Info.plist
303
+
304
+ V0.0.7
305
+ Passport is now NFCPassportModel as the passportMRZ now actually returns just the MRZ data rather than all the elements. There is now a passportDataElements which returns these properly.
306
+ Changed MRZ element key - to 5B rather than 5F5B so it now correctly matches the spec!
307
+ Sample app is back in SwiftUI and fairly well updated (I had some time to properly dive in!)
308
+ Passive Authentication is now done automatically when the passport is read.
309
+ Passive Authentication has been split up into the two seperate stages (each one can be done independently - so you can check of a passport is signed by a valid trusted certificate (from a master list), and then whether that data has been tampered with.
310
+ Moved some code around
311
+
312
+
313
+ V0.0.6
314
+ PassiveAuthentication now throws errors with better details as to why validation failed rather than just returning true/false
315
+ Added script to create a masterList.pem file from either the ICAO PKD repositry masterlists (LDIF) or a country masterlist CMS file
316
+ Added docs for above script
317
+ Added test masterList.pem file which WONT validate anything
318
+ Updated app readme
319
+ Reverted back to plain UIKit because I'm not ready to focus on that yet!
320
+ Refactored PassportReader slightly - fixed some bugs and moved out Passport to its own model
321
+ You'll note its not using CocoaPods because I'm including OpenSSL! I was going to use the Perfect-COpenSSL SPM Package but not too happy with that licence! Instead using Marcin Krzyżanowski's OpenSSL-Universal Pod - hopefully this will become a Swift Package at some point
322
+ Added Passive Authentication! Its included as part of the Sample App for reasons. Ideally this should be its own SPM/Pod but not got round to that yet!
323
+ It uses the Apps code from OpenSSL for the crypto stuff and as such is a bit (very) janky but it works
324
+ You need to manually add your own masterList.pem file which is a single file of all the unique PEMS in the master list - instructions will be coming soon!
325
+ Fixed Error handling - missed off error check when passport lost connection
326
+ Small cleanup of unused code
327
+
328
+ V0.0.5
329
+ If an error was sent from the passport whilst reading, the Error now includes a readable reason for that error
330
+ Refactored main UI slightly
331
+ Added ability to lookup errors received from the passport - currently just prints to logs not returned yet
332
+ Moved Sample app UI over to SwiftUI
333
+
334
+ V0.0.4
335
+ Implemented parsing for DG2, DG7 and COM data groups (inc tests)
336
+ Changed PassportReader to take in which data groups you wish to read and will read those
337
+ PassportReader now pulls data from parsed data groups
338
+ Added DataGroup2 Parsing and tests
339
+ Changed TagError - corrected case for NoConnectedTag and added two new errors
340
+ Renamed DataGroup to DataGroupId and DGMap to DataGroupToFileIdMap due to collision with new DataGroup parsing classes
341
+ Changed type of asn1Length to int rather than UInt64
342
+ Added DataGroupParsing - currently only DG1 parsed out
343
+ Added additional tests
344
+
345
+ V0.0.3
346
+ Renamed log to Log
347
+ Added some initial tests
348
+ Removed bridging header - no longer required now
349
+
350
+ V0.0.2
351
+ Updated Readme's
352
+
353
+ V0.0.1
354
+ Fixed url to point to master for SPM
355
+ Refactored for Swift Package Manager
356
+ Refactored code slighty to make it simpler to use
357
+ PassportReader now does all the NFC stuff
358
+ Just need to call passportReader.readPassport(mrzKey:, completed:) to do the scan
359
+ Started preparations for packaging
360
+ Initial version - working
361
+ Supports Basic Access Control and SecureMessaging
362
+ Reads DG1 (MRZ) and DG2 (image) - in both JPEG and JPEG2000 formats
@@ -0,0 +1,77 @@
1
+
2
+ # Contributor Covenant Code of Conduct
3
+
4
+ ## Our Pledge
5
+
6
+ In the interest of fostering an open and welcoming environment, we as
7
+ contributors and maintainers pledge to make participation in our project and
8
+ our community a harassment-free experience for everyone, regardless of age, body
9
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
10
+ level of experience, education, socio-economic status, nationality, personal
11
+ appearance, race, religion, or sexual identity and orientation.
12
+
13
+ ## Our Standards
14
+
15
+ Examples of behavior that contributes to creating a positive environment
16
+ include:
17
+
18
+ * Using welcoming and inclusive language
19
+ * Being respectful of differing viewpoints and experiences
20
+ * Gracefully accepting constructive criticism
21
+ * Focusing on what is best for the community
22
+ * Showing empathy towards other community members
23
+
24
+ Examples of unacceptable behavior by participants include:
25
+
26
+ * The use of sexualized language or imagery and unwelcome sexual attention or
27
+ advances
28
+ * Trolling, insulting/derogatory comments, and personal or political attacks
29
+ * Public or private harassment
30
+ * Publishing others' private information, such as a physical or electronic
31
+ address, without explicit permission
32
+ * Other conduct which could reasonably be considered inappropriate in a
33
+ professional setting
34
+
35
+ ## Our Responsibilities
36
+
37
+ Project maintainers are responsible for clarifying the standards of acceptable
38
+ behavior and are expected to take appropriate and fair corrective action in
39
+ response to any instances of unacceptable behavior.
40
+
41
+ Project maintainers have the right and responsibility to remove, edit, or
42
+ reject comments, commits, code, wiki edits, issues, and other contributions
43
+ that are not aligned to this Code of Conduct, or to ban temporarily or
44
+ permanently any contributor for other behaviors that they deem inappropriate,
45
+ threatening, offensive, or harmful.
46
+
47
+ ## Scope
48
+
49
+ This Code of Conduct applies within all project spaces, and it also applies when
50
+ an individual is representing the project or its community in public spaces.
51
+ Examples of representing a project or community include using an official
52
+ project e-mail address, posting via an official social media account, or acting
53
+ as an appointed representative at an online or offline event. Representation of
54
+ a project may be further defined and clarified by project maintainers.
55
+
56
+ ## Enforcement
57
+
58
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
59
+ reported by contacting the project team at <andy.qua@gmail.com>. All
60
+ complaints will be reviewed and investigated and will result in a response that
61
+ is deemed necessary and appropriate to the circumstances. The project team is
62
+ obligated to maintain confidentiality with regard to the reporter of an incident.
63
+ Further details of specific enforcement policies may be posted separately.
64
+
65
+ Project maintainers who do not follow or enforce the Code of Conduct in good
66
+ faith may face temporary or permanent repercussions as determined by other
67
+ members of the project's leadership.
68
+
69
+ ## Attribution
70
+
71
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
72
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
73
+
74
+ [homepage]: https://www.contributor-covenant.org
75
+
76
+ For answers to common questions about this code of conduct, see
77
+ https://www.contributor-covenant.org/faq
@@ -0,0 +1,39 @@
1
+ //
2
+ // AppDelegate.swift
3
+ // NFCPassportReaderApp
4
+ //
5
+ // Created by Andy Qua on 06/06/2019.
6
+ // Copyright © 2019 Andy Qua. All rights reserved.
7
+ //
8
+
9
+ import UIKit
10
+ import CoreNFC
11
+
12
+ @UIApplicationMain
13
+ class AppDelegate: UIResponder, UIApplicationDelegate {
14
+
15
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
16
+ return true
17
+ }
18
+
19
+ func applicationWillTerminate(_ application: UIApplication) {
20
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
21
+ }
22
+
23
+ // MARK: UISceneSession Lifecycle
24
+
25
+ func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
26
+ // Called when a new scene session is being created.
27
+ // Use this method to select a configuration to create the new scene with.
28
+ return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
29
+ }
30
+
31
+ func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
32
+ // Called when the user discards a scene session.
33
+ // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
34
+ // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
35
+ }
36
+
37
+
38
+ }
39
+
@@ -0,0 +1,158 @@
1
+ {
2
+ "info" : {
3
+ "author" : "xcode",
4
+ "version" : 1
5
+ },
6
+ "images" : [
7
+ {
8
+ "size" : "40x40",
9
+ "filename" : "icon-40.png",
10
+ "idiom" : "ipad",
11
+ "scale" : "1x"
12
+ },
13
+ {
14
+ "size" : "40x40",
15
+ "idiom" : "ipad",
16
+ "scale" : "2x",
17
+ "filename" : "icon-40@2x.png"
18
+ },
19
+ {
20
+ "idiom" : "iphone",
21
+ "size" : "60x60",
22
+ "scale" : "2x",
23
+ "filename" : "icon-60@2x.png"
24
+ },
25
+ {
26
+ "idiom" : "ipad",
27
+ "filename" : "icon-72.png",
28
+ "size" : "72x72",
29
+ "scale" : "1x"
30
+ },
31
+ {
32
+ "scale" : "2x",
33
+ "idiom" : "ipad",
34
+ "size" : "72x72",
35
+ "filename" : "icon-72@2x.png"
36
+ },
37
+ {
38
+ "idiom" : "ipad",
39
+ "size" : "76x76",
40
+ "scale" : "1x",
41
+ "filename" : "icon-76.png"
42
+ },
43
+ {
44
+ "scale" : "2x",
45
+ "size" : "76x76",
46
+ "idiom" : "ipad",
47
+ "filename" : "icon-76@2x.png"
48
+ },
49
+ {
50
+ "idiom" : "ipad",
51
+ "size" : "50x50",
52
+ "filename" : "icon-small-50.png",
53
+ "scale" : "1x"
54
+ },
55
+ {
56
+ "scale" : "2x",
57
+ "filename" : "icon-small-50@2x.png",
58
+ "size" : "50x50",
59
+ "idiom" : "ipad"
60
+ },
61
+ {
62
+ "scale" : "1x",
63
+ "filename" : "icon-small.png",
64
+ "idiom" : "iphone",
65
+ "size" : "29x29"
66
+ },
67
+ {
68
+ "scale" : "2x",
69
+ "size" : "29x29",
70
+ "idiom" : "iphone",
71
+ "filename" : "icon-small@2x.png"
72
+ },
73
+ {
74
+ "filename" : "icon.png",
75
+ "idiom" : "iphone",
76
+ "size" : "57x57",
77
+ "scale" : "1x"
78
+ },
79
+ {
80
+ "scale" : "2x",
81
+ "size" : "57x57",
82
+ "idiom" : "iphone",
83
+ "filename" : "icon@2x.png"
84
+ },
85
+ {
86
+ "filename" : "icon-small@3x.png",
87
+ "size" : "29x29",
88
+ "idiom" : "iphone",
89
+ "scale" : "3x"
90
+ },
91
+ {
92
+ "size" : "40x40",
93
+ "scale" : "3x",
94
+ "idiom" : "iphone",
95
+ "filename" : "icon-40@3x.png"
96
+ },
97
+ {
98
+ "filename" : "icon-60@3x.png",
99
+ "scale" : "3x",
100
+ "idiom" : "iphone",
101
+ "size" : "60x60"
102
+ },
103
+ {
104
+ "size" : "40x40",
105
+ "filename" : "icon-40@2x.png",
106
+ "idiom" : "iphone",
107
+ "scale" : "2x"
108
+ },
109
+ {
110
+ "scale" : "1x",
111
+ "idiom" : "ipad",
112
+ "size" : "29x29",
113
+ "filename" : "icon-small.png"
114
+ },
115
+ {
116
+ "size" : "29x29",
117
+ "scale" : "2x",
118
+ "filename" : "icon-small@2x.png",
119
+ "idiom" : "ipad"
120
+ },
121
+ {
122
+ "idiom" : "ipad",
123
+ "filename" : "icon-83.5@2x.png",
124
+ "scale" : "2x",
125
+ "size" : "83.5x83.5"
126
+ },
127
+ {
128
+ "size" : "20x20",
129
+ "scale" : "2x",
130
+ "filename" : "notification-icon@2x.png",
131
+ "idiom" : "iphone"
132
+ },
133
+ {
134
+ "scale" : "3x",
135
+ "filename" : "notification-icon@3x.png",
136
+ "idiom" : "iphone",
137
+ "size" : "20x20"
138
+ },
139
+ {
140
+ "filename" : "notification-icon~ipad.png",
141
+ "idiom" : "ipad",
142
+ "size" : "20x20",
143
+ "scale" : "1x"
144
+ },
145
+ {
146
+ "filename" : "notification-icon~ipad@2x.png",
147
+ "size" : "20x20",
148
+ "scale" : "2x",
149
+ "idiom" : "ipad"
150
+ },
151
+ {
152
+ "filename" : "ios-marketing.png",
153
+ "size" : "1024x1024",
154
+ "idiom" : "ios-marketing",
155
+ "scale" : "1x"
156
+ }
157
+ ]
158
+ }