@capgo/capacitor-llm 8.0.17 → 8.0.19
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.
|
@@ -18,7 +18,7 @@ import MediaPipeTasksGenAI
|
|
|
18
18
|
|
|
19
19
|
@objc(LLMPlugin)
|
|
20
20
|
public class LLMPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
21
|
-
private let pluginVersion: String = "8.0.
|
|
21
|
+
private let pluginVersion: String = "8.0.19"
|
|
22
22
|
#if targetEnvironment(macCatalyst)
|
|
23
23
|
private let catalystNotSupportedMessage = "CapgoLLM is not available on Mac Catalyst. Use an iOS/iPadOS target instead."
|
|
24
24
|
#endif
|
|
@@ -61,6 +61,16 @@ public class LLMPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
61
61
|
|
|
62
62
|
#if canImport(FoundationModels)
|
|
63
63
|
private var appleModel: Any? = {
|
|
64
|
+
// `SystemLanguageModel.default` is not functional for an iOS/iPadOS
|
|
65
|
+
// binary running "Designed for iPad" on Apple Silicon Mac, and
|
|
66
|
+
// touching it there crashes the app during plugin instantiation —
|
|
67
|
+
// before any of the app's own platform checks get a chance to run,
|
|
68
|
+
// since Capacitor eagerly instantiates every registered plugin at
|
|
69
|
+
// bridge startup. Skip it in that environment, same as the existing
|
|
70
|
+
// Mac Catalyst guard below.
|
|
71
|
+
if ProcessInfo.processInfo.isiOSAppOnMac {
|
|
72
|
+
return nil
|
|
73
|
+
}
|
|
64
74
|
if #available(iOS 26.0, *) {
|
|
65
75
|
return SystemLanguageModel.default
|
|
66
76
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-llm",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.19",
|
|
4
4
|
"description": "Adds support for LLM locally runned for Capacitor",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -55,8 +55,7 @@
|
|
|
55
55
|
"prepublishOnly": "bun run build",
|
|
56
56
|
"check:wiring": "node scripts/check-capacitor-plugin-wiring.mjs",
|
|
57
57
|
"example:install": "cd example-app && bun install --frozen-lockfile",
|
|
58
|
-
"example:build": "bun run build && cd example-app && bun install --frozen-lockfile && bun run build"
|
|
59
|
-
"example:capgo:deploy": "bun run example:build && bun scripts/deploy-example-capgo.mjs"
|
|
58
|
+
"example:build": "bun run build && cd example-app && bun install --frozen-lockfile && bun run build"
|
|
60
59
|
},
|
|
61
60
|
"devDependencies": {
|
|
62
61
|
"@capacitor/android": "^8.0.0",
|