expo-invoke 2.8.5 → 2.8.6
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.
- package/build/plugin/ios/widgets/withWidgetSourceFiles.js +3 -3
- package/build/plugin/src/withInvoke.js +1 -1
- package/expo-invoke.podspec +1 -1
- package/ios/LiveActivity/LiveActivityManager.swift +3 -17
- package/ios/Shortcuts/SpotlightManager.swift +1 -1
- package/ios/Widgets/WidgetsEvents.swift +2 -0
- package/ios/Widgets/WidgetsStorage.swift +2 -0
- package/package.json +1 -1
|
@@ -120,7 +120,7 @@ const createIndexSwift = (widgets, targetPath) => {
|
|
|
120
120
|
const numberOfBundles = Math.ceil(numberOfWidgets / 4);
|
|
121
121
|
let output = `import WidgetKit
|
|
122
122
|
import SwiftUI
|
|
123
|
-
|
|
123
|
+
import ExpoInvoke
|
|
124
124
|
`;
|
|
125
125
|
if (numberOfWidgets > 0) {
|
|
126
126
|
for (let i = 0; i < numberOfBundles; i++) {
|
|
@@ -184,7 +184,7 @@ const widgetSwift = (widget) => {
|
|
|
184
184
|
if (!configuration)
|
|
185
185
|
return `import WidgetKit
|
|
186
186
|
import SwiftUI
|
|
187
|
-
|
|
187
|
+
import ExpoInvoke
|
|
188
188
|
|
|
189
189
|
struct ${widget.name}: Widget {
|
|
190
190
|
let name: String = "${widget.name}"
|
|
@@ -201,7 +201,7 @@ struct ${widget.name}: Widget {
|
|
|
201
201
|
return `import WidgetKit
|
|
202
202
|
import SwiftUI
|
|
203
203
|
import AppIntents
|
|
204
|
-
|
|
204
|
+
import ExpoInvoke
|
|
205
205
|
|
|
206
206
|
// AppIntent
|
|
207
207
|
struct ${widget.name}ConfigurationAppIntent: WidgetConfigurationIntent {
|
|
@@ -62,5 +62,5 @@ const withInvoke = (config, options) => {
|
|
|
62
62
|
});
|
|
63
63
|
return config;
|
|
64
64
|
};
|
|
65
|
-
exports.default = (0, config_plugins_1.createRunOncePlugin)(withInvoke, 'expo-invoke', '2.8.
|
|
65
|
+
exports.default = (0, config_plugins_1.createRunOncePlugin)(withInvoke, 'expo-invoke', '2.8.6');
|
|
66
66
|
//# sourceMappingURL=withInvoke.js.map
|
package/expo-invoke.podspec
CHANGED
|
@@ -14,7 +14,7 @@ Pod::Spec.new do |s|
|
|
|
14
14
|
|
|
15
15
|
s.source_files = 'ios/**/*.{h,m,mm,swift}'
|
|
16
16
|
|
|
17
|
-
# Override the Swift module name so `
|
|
17
|
+
# Override the Swift module name so `import ExpoInvoke` works in the widget extension.
|
|
18
18
|
# CocoaPods derives the module name from s.name (expo-invoke → expo_invoke), but we need ExpoInvoke.
|
|
19
19
|
s.pod_target_xcconfig = { 'PRODUCT_MODULE_NAME' => 'ExpoInvoke' }
|
|
20
20
|
|
|
@@ -24,17 +24,6 @@ import Foundation
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
let activityId = UUID().uuidString
|
|
27
|
-
|
|
28
|
-
// When ActivityKit is available (iOS 16.1+) AND the plugin has run `npx expo prebuild`
|
|
29
|
-
// with `enableLiveActivities: true`, the generated InvokeLiveActivities.swift provides
|
|
30
|
-
// a real ActivityKit-backed extension on this class. That extension is called here.
|
|
31
|
-
// Without prebuild, activityId is returned but the activity is never registered.
|
|
32
|
-
#if canImport(ActivityKit)
|
|
33
|
-
if #available(iOS 16.1, *) {
|
|
34
|
-
try self.createActivity(activityId: activityId, config: config)
|
|
35
|
-
}
|
|
36
|
-
#endif
|
|
37
|
-
|
|
38
27
|
return activityId
|
|
39
28
|
}
|
|
40
29
|
|
|
@@ -69,11 +58,9 @@ import Foundation
|
|
|
69
58
|
}
|
|
70
59
|
}
|
|
71
60
|
|
|
72
|
-
//
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
// with the real implementation in InvokeLiveActivities.swift.
|
|
76
|
-
#if !canImport(ActivityKit)
|
|
61
|
+
// No-op stub — the real implementation is provided by generated InvokeLiveActivities.swift
|
|
62
|
+
// when `enableLiveActivities: true` is set and expo prebuild has run. When codegen hasn't
|
|
63
|
+
// run (e.g. using the new createLiveActivity() API), these calls are harmless no-ops.
|
|
77
64
|
@objc public class LiveActivityRegistry: NSObject {
|
|
78
65
|
@objc public static let shared = LiveActivityRegistry()
|
|
79
66
|
private override init() {}
|
|
@@ -81,4 +68,3 @@ import Foundation
|
|
|
81
68
|
@objc public func end(activityId: String, finalStateJson: String?) {}
|
|
82
69
|
@objc public func listActivities() -> [[String: Any]] { return [] }
|
|
83
70
|
}
|
|
84
|
-
#endif
|
|
@@ -8,7 +8,7 @@ public struct SpotlightManager {
|
|
|
8
8
|
guard let data = json.data(using: .utf8),
|
|
9
9
|
let items = try? JSONSerialization.jsonObject(with: data) as? [[String: Any]] else { return }
|
|
10
10
|
|
|
11
|
-
let searchItems: [CSSearchableItem] = items.compactMap { item in
|
|
11
|
+
let searchItems: [CSSearchableItem] = items.compactMap { item -> CSSearchableItem? in
|
|
12
12
|
guard let id = item["id"] as? String,
|
|
13
13
|
let title = item["title"] as? String else { return nil }
|
|
14
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-invoke",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.6",
|
|
4
4
|
"description": "The complete native-surface-to-JS bridge for Expo. One intent config → Siri, Google Assistant, home screen widgets, Dynamic Island, app icon menus, notification actions, NFC, QR, deep links and more — all through a single useInvoke() hook.",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"module": "build/src/index.js",
|