Skip to content

Commit 34f63c5

Browse files
cjohn001NathanWalker
authored andcommitted
fix: switch to remove mlkit libs from simulator builds (#84)
1 parent cf3ee14 commit 34f63c5

File tree

25 files changed

+764
-734
lines changed

25 files changed

+764
-734
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
- [@nativescript/mlkit-selfie-segmentation](packages/mlkit-selfie-segmentation/README.md)
1010
- [@nativescript/mlkit-text-recognition](packages/mlkit-text-recognition/README.md)
1111

12+
# How to run it with IOS simulator?
13+
14+
Since Xcode 26 also older IOS emulators (till 17.5) crash when MLKit libs are included in the binary. You can now
15+
therefore control inclusion of the libs via a command line switch.
16+
17+
NSSkipMLKitFromIOSSimulator=1 ns prepare ios
18+
1219
# How to use?
1320

1421
This workspace manages the suite of plugins listed above.

migrations.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/mlkit-barcode-scanning/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/mlkit-barcode-scanning",
3-
"version": "3.0.1",
3+
"version": "3.0.2",
44
"description": "NativeScript MLKit Barcode Scanner module",
55
"main": "index",
66
"typings": "index.d.ts",
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
platform :ios, '15.5.0'
2-
pod 'GoogleMLKit/BarcodeScanning', '8.0.0'
2+
3+
if ENV.key?('NSSkipMLKitFromIOSSimulator')
4+
puts '⏭️ Skipping GoogleMLKit/BarcodeScanning (simulator build)'
5+
else
6+
pod 'GoogleMLKit/BarcodeScanning'
7+
end

packages/mlkit-core/index.ios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ export function detectWithStillImage(image: any, options?: StillImageDetectionOp
841841
} catch (e) {}
842842
}
843843
resolve(result);
844-
}
844+
},
845845
);
846846
});
847847
}

packages/mlkit-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/mlkit-core",
3-
"version": "3.0.2",
3+
"version": "3.0.3",
44
"description": "NativeScript MLKit Core",
55
"main": "index",
66
"typings": "index.d.ts",

0 commit comments

Comments
 (0)