Skip to content

Commit 6482780

Browse files
authored
Merge pull request #3 from loijwdev/feat/ios-detect-edges
Feat/ios detect edges
2 parents 90b15bd + 9e2c3f5 commit 6482780

76 files changed

Lines changed: 7397 additions & 33 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.

.github/workflows/ci.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,14 @@ jobs:
111111
112112
- name: Build example for Android
113113
env:
114-
JAVA_OPTS: "-XX:MaxHeapSize=6g"
114+
JAVA_OPTS: '-XX:MaxHeapSize=6g'
115115
run: |
116116
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
117117
118118
build-ios:
119-
if: false # temporarily skip iOS build
120119
runs-on: macos-latest
121120

122121
env:
123-
XCODE_VERSION: 16.3
124122
TURBO_CACHE_DIR: .turbo/ios
125123
RCT_USE_RN_DEP: 1
126124
RCT_USE_PREBUILT_RNCORE: 1
@@ -148,12 +146,6 @@ jobs:
148146
echo "turbo_cache_hit=1" >> $GITHUB_ENV
149147
fi
150148
151-
- name: Use appropriate Xcode version
152-
if: env.turbo_cache_hit != 1
153-
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
154-
with:
155-
xcode-version: ${{ env.XCODE_VERSION }}
156-
157149
- name: Install cocoapods
158150
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
159151
run: |

LiveDetectEdges.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
1313
s.platforms = { :ios => min_ios_version_supported }
1414
s.source = { :git => "https://github.com/loijwdev/react-native-live-detect-edges.git", :tag => "#{s.version}" }
1515

16-
s.source_files = "ios/**/*.{h,m,mm,swift,cpp}"
16+
s.source_files = "ios/**/*.{h,m,mm,swift,cpp}", "ios/Vendor/WeScan/**/*.{h,m,mm,swift}"
1717
s.private_header_files = "ios/**/*.h"
1818

1919
install_modules_dependencies(s)

