Skip to content

Commit 67a8253

Browse files
author
ci-bot
committed
Updated projects
1 parent 167eca3 commit 67a8253

63 files changed

Lines changed: 3664 additions & 25 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Advanced/DocumentReader-Swift/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ platform :ios, '13.0'
44
use_frameworks!
55

66
target 'DocumentReader-Swift' do
7-
pod 'DocumentReader', '~> 9.1.0'
8-
pod 'DocumentReaderFullRFID', '~> 9.1.0'
7+
pod 'DocumentReader', '~> 9.2.0'
8+
pod 'DocumentReaderFullRFID', '~> 9.2.0'
99
end
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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.associated-domains</key>
6+
<array/>
7+
<key>com.apple.developer.nfc.readersession.formats</key>
8+
<array>
9+
<string>TAG</string>
10+
<string>NDEF</string>
11+
</array>
12+
<key>com.apple.developer.parent-application-identifiers</key>
13+
<array>
14+
<string>$(AppIdentifierPrefix)regula.DocumentReader</string>
15+
</array>
16+
</dict>
17+
</plist>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//
2+
// AppDelegate.swift
3+
// AppClip-sample
4+
//
5+
// Created by Ihar Yalavoi on 18.12.25.
6+
// Copyright © 2025 Dmitry Smolyakov. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
@main
12+
class AppDelegate: UIResponder, UIApplicationDelegate {
13+
14+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
15+
true
16+
}
17+
18+
// MARK: - UISceneSession Lifecycle
19+
20+
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
21+
UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
22+
}
23+
24+
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {}
25+
}
26+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"colors" : [
3+
{
4+
"idiom" : "universal"
5+
}
6+
],
7+
"info" : {
8+
"author" : "xcode",
9+
"version" : 1
10+
}
11+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"platform" : "ios",
6+
"size" : "1024x1024"
7+
},
8+
{
9+
"appearances" : [
10+
{
11+
"appearance" : "luminosity",
12+
"value" : "dark"
13+
}
14+
],
15+
"idiom" : "universal",
16+
"platform" : "ios",
17+
"size" : "1024x1024"
18+
},
19+
{
20+
"appearances" : [
21+
{
22+
"appearance" : "luminosity",
23+
"value" : "tinted"
24+
}
25+
],
26+
"idiom" : "universal",
27+
"platform" : "ios",
28+
"size" : "1024x1024"
29+
}
30+
],
31+
"info" : {
32+
"author" : "xcode",
33+
"version" : 1
34+
}
35+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
6+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
7+
</dependencies>
8+
<scenes>
9+
<!--View Controller-->
10+
<scene sceneID="EHf-IW-A2E">
11+
<objects>
12+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
13+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
14+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
15+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16+
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
17+
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
18+
</view>
19+
</viewController>
20+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
21+
</objects>
22+
<point key="canvasLocation" x="53" y="375"/>
23+
</scene>
24+
</scenes>
25+
</document>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="24506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
3+
<device id="retina6_12" orientation="portrait" appearance="light"/>
4+
<dependencies>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="24504"/>
6+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
7+
<capability name="System colors in document resources" minToolsVersion="11.0"/>
8+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9+
</dependencies>
10+
<scenes>
11+
<!--View Controller-->
12+
<scene sceneID="tne-QT-ifu">
13+
<objects>
14+
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="AppClip_sample" customModuleProvider="target" sceneMemberID="viewController">
15+
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
16+
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
17+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18+
<subviews>
19+
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="large" translatesAutoresizingMaskIntoConstraints="NO" id="bgc-bQ-SQt">
20+
<rect key="frame" x="159" y="388.66666666666669" width="75" height="75"/>
21+
<constraints>
22+
<constraint firstAttribute="width" constant="75" id="IeW-DN-dql"/>
23+
<constraint firstAttribute="height" constant="75" id="tP6-QQ-m3r"/>
24+
</constraints>
25+
<color key="color" systemColor="labelColor"/>
26+
</activityIndicatorView>
27+
</subviews>
28+
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
29+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
30+
<constraints>
31+
<constraint firstItem="bgc-bQ-SQt" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="G3Z-Dr-XfD"/>
32+
<constraint firstItem="bgc-bQ-SQt" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="o1X-Q8-PJw"/>
33+
</constraints>
34+
</view>
35+
<connections>
36+
<outlet property="activityIndicator" destination="bgc-bQ-SQt" id="6ab-V6-I6a"/>
37+
</connections>
38+
</viewController>
39+
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
40+
</objects>
41+
<point key="canvasLocation" x="139" y="131"/>
42+
</scene>
43+
</scenes>
44+
<resources>
45+
<systemColor name="labelColor">
46+
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
47+
</systemColor>
48+
<systemColor name="systemBackgroundColor">
49+
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
50+
</systemColor>
51+
</resources>
52+
</document>

AppClip/AppClip-sample/Info.plist

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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.iso7816.select-identifiers</key>
6+
<array>
7+
<string>A0000002471001</string>
8+
<string>E80704007F00070302</string>
9+
<string>A000000167455349474E</string>
10+
<string>A0000002480100</string>
11+
<string>A0000002480200</string>
12+
<string>A0000002480300</string>
13+
<string>A00000045645444C2D3031</string>
14+
</array>
15+
<key>NFCReaderUsageDescription</key>
16+
<string>This app needs NFC access to read RFID chip data from identity documents for verification purposes.</string>
17+
<key>NSCameraUsageDescription</key>
18+
<string>This app uses the camera for identity document scanning and verification.</string>
19+
<key>NSAppClip</key>
20+
<dict>
21+
<key>NSAppClipRequestEphemeralUserNotification</key>
22+
<false/>
23+
<key>NSAppClipRequestLocationConfirmation</key>
24+
<false/>
25+
</dict>
26+
<key>UIApplicationSceneManifest</key>
27+
<dict>
28+
<key>UIApplicationSupportsMultipleScenes</key>
29+
<false/>
30+
<key>UISceneConfigurations</key>
31+
<dict>
32+
<key>UIWindowSceneSessionRoleApplication</key>
33+
<array>
34+
<dict>
35+
<key>UISceneConfigurationName</key>
36+
<string>Default Configuration</string>
37+
<key>UISceneDelegateClassName</key>
38+
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
39+
<key>UISceneStoryboardFile</key>
40+
<string>Main</string>
41+
</dict>
42+
</array>
43+
</dict>
44+
</dict>
45+
</dict>
46+
</plist>
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
//
2+
// SceneDelegate.swift
3+
// AppClip-sample
4+
//
5+
// Created by Ihar Yalavoi on 18.12.25.
6+
// Copyright © 2025 Dmitry Smolyakov. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
12+
13+
// MARK: - Constants
14+
15+
private static let pendingURLKey = "AppClipPendingURL"
16+
private static let maxRetries = 10
17+
private static let initialRetryDelay: TimeInterval = 0.1
18+
19+
// MARK: - Properties
20+
21+
var window: UIWindow?
22+
private var pendingURL: URL?
23+
24+
// MARK: - UIWindowSceneDelegate
25+
26+
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
27+
if let userActivity = connectionOptions.userActivities.first,
28+
userActivity.activityType == NSUserActivityTypeBrowsingWeb,
29+
let url = userActivity.webpageURL {
30+
pendingURL = url
31+
}
32+
connectionOptions.urlContexts.first.map { pendingURL = $0.url }
33+
}
34+
35+
func sceneDidBecomeActive(_ scene: UIScene) {
36+
if let url = pendingURL {
37+
pendingURL = nil
38+
handleURLWithRetry(url, in: scene, retryCount: 0)
39+
} else if let qrCodeURLString = UserDefaults.standard.string(forKey: Self.pendingURLKey),
40+
let qrCodeURL = URL(string: qrCodeURLString) {
41+
UserDefaults.standard.removeObject(forKey: Self.pendingURLKey)
42+
handleURLWithRetry(qrCodeURL, in: scene, retryCount: 0)
43+
}
44+
}
45+
46+
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
47+
guard userActivity.activityType == NSUserActivityTypeBrowsingWeb,
48+
let url = userActivity.webpageURL else { return }
49+
handleURLWithRetry(url, in: scene, retryCount: 0)
50+
}
51+
52+
private func handleURLWithRetry(_ url: URL, in scene: UIScene, retryCount: Int) {
53+
DispatchQueue.main.async {
54+
guard let windowScene = scene as? UIWindowScene,
55+
let window = windowScene.windows.first,
56+
let rootViewController = window.rootViewController else {
57+
return self.retryIfNeeded(url: url, scene: scene, retryCount: retryCount)
58+
}
59+
60+
let viewController: ViewController? = {
61+
if let navController = rootViewController as? UINavigationController {
62+
return navController.viewControllers.first as? ViewController
63+
}
64+
return rootViewController as? ViewController
65+
}()
66+
67+
guard let viewController = viewController, viewController.isViewLoaded else {
68+
UserDefaults.standard.set(url.absoluteString, forKey: Self.pendingURLKey)
69+
return self.retryIfNeeded(url: url, scene: scene, retryCount: retryCount)
70+
}
71+
72+
UserDefaults.standard.removeObject(forKey: Self.pendingURLKey)
73+
viewController.setConfigURL(url)
74+
}
75+
}
76+
77+
private func retryIfNeeded(url: URL, scene: UIScene, retryCount: Int) {
78+
guard retryCount < Self.maxRetries else { return }
79+
let delay = Self.initialRetryDelay * pow(2.0, Double(retryCount))
80+
DispatchQueue.main.asyncAfter(deadline: .now() + min(delay, 1.0)) {
81+
self.handleURLWithRetry(url, in: scene, retryCount: retryCount + 1)
82+
}
83+
}
84+
}

0 commit comments

Comments
 (0)