Skip to content

Commit f59259d

Browse files
authored
Merge pull request #25 from doo/dvo/nfc-reader
add passport NFC reader example
2 parents bf79a3f + 4149f50 commit f59259d

File tree

11 files changed

+656
-810
lines changed

11 files changed

+656
-810
lines changed

android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
88
<uses-feature android:name="android.hardware.camera" />
99

10+
<uses-permission android:name="android.permission.NFC" />
11+
1012
<application
1113
android:name="io.scanbot.example.sdk.reactnative.MainApplication"
1214
android:label="@string/app_name"

ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ target 'ScanbotSDKExampleReact' do
2222
#
2323
# Note that if you have use_frameworks! enabled, Flipper will not work and
2424
# you should disable these next few lines.
25-
use_flipper!
25+
use_flipper!({ 'Flipper-Folly' => '2.3.0' }) # update this part
2626
post_install do |installer|
2727
flipper_post_install(installer)
2828
end

ios/Podfile.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,15 @@ PODS:
310310
- React
311311
- RNReanimated (1.8.0):
312312
- React
313-
- RNScanbotSDK (4.5.0):
313+
- RNScanbotSDK (4.6.0):
314314
- React
315-
- RNScanbotSDK/NONE (= 4.5.0)
315+
- RNScanbotSDK/NONE (= 4.6.0)
316316
- ScanbotSDK (= 1.13.0)
317-
- RNScanbotSDK/ALL (4.5.0):
317+
- RNScanbotSDK/ALL (4.6.0):
318318
- React
319319
- ScanbotSDK (= 1.13.0)
320320
- ScanbotSDK/ALL (= 1.13.0)
321-
- RNScanbotSDK/NONE (4.5.0):
321+
- RNScanbotSDK/NONE (4.6.0):
322322
- React
323323
- ScanbotSDK (= 1.13.0)
324324
- RNScreens (2.7.0):
@@ -337,7 +337,7 @@ DEPENDENCIES:
337337
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
338338
- Flipper (~> 0.54.0)
339339
- Flipper-DoubleConversion (= 1.1.7)
340-
- Flipper-Folly (~> 2.2)
340+
- Flipper-Folly (= 2.3.0)
341341
- Flipper-Glog (= 0.3.6)
342342
- Flipper-PeerTalk (~> 0.0.4)
343343
- Flipper-RSocket (~> 1.1)
@@ -522,12 +522,12 @@ SPEC CHECKSUMS:
522522
RNFS: 2bd9eb49dc82fa9676382f0585b992c424cd59df
523523
RNGestureHandler: 8f09cd560f8d533eb36da5a6c5a843af9f056b38
524524
RNReanimated: 955cf4068714003d2f1a6e2bae3fb1118f359aff
525-
RNScanbotSDK: bbe7e1fcd6c80f05e1727f7cc8974d5b1a64271a
525+
RNScanbotSDK: 56bacebc621b2017608066c015c23e4dffa12614
526526
RNScreens: cf198f915f8a2bf163de94ca9f5bfc8d326c3706
527527
ScanbotSDK: e1ed79b76398f2856c3d9c7d997e1f3341f10d9b
528528
Yoga: 7d13633d129fd179e01b8953d38d47be90db185a
529529
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
530530

531-
PODFILE CHECKSUM: 900dda44fc5d81c2053eb5f2651040ef2aecd5b0
531+
PODFILE CHECKSUM: 1ba174204729c547d3b884932f7f9ceec886e1ca
532532

533-
COCOAPODS: 1.10.0
533+
COCOAPODS: 1.10.1

ios/ScanbotSDKExampleReact.xcodeproj/project.pbxproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
17C43687A6A8B897ABD11D6A /* Pods-ScanbotSDKExampleReact.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScanbotSDKExampleReact.debug.xcconfig"; path = "Target Support Files/Pods-ScanbotSDKExampleReact/Pods-ScanbotSDKExampleReact.debug.xcconfig"; sourceTree = "<group>"; };
5555
1BFFEE04ED8045D9B190479D /* Pods-ScanbotSDKExampleReact-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScanbotSDKExampleReact-tvOS.release.xcconfig"; path = "Target Support Files/Pods-ScanbotSDKExampleReact-tvOS/Pods-ScanbotSDKExampleReact-tvOS.release.xcconfig"; sourceTree = "<group>"; };
5656
24E66A6334BFBAB24B237659 /* Pods-ScanbotSDKExampleReact-ScanbotSDKExampleReactTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScanbotSDKExampleReact-ScanbotSDKExampleReactTests.debug.xcconfig"; path = "Target Support Files/Pods-ScanbotSDKExampleReact-ScanbotSDKExampleReactTests/Pods-ScanbotSDKExampleReact-ScanbotSDKExampleReactTests.debug.xcconfig"; sourceTree = "<group>"; };
57+
288F736325A60BEB0021B716 /* ScanbotSDKExampleReact.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = ScanbotSDKExampleReact.entitlements; path = ScanbotSDKExampleReact/ScanbotSDKExampleReact.entitlements; sourceTree = "<group>"; };
5758
2D02E47B1E0B4A5D006451C7 /* ScanbotSDKExampleReact-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ScanbotSDKExampleReact-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
5859
2D02E4901E0B4A5D006451C7 /* ScanbotSDKExampleReact-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ScanbotSDKExampleReact-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
5960
3297DDF2E9BB9C8C317749F9 /* libPods-ScanbotSDKExampleReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ScanbotSDKExampleReact.a"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -126,6 +127,7 @@
126127
13B07FAE1A68108700A75B9A /* ScanbotSDKExampleReact */ = {
127128
isa = PBXGroup;
128129
children = (
130+
288F736325A60BEB0021B716 /* ScanbotSDKExampleReact.entitlements */,
129131
64116B3C252794E30065187B /* LaunchScreen.storyboard */,
130132
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
131133
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
@@ -703,6 +705,7 @@
703705
buildSettings = {
704706
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
705707
CLANG_ENABLE_MODULES = YES;
708+
CODE_SIGN_ENTITLEMENTS = ScanbotSDKExampleReact/ScanbotSDKExampleReact.entitlements;
706709
CURRENT_PROJECT_VERSION = 7;
707710
DEVELOPMENT_TEAM = FRUPYT6KB3;
708711
ENABLE_BITCODE = NO;
@@ -718,7 +721,7 @@
718721
"-ObjC",
719722
"-lc++",
720723
);
721-
PRODUCT_BUNDLE_IDENTIFIER = io.scanbot.example.sdk.reactnative;
724+
PRODUCT_BUNDLE_IDENTIFIER = io.scanbot.example.sdk.react.native;
722725
PRODUCT_NAME = ScanbotSDKExampleReact;
723726
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
724727
SWIFT_VERSION = 5.0;
@@ -732,6 +735,7 @@
732735
buildSettings = {
733736
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
734737
CLANG_ENABLE_MODULES = YES;
738+
CODE_SIGN_ENTITLEMENTS = ScanbotSDKExampleReact/ScanbotSDKExampleReact.entitlements;
735739
CURRENT_PROJECT_VERSION = 7;
736740
DEVELOPMENT_TEAM = FRUPYT6KB3;
737741
ENABLE_BITCODE = YES;
@@ -743,7 +747,7 @@
743747
"-ObjC",
744748
"-lc++",
745749
);
746-
PRODUCT_BUNDLE_IDENTIFIER = io.scanbot.example.sdk.reactnative;
750+
PRODUCT_BUNDLE_IDENTIFIER = io.scanbot.example.sdk.react.native;
747751
PRODUCT_NAME = ScanbotSDKExampleReact;
748752
SWIFT_VERSION = 5.0;
749753
VERSIONING_SYSTEM = "apple-generic";

ios/ScanbotSDKExampleReact/Info.plist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
<string>$(CURRENT_PROJECT_VERSION)</string>
2727
<key>LSRequiresIPhoneOS</key>
2828
<true/>
29+
<key>NFCReaderUsageDescription</key>
30+
<string>In order to be able to scan NFC tag in your Passport Scanbot needs access to use NFC module.</string>
2931
<key>NSAppTransportSecurity</key>
3032
<dict>
3133
<key>NSAllowsArbitraryLoads</key>
@@ -59,5 +61,9 @@
5961
</array>
6062
<key>UIViewControllerBasedStatusBarAppearance</key>
6163
<false/>
64+
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
65+
<array>
66+
<string>A0000002471001</string>
67+
</array>
6268
</dict>
6369
</plist>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.developer.nfc.readersession.formats</key>
6+
<array>
7+
<string>NDEF</string>
8+
<string>TAG</string>
9+
</array>
10+
</dict>
11+
</plist>

0 commit comments

Comments
 (0)