example/Gemfile.lock

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.9)
5+
activesupport (7.2.3)
6+
base64
7+
benchmark (>= 0.3)
8+
bigdecimal
9+
concurrent-ruby (~> 1.0, >= 1.3.1)
10+
connection_pool (>= 2.2.5)
11+
drb
12+
i18n (>= 1.6, < 2)
13+
logger (>= 1.4.2)
14+
minitest (>= 5.1)
15+
securerandom (>= 0.3)
16+
tzinfo (~> 2.0, >= 2.0.5)
17+
addressable (2.8.8)
18+
public_suffix (>= 2.0.2, < 8.0)
19+
algoliasearch (1.27.5)
20+
httpclient (~> 2.8, >= 2.8.3)
21+
json (>= 1.5.1)
22+
atomos (0.1.3)
23+
base64 (0.3.0)
24+
benchmark (0.5.0)
25+
bigdecimal (4.0.1)
26+
claide (1.1.0)
27+
cocoapods (1.15.2)
28+
addressable (~> 2.8)
29+
claide (>= 1.0.2, < 2.0)
30+
cocoapods-core (= 1.15.2)
31+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
32+
cocoapods-downloader (>= 2.1, < 3.0)
33+
cocoapods-plugins (>= 1.0.0, < 2.0)
34+
cocoapods-search (>= 1.0.0, < 2.0)
35+
cocoapods-trunk (>= 1.6.0, < 2.0)
36+
cocoapods-try (>= 1.1.0, < 2.0)
37+
colored2 (~> 3.1)
38+
escape (~> 0.0.4)
39+
fourflusher (>= 2.3.0, < 3.0)
40+
gh_inspector (~> 1.0)
41+
molinillo (~> 0.8.0)
42+
nap (~> 1.0)
43+
ruby-macho (>= 2.3.0, < 3.0)
44+
xcodeproj (>= 1.23.0, < 2.0)
45+
cocoapods-core (1.15.2)
46+
activesupport (>= 5.0, < 8)
47+
addressable (~> 2.8)
48+
algoliasearch (~> 1.0)
49+
concurrent-ruby (~> 1.1)
50+
fuzzy_match (~> 2.0.4)
51+
nap (~> 1.0)
52+
netrc (~> 0.11)
53+
public_suffix (~> 4.0)
54+
typhoeus (~> 1.0)
55+
cocoapods-deintegrate (1.0.5)
56+
cocoapods-downloader (2.1)
57+
cocoapods-plugins (1.0.0)
58+
nap
59+
cocoapods-search (1.0.1)
60+
cocoapods-trunk (1.6.0)
61+
nap (>= 0.8, < 2.0)
62+
netrc (~> 0.11)
63+
cocoapods-try (1.2.0)
64+
colored2 (3.1.2)
65+
concurrent-ruby (1.3.3)
66+
connection_pool (2.5.5)
67+
drb (2.2.3)
68+
escape (0.0.4)
69+
ethon (0.15.0)
70+
ffi (>= 1.15.0)
71+
ffi (1.17.3)
72+
fourflusher (2.3.1)
73+
fuzzy_match (2.0.4)
74+
gh_inspector (1.1.3)
75+
httpclient (2.9.0)
76+
mutex_m
77+
i18n (1.14.8)
78+
concurrent-ruby (~> 1.0)
79+
json (2.18.0)
80+
logger (1.7.0)
81+
minitest (5.27.0)
82+
molinillo (0.8.0)
83+
mutex_m (0.3.0)
84+
nanaimo (0.3.0)
85+
nap (1.1.0)
86+
netrc (0.11.0)
87+
public_suffix (4.0.7)
88+
rexml (3.4.4)
89+
ruby-macho (2.5.1)
90+
securerandom (0.4.1)
91+
typhoeus (1.5.0)
92+
ethon (>= 0.9.0, < 0.16.0)
93+
tzinfo (2.0.6)
94+
concurrent-ruby (~> 1.0)
95+
xcodeproj (1.25.1)
96+
CFPropertyList (>= 2.3.3, < 4.0)
97+
atomos (~> 0.1.3)
98+
claide (>= 1.0.2, < 2.0)
99+
colored2 (~> 3.1)
100+
nanaimo (~> 0.3.0)
101+
rexml (>= 3.3.6, < 4.0)
102+
103+
PLATFORMS
104+
ruby
105+
106+
DEPENDENCIES
107+
activesupport (>= 6.1.7.5, != 7.1.0)
108+
benchmark
109+
bigdecimal
110+
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
111+
concurrent-ruby (< 1.3.4)
112+
logger
113+
mutex_m
114+
xcodeproj (< 1.26.0)
115+
116+
RUBY VERSION
117+
ruby 3.1.7p261
118+
119+
BUNDLED WITH
120+
2.3.27

example/ios/LiveDetectEdgesExample.xcodeproj/project.pbxproj

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
0C80B921A6F3F58F76C31292 /* libPods-LiveDetectEdgesExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-LiveDetectEdgesExample.a */; };
1111
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
12+
1D0E58C3B3156ED6BDC3BFDD /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };
1213
761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };
1314
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
1415
/* End PBXBuildFile section */
@@ -159,6 +160,7 @@
159160
files = (
160161
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
161162
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
163+
1D0E58C3B3156ED6BDC3BFDD /* PrivacyInfo.xcprivacy in Resources */,
162164
);
163165
runOnlyForDeploymentPostprocessing = 0;
164166
};
@@ -258,6 +260,7 @@
258260
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
259261
CLANG_ENABLE_MODULES = YES;
260262
CURRENT_PROJECT_VERSION = 1;
263+
DEVELOPMENT_TEAM = 4WWR797B29;
261264
ENABLE_BITCODE = NO;
262265
INFOPLIST_FILE = LiveDetectEdgesExample/Info.plist;
263266
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
@@ -271,7 +274,7 @@
271274
"-ObjC",
272275
"-lc++",
273276
);
274-
PRODUCT_BUNDLE_IDENTIFIER = "livedetectedges.example";
277+
PRODUCT_BUNDLE_IDENTIFIER = livedetectedges.example;
275278
PRODUCT_NAME = LiveDetectEdgesExample;
276279
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
277280
SWIFT_VERSION = 5.0;
@@ -286,6 +289,7 @@
286289
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
287290
CLANG_ENABLE_MODULES = YES;
288291
CURRENT_PROJECT_VERSION = 1;
292+
DEVELOPMENT_TEAM = 4WWR797B29;
289293
INFOPLIST_FILE = LiveDetectEdgesExample/Info.plist;
290294
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
291295
LD_RUNPATH_SEARCH_PATHS = (
@@ -298,7 +302,7 @@
298302
"-ObjC",
299303
"-lc++",
300304
);
301-
PRODUCT_BUNDLE_IDENTIFIER = "livedetectedges.example";
305+
PRODUCT_BUNDLE_IDENTIFIER = livedetectedges.example;
302306
PRODUCT_NAME = LiveDetectEdgesExample;
303307
SWIFT_VERSION = 5.0;
304308
VERSIONING_SYSTEM = "apple-generic";
@@ -366,6 +370,7 @@
366370
);
367371
MTL_ENABLE_DEBUG_INFO = YES;
368372
ONLY_ACTIVE_ARCH = YES;
373+
OTHER_CFLAGS = "$(inherited)";
369374
OTHER_CPLUSPLUSFLAGS = (
370375
"$(OTHER_CFLAGS)",
371376
"-DFOLLY_NO_CONFIG",
@@ -374,7 +379,10 @@
374379
"-DFOLLY_CFG_NO_COROUTINES=1",
375380
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
376381
);
382+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
377383
SDKROOT = iphoneos;
384+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
385+
USE_HERMES = true;
378386
};
379387
name = Debug;
380388
};
@@ -431,6 +439,7 @@
431439
"\"$(inherited)\"",
432440
);
433441
MTL_ENABLE_DEBUG_INFO = NO;
442+
OTHER_CFLAGS = "$(inherited)";
434443
OTHER_CPLUSPLUSFLAGS = (
435444
"$(OTHER_CFLAGS)",
436445
"-DFOLLY_NO_CONFIG",
@@ -439,7 +448,9 @@
439448
"-DFOLLY_CFG_NO_COROUTINES=1",
440449
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
441450
);
451+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
442452
SDKROOT = iphoneos;
453+
USE_HERMES = true;
443454
VALIDATE_PRODUCT = YES;
444455
};
445456
name = Release;

example/ios/LiveDetectEdgesExample.xcworkspace/contents.xcworkspacedata

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/ios/LiveDetectEdgesExample/Info.plist

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@
2828
<true/>
2929
<key>NSAppTransportSecurity</key>
3030
<dict>
31-
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
3231
<key>NSAllowsArbitraryLoads</key>
3332
<false/>
3433
<key>NSAllowsLocalNetworking</key>
3534
<true/>
3635
</dict>
3736
<key>NSLocationWhenInUseUsageDescription</key>
3837
<string></string>
38+
<key>RCTNewArchEnabled</key>
39+
<true/>
3940
<key>UILaunchStoryboardName</key>
4041
<string>LaunchScreen</string>
4142
<key>UIRequiredDeviceCapabilities</key>
@@ -50,5 +51,7 @@
5051
</array>
5152
<key>UIViewControllerBasedStatusBarAppearance</key>
5253
<false/>
54+
<key>NSCameraUsageDescription</key>
55+
<string>This app needs camera access to scan documents</string>
5356
</dict>
5457
</plist>

0 commit comments

Comments
 (0)