tauri-plugin-live-activity 0.12.0 → 0.13.1

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/README.ko.md CHANGED
@@ -5,8 +5,10 @@
5
5
  [![CI](https://github.com/1eedaegon/tauri-plugin-live-activity/actions/workflows/ci.yml/badge.svg)](https://github.com/1eedaegon/tauri-plugin-live-activity/actions/workflows/ci.yml)
6
6
  [![License](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue)](LICENSE)
7
7
 
8
- Tauri 2 앱이 하고 있는 일을 iPhone 잠금 화면과 Dynamic Island에, Android에서는 진행 중 알림으로
9
- 보여 줍니다. 레이아웃은 TSX, TypeScript 또는 Rust로 적고, 그리는 일은 플러그인이 맡습니다.
8
+ **Tauri 2용 iOS Live Activities와 Android Live Updates.** Tauri 2 앱이 하고 있는 일을 iPhone 잠금 화면과
9
+ Dynamic Island(ActivityKit)에, Android에서는 Live Update나 진행 중 알림으로 보여 줍니다. 레이아웃은 TSX,
10
+ TypeScript 또는 Rust로 적고, 그리는 일은 플러그인이 [liveactivity-rs](https://github.com/1eedaegon/liveactivity-rs)
11
+ 브리지를 통해 맡습니다.
10
12
  [English](https://github.com/1eedaegon/tauri-plugin-live-activity/blob/main/README.md)
11
13
 
12
14
  <table>
@@ -39,11 +41,52 @@ Tauri 2 앱이 하고 있는 일을 iPhone 잠금 화면과 Dynamic Island에, A
39
41
  <img src="https://raw.githubusercontent.com/1eedaegon/tauri-plugin-live-activity/main/docs/images/live-editing.gif" width="800" alt="왼쪽은 iPhone 17 Pro 시뮬레이터의 화면 녹화로, 데모 위로 끌어내린 잠금 화면과 Mochi의 카드입니다. 오른쪽은 저장 기록으로 그린 편집기 화면의 card.tsx입니다. 값을 저장하면 상태 문구, 남은 시간, 진행률 막대가 그 자리에서 바뀌고, 발바닥을 자전거로 바꾸거나 제목을 키워 저장하면 카드가 사라졌다가 바뀐 모습으로 다시 뜹니다.">
40
42
 
41
43
  모두 고양이 Mochi를 따라가는 [데모 앱](https://github.com/1eedaegon/tauri-plugin-live-activity/tree/main/examples/demo)에서
42
- 캡처했습니다. iOS 16.2 이상, Android 8 이상에서 동작하고, 데스크톱에서는 활동 명령이
43
- `UNSUPPORTED_PLATFORM`을 돌려줍니다. 플러그인은 [liveactivity](https://github.com/1eedaegon/liveactivity-rs)
44
- 크레이트의 어댑터이고, 이 크레이트가 iOS는 [activitykit](https://github.com/1eedaegon/activitykit-rs), Android는
45
- [liveupdate](https://github.com/1eedaegon/liveupdate-rs) 위에서 돌립니다. 그래서 플러그인 자체의 Swift 코드가 없고
46
- Kotlin은 권한 명령과 liveupdate의 Android 어댑터 호출만 맡습니다.
44
+ 캡처했습니다.
45
+
46
+ ## 지원 버전
47
+
48
+ 요약하면 iOS 16.1 이상, Android 8 이상에서 동작하고, 데스크톱에는 활동이 없습니다.
49
+
50
+ | 어디서 | 최소 버전 | 무엇이 되나 |
51
+ | --- | --- | --- |
52
+ | iPhone | iOS 16.1 | 잠금 화면의 Live Activity, Dynamic Island가 있는 iPhone에서는 Dynamic Island에도. 오래된 표시(stale)와 relevance는 iOS 16.2부터, 버튼·토글·push-to-start는 iOS 17.2부터 |
53
+ | iPad | iPadOS 17 | 잠금 화면의 같은 Live Activity |
54
+ | Apple Watch | iOS 18과 watchOS 11 | 레이아웃의 `small` 영역이 워치의 Smart Stack에 |
55
+ | Android | Android 8.0 (API 26) | 진행률 막대나 타이머, 동작 최대 세 개가 있는 진행 중 알림. 알림 권한은 Android 13 (API 33)부터 묻습니다 |
56
+ | Android Live Updates | Android 16 (API 36) | 시스템과 사용자 설정이 허락하면 승격된 Live Update, 아니면 진행 중 알림 |
57
+ | Samsung Now Bar | Android 17 (API 37), One UI 9 | One UI의 Now Bar가 보여 주는 제목과 본문. Samsung의 허용 목록에 있는 앱만 |
58
+ | macOS, Windows, Linux | 지원 안 함 | 활동이 없고, 활동 명령은 `UNSUPPORTED_PLATFORM`을 돌려줍니다 |
59
+
60
+ 플러그인에는 Tauri 2와 Rust 1.90 이상이 필요합니다. `setup`은 위젯 확장의 배포 대상을 iOS 16.1로, Android
61
+ `minSdk`를 26으로 맞춥니다. 기능마다의 최소 버전은
62
+ [OS 호환성](https://github.com/1eedaegon/tauri-plugin-live-activity/blob/main/docs/compatibility.md)에 있습니다.
63
+
64
+ ## 동작 구조
65
+
66
+ 플러그인은 크레이트 네 개 중 Tauri 쪽입니다. Tauri의 명령, 이벤트, 권한과 `setup` 명령을 맡습니다.
67
+ [liveactivity-rs](https://github.com/1eedaegon/liveactivity-rs) 브리지(`liveactivity` 크레이트)가 요청 계약과 그
68
+ 검사, 수명 주기를 맡아 각 요청을 플랫폼의 백엔드에서 돌립니다:
69
+
70
+ ```text
71
+ Tauri 2 앱 TSX, TypeScript 또는 Rust로 적은 레이아웃
72
+ │ 시작 · 갱신 · 종료 · 이벤트
73
+ ▼
74
+ tauri-plugin-live-activity Tauri 명령, 이벤트, 권한, setup
75
+ │
76
+ ▼
77
+ liveactivity liveactivity-rs 브리지: 하나의 요청 계약,
78
+ │ 그 검사, 수명 주기
79
+ ├─ iOS 16.1+ ────────────► activitykit (activitykit-rs)
80
+ │ Swift 브리지로 부르는 ActivityKit, 앱의 위젯
81
+ │ 확장이 그림: 잠금 화면, Dynamic Island
82
+ └─ Android 8.0+ ─────────► liveupdate (liveupdate-rs)
83
+ 진행 중 알림, Android 16부터 Live Update
84
+ ```
85
+
86
+ 플러그인 자체의 Swift 코드는 없고, Kotlin은 권한 명령과 liveupdate의 Android 어댑터 호출만 맡습니다.
87
+ [iOS 설정](https://github.com/1eedaegon/tauri-plugin-live-activity/blob/main/docs/ios-integration.md)과
88
+ [Android 설정](https://github.com/1eedaegon/tauri-plugin-live-activity/blob/main/docs/android-integration.md)이
89
+ `setup`이 각 프로젝트에서 바꾸는 것을 보여 줍니다.
47
90
 
48
91
  ## 설치
49
92
 
@@ -77,7 +120,7 @@ JSX이므로 레이아웃은 별도 파일에 둡니다.
77
120
  import { Button, HStack, Progress, SFSymbol, Text, VStack } from 'tauri-plugin-live-activity/jsx';
78
121
 
79
122
  // iOS: 잠금 화면이 이 트리를 그대로 그리고, 펼친 Dynamic Island에도 같은 트리가 보입니다
80
- // (iOS 16.2 이상, Button은 iOS 17.2 이상).
123
+ // (iOS 16.1 이상, Button은 iOS 17.2 이상).
81
124
  // Android: 알림이 처음 두 Text를 제목과 본문으로, 첫 Progress를 진행률 막대로, Button을 최대 세 개까지
82
125
  // 동작으로 가져가고, 심볼과 스타일은 그리지 않습니다.
83
126
  export const lockScreen = (
@@ -136,8 +179,9 @@ prop입니다. [더 보기](https://github.com/1eedaegon/tauri-plugin-live-activ
136
179
  ```rust
137
180
  use std::collections::BTreeMap;
138
181
  use tauri::{AppHandle, Runtime};
182
+ use tauri_plugin_live_activity::activitykit::layout::text;
139
183
  use tauri_plugin_live_activity::{
140
- AndroidOptions, AndroidVisibility, Element, Layout, LayoutEndInput, LayoutSnapshot, LayoutStartInput,
184
+ AndroidOptions, AndroidVisibility, Bound, Layout, LayoutEndInput, LayoutSnapshot, LayoutStartInput,
141
185
  LayoutUpdateInput, LiveActivityExt, Result, Value,
142
186
  };
143
187
 
@@ -147,10 +191,7 @@ fn snapshot(revision: u64, status: &str) -> LayoutSnapshot {
147
191
  }
148
192
 
149
193
  fn deliver<R: Runtime>(app: &AppHandle<R>) -> Result<()> {
150
- let layout = Layout {
151
- lock_screen: Element::Text { value: None, bind: Some("status".into()) }.into(),
152
- island: None, background: None, keyline: None, url: None, small: None,
153
- };
194
+ let layout = Layout::new(text(Bound::key("status")));
154
195
  // Android와, Live Activity가 없는 iOS에서는 알림으로 보입니다.
155
196
  let mut input = LayoutStartInput::new("mochi:snack", layout, snapshot(0, "On time"));
156
197
  // Android 전용: 잠금 화면 표시 범위, 포그라운드 배치, 워치의 Ongoing Activity.
@@ -305,8 +346,9 @@ Auto에는 이를 보여 줄 자리가 없습니다. Android는 `small`을 `degr
305
346
 
306
347
  ## 제약
307
348
 
308
- - iOS: iOS 16.2의 iPhone 또는 iPadOS 17의 iPad, 버튼과 토글은 iOS 17.2부터. 액티비티는 앱이 전면일 때만 시작되고
309
- (아니면 `NOT_FOREGROUND`), 시스템이 8시간 뒤 끝냅니다.
349
+ - iOS: iOS 16.1의 iPhone 또는 iPadOS 17의 iPad, 버튼과 토글은 iOS 17.2부터. iOS 16.1에는 stale 날짜와 relevance 점수가
350
+ 없고, `frequentPushes`는 `denied`입니다. 액티비티는 앱이 전면일 때만 시작되고 (아니면 `NOT_FOREGROUND`), 시스템이
351
+ 8시간 뒤 끝냅니다.
310
352
  - iOS는 각 액티비티의 마지막 값을 앱의 Application Support에 평문으로 둡니다. 플러그인 설정에
311
353
  `"receipts": "redacted"`를 주면 가립니다.
312
354
  - 버튼 탭은 Rust `on_action` 핸들러를 최대 4초 기다립니다. JavaScript 리스너는 기다리지 않습니다.
@@ -323,6 +365,30 @@ Auto에는 이를 보여 줄 자리가 없습니다. Android는 `small`을 `degr
323
365
  Now Bar가 보여 줄 제목과 본문을 보냅니다. One UI는 Samsung의 허용 목록에 있는 앱이나, 개발자 옵션 "모든 앱의
324
366
  라이브 알림"이 켜진 동안의 모든 앱에만 Now Bar를 보여 줍니다.
325
367
 
368
+ ## 자주 묻는 질문
369
+
370
+ **Tauri 앱이 Live Activity를 띄우거나 Dynamic Island를 쓸 수 있나요?** 네. 이 플러그인으로 Tauri 2 앱은 iOS 16.1
371
+ 이상에서 ActivityKit Live Activity를 시작, 갱신, 종료하고, 잠금 화면과 Dynamic Island에 그립니다. 그리는 위젯
372
+ 확장은 `npx tauri-plugin-live-activity setup`이 앱의 Xcode 프로젝트에 넣습니다.
373
+
374
+ **Android Live Updates를 지원하나요?** 네. Android 16 (API 36) 이상에서는 시스템과 사용자 설정이 허락하면 승격된
375
+ Live Update를 요청하고, 그 밖에는 Android 8.0 (API 26)부터 같은 요청이 진행 중 알림으로 보입니다.
376
+
377
+ **최소 iOS, Android 버전은요?** iPhone은 iOS 16.1, iPad는 iPadOS 17, Android는 8.0 (API 26)입니다. 더 높은 버전이
378
+ 필요한 기능은 [지원 버전](#지원-버전)에 있습니다.
379
+
380
+ **Swift나 Kotlin을 써야 하나요?** 아니요. 레이아웃은 TSX, TypeScript 또는 Rust이고, 네이티브 코드는 플러그인과
381
+ 그 크레이트에 들어 있습니다. 직접 만든 뷰는 SwiftUI로 넣을 수도 있습니다([기본 부품 너머](#기본-부품-너머)).
382
+
383
+ **liveactivity-rs가 뭔가요?** 이 플러그인이 올라선 Rust 브리지, `liveactivity` 크레이트입니다. 요청 계약과 수명
384
+ 주기를 맡고, iOS는 activitykit-rs, Android는 liveupdate-rs 위에서 돌립니다([동작 구조](#동작-구조)).
385
+
386
+ **서버가 활동을 갱신할 수 있나요?** iOS에서는 APNs로 됩니다: 푸시 토큰, iOS 17.2부터 push-to-start, iOS 18부터
387
+ broadcast 채널([푸시 (iOS)](#푸시-ios)). Android에는 푸시 경로가 없고, 앱이 알림을 갱신합니다.
388
+
389
+ **macOS, Windows, Linux에서도 되나요?** 아니요. 그곳에서는 활동 명령이 `UNSUPPORTED_PLATFORM`을 돌려주고,
390
+ `getCapabilities()`가 그렇다고 알려 줍니다.
391
+
326
392
  ## 더 알아보기
327
393
 
328
394
  [문서](https://github.com/1eedaegon/tauri-plugin-live-activity/tree/main/docs)가 나머지를 다룹니다: `setup`이
package/README.md CHANGED
@@ -5,8 +5,10 @@
5
5
  [![CI](https://github.com/1eedaegon/tauri-plugin-live-activity/actions/workflows/ci.yml/badge.svg)](https://github.com/1eedaegon/tauri-plugin-live-activity/actions/workflows/ci.yml)
6
6
  [![License](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue)](LICENSE)
7
7
 
8
- Show what your Tauri 2 app is doing on the iPhone Lock Screen and in the Dynamic Island, and as
9
- an ongoing notification on Android. You describe the layout in TSX, TypeScript or Rust; the plugin draws it.
8
+ **iOS Live Activities and Android Live Updates for Tauri 2.** Show what your Tauri 2 app is doing on the iPhone
9
+ Lock Screen and in the Dynamic Island (ActivityKit), and as a Live Update or an ongoing notification on Android.
10
+ You describe the layout in TSX, TypeScript or Rust; the plugin draws it, through the
11
+ [liveactivity-rs](https://github.com/1eedaegon/liveactivity-rs) bridge.
10
12
  [한국어](https://github.com/1eedaegon/tauri-plugin-live-activity/blob/main/README.ko.md)
11
13
 
12
14
  <table>
@@ -39,11 +41,52 @@ start it again ([live editing](https://github.com/1eedaegon/tauri-plugin-live-ac
39
41
  <img src="https://raw.githubusercontent.com/1eedaegon/tauri-plugin-live-activity/main/docs/images/live-editing.gif" width="800" alt="Left, the screen recording of the iPhone 17 Pro simulator: its Lock Screen pulled down over the demo, with Mochi's card. Right, card.tsx as an editor shows it, drawn from the log of the saves. Saves of values change the status, the time and the meter in place; a save that swaps the paw for a bicycle, and one that makes the title larger, each make the card go and come back changed.">
40
42
 
41
43
  All of them come from the [demo app](https://github.com/1eedaegon/tauri-plugin-live-activity/tree/main/examples/demo),
42
- which follows a cat named Mochi. iOS 16.2+ and Android 8+; on desktop the activity commands answer
43
- `UNSUPPORTED_PLATFORM`. The plugin is an adapter of the [liveactivity](https://github.com/1eedaegon/liveactivity-rs)
44
- crate, which runs iOS on [activitykit](https://github.com/1eedaegon/activitykit-rs) and Android on
45
- [liveupdate](https://github.com/1eedaegon/liveupdate-rs): the plugin has no Swift of its own, and its Kotlin answers
46
- the permission commands and carries liveupdate's Android adapter.
44
+ which follows a cat named Mochi.
45
+
46
+ ## Supported versions
47
+
48
+ In short: iOS 16.1+ and Android 8+, and no activities on desktop.
49
+
50
+ | Where | From | What you get |
51
+ | --- | --- | --- |
52
+ | iPhone | iOS 16.1 | Live Activities on the Lock Screen and, on iPhones that have one, in the Dynamic Island. Stale dates and relevance from iOS 16.2; buttons, toggles and push-to-start from iOS 17.2 |
53
+ | iPad | iPadOS 17 | The same Live Activities on the Lock Screen |
54
+ | Apple Watch | iOS 18 with watchOS 11 | A layout's `small` region in the watch's Smart Stack |
55
+ | Android | Android 8.0 (API 26) | An ongoing notification with a progress bar or a timer and up to three actions; the notification permission is asked from Android 13 (API 33) |
56
+ | Android Live Updates | Android 16 (API 36) | A promoted Live Update where the system and the person's settings allow one, the ongoing notification otherwise |
57
+ | Samsung Now Bar | Android 17 (API 37), One UI 9 | The title and body that One UI's Now Bar shows, for apps on Samsung's allow list |
58
+ | macOS, Windows, Linux | not supported | No activities: the activity commands answer `UNSUPPORTED_PLATFORM` |
59
+
60
+ The plugin needs Tauri 2 and Rust 1.90 or later. `setup` sets the widget extension's deployment target to iOS 16.1 and
61
+ the Android `minSdk` to 26. The floor of every feature is in
62
+ [OS compatibility](https://github.com/1eedaegon/tauri-plugin-live-activity/blob/main/docs/compatibility.md).
63
+
64
+ ## How it works
65
+
66
+ The plugin is the Tauri side of four crates. It keeps Tauri's commands, events, permissions and the `setup`
67
+ command. The [liveactivity-rs](https://github.com/1eedaegon/liveactivity-rs) bridge, the `liveactivity` crate, holds
68
+ the request contract, its checks and the lifecycle, and runs each request on the platform's backend:
69
+
70
+ ```text
71
+ your Tauri 2 app a layout in TSX, TypeScript or Rust
72
+ │ start · update · end · events
73
+ ▼
74
+ tauri-plugin-live-activity Tauri commands, events, permissions, setup
75
+ │
76
+ ▼
77
+ liveactivity the liveactivity-rs bridge: one request contract,
78
+ │ its checks, the lifecycle
79
+ ├─ iOS 16.1+ ────────────► activitykit (activitykit-rs)
80
+ │ ActivityKit through its Swift bridge, drawn by the
81
+ │ app's widget extension: Lock Screen, Dynamic Island
82
+ └─ Android 8.0+ ─────────► liveupdate (liveupdate-rs)
83
+ an ongoing notification, a Live Update on Android 16+
84
+ ```
85
+
86
+ The plugin has no Swift of its own; its Kotlin answers the permission commands and carries liveupdate's Android
87
+ adapter. [iOS setup](https://github.com/1eedaegon/tauri-plugin-live-activity/blob/main/docs/ios-integration.md) and
88
+ [Android setup](https://github.com/1eedaegon/tauri-plugin-live-activity/blob/main/docs/android-integration.md) show
89
+ what `setup` changes in each project.
47
90
 
48
91
  ## Install
49
92
 
@@ -77,7 +120,7 @@ since this JSX has no HTML elements.
77
120
  import { Button, HStack, Progress, SFSymbol, Text, VStack } from 'tauri-plugin-live-activity/jsx';
78
121
 
79
122
  // iOS: the Lock Screen draws this tree as it is, and the expanded Dynamic Island shows it too
80
- // (iOS 16.2+; the Button needs iOS 17.2).
123
+ // (iOS 16.1+; the Button needs iOS 17.2).
81
124
  // Android: the notification takes the first two Texts as title and body, the first Progress as its
82
125
  // bar and up to three Buttons as actions; symbols and styles are left out.
83
126
  export const lockScreen = (
@@ -137,8 +180,9 @@ call them off the main thread (on iOS a call on the main thread answers `NATIVE_
137
180
  ```rust
138
181
  use std::collections::BTreeMap;
139
182
  use tauri::{AppHandle, Runtime};
183
+ use tauri_plugin_live_activity::activitykit::layout::text;
140
184
  use tauri_plugin_live_activity::{
141
- AndroidOptions, AndroidVisibility, Element, Layout, LayoutEndInput, LayoutSnapshot, LayoutStartInput,
185
+ AndroidOptions, AndroidVisibility, Bound, Layout, LayoutEndInput, LayoutSnapshot, LayoutStartInput,
142
186
  LayoutUpdateInput, LiveActivityExt, Result, Value,
143
187
  };
144
188
 
@@ -148,10 +192,7 @@ fn snapshot(revision: u64, status: &str) -> LayoutSnapshot {
148
192
  }
149
193
 
150
194
  fn deliver<R: Runtime>(app: &AppHandle<R>) -> Result<()> {
151
- let layout = Layout {
152
- lock_screen: Element::Text { value: None, bind: Some("status".into()) }.into(),
153
- island: None, background: None, keyline: None, url: None, small: None,
154
- };
195
+ let layout = Layout::new(text(Bound::key("status")));
155
196
  // Android, and iOS without Live Activities, show it as a notification.
156
197
  let mut input = LayoutStartInput::new("mochi:snack", layout, snapshot(0, "On time"));
157
198
  // Android only: the lock screen, the foreground placement, a watch's Ongoing Activity.
@@ -315,8 +356,9 @@ at most 1 MiB and 1224 × 480 pixels. [More](https://github.com/1eedaegon/tauri-
315
356
 
316
357
  ## Limits
317
358
 
318
- - iOS: an iPhone with iOS 16.2 or an iPad with iPadOS 17; buttons and toggles need iOS 17.2. An activity starts only while the
319
- app is in the foreground (`NOT_FOREGROUND` otherwise), and the system ends it after 8 hours.
359
+ - iOS: an iPhone with iOS 16.1 or an iPad with iPadOS 17; buttons and toggles need iOS 17.2. iOS 16.1 has no stale date and no
360
+ relevance score, and `frequentPushes` is `denied` there. An activity starts only while the app is in the foreground
361
+ (`NOT_FOREGROUND` otherwise), and the system ends it after 8 hours.
320
362
  - iOS keeps each activity's last values in plain text in the app's Application Support, unless the plugin
321
363
  configuration sets `"receipts": "redacted"`.
322
364
  - A button's tap waits for the Rust `on_action` handlers, at most 4 seconds; JavaScript listeners are not awaited.
@@ -333,6 +375,31 @@ at most 1 MiB and 1224 × 480 pixels. [More](https://github.com/1eedaegon/tauri-
333
375
  the title and body its Now Bar shows. One UI shows the Now Bar only for apps on Samsung's allow list, or for every
334
376
  app while the developer option "Live notifications for all apps" is on.
335
377
 
378
+ ## Questions
379
+
380
+ **Can a Tauri app show a Live Activity or use the Dynamic Island?** Yes. With this plugin a Tauri 2 app starts,
381
+ updates and ends ActivityKit Live Activities on iOS 16.1 and later, drawn on the Lock Screen and in the Dynamic
382
+ Island. `npx tauri-plugin-live-activity setup` adds the widget extension that draws them to the app's Xcode project.
383
+
384
+ **Does it support Android Live Updates?** Yes. On Android 16 (API 36) and later the plugin asks for a promoted Live
385
+ Update where the system and the person's settings allow one; elsewhere, from Android 8.0 (API 26), the same request
386
+ shows as an ongoing notification.
387
+
388
+ **What are the minimum iOS and Android versions?** iOS 16.1 on an iPhone, iPadOS 17 on an iPad and Android 8.0
389
+ (API 26). Some features need more: see [Supported versions](#supported-versions).
390
+
391
+ **Do I have to write Swift or Kotlin?** No. Layouts are TSX, TypeScript or Rust, and the native code comes with the
392
+ plugin and its crates. A view of your own can still be SwiftUI ([Beyond the built-in parts](#beyond-the-built-in-parts)).
393
+
394
+ **What is liveactivity-rs?** The Rust bridge this plugin is built on, the `liveactivity` crate. It owns the request
395
+ contract and the lifecycle, and runs iOS on activitykit-rs and Android on liveupdate-rs ([How it works](#how-it-works)).
396
+
397
+ **Can a server update an activity?** On iOS, through APNs: push tokens, push-to-start from iOS 17.2 and broadcast
398
+ channels from iOS 18 ([Pushes (iOS)](#pushes-ios)). Android has no push path; the app updates its notification.
399
+
400
+ **Does it work on macOS, Windows or Linux?** No. There the activity commands answer `UNSUPPORTED_PLATFORM`, and
401
+ `getCapabilities()` says so.
402
+
336
403
  ## More
337
404
 
338
405
  The [docs](https://github.com/1eedaegon/tauri-plugin-live-activity/tree/main/docs) cover the rest: what `setup`
package/cli/xcodegen.mjs CHANGED
@@ -166,7 +166,7 @@ export function widgetSpec({ pluginVersion, packagePath, appTarget, bundleId, ap
166
166
  ` ${WIDGET}:`,
167
167
  ' type: app-extension',
168
168
  ' platform: iOS',
169
- ' deploymentTarget: "16.2"',
169
+ ' deploymentTarget: "16.1"',
170
170
  ` sources: [${WIDGET}]`,
171
171
  ' dependencies:',
172
172
  ...product('ActivityKitWidget'),
@@ -103,7 +103,10 @@ export interface Permissions {
103
103
  readonly notifications: PermissionState;
104
104
  readonly liveActivities: PermissionState;
105
105
  readonly promotion: PermissionState;
106
- /** Frequent pushes, a switch in Settings on iOS (`granted` or `denied`); `notApplicable` where there are no pushes. */
106
+ /**
107
+ * Frequent pushes, a switch in Settings on iOS (`granted` or `denied`); `denied` on iOS 16.1, which has no such
108
+ * switch; `notApplicable` where there are no pushes.
109
+ */
107
110
  readonly frequentPushes: PermissionState;
108
111
  }
109
112
  interface SnapshotFields {
@@ -199,7 +202,7 @@ export interface LayoutSnapshot {
199
202
  readonly revision: number;
200
203
  /** The complete map. An update keeps the keys and the value types accepted at start. */
201
204
  readonly values: LayoutValues;
202
- /** UTC Unix epoch milliseconds. */
205
+ /** UTC Unix epoch milliseconds. iOS 16.1 has no stale date: the record keeps it, and the content never goes stale. */
203
206
  readonly staleAt?: number;
204
207
  /**
205
208
  * When the content was made, UTC Unix epoch milliseconds. ActivityKit (iOS 17.2) drops content older than what it
@@ -208,7 +211,7 @@ export interface LayoutSnapshot {
208
211
  readonly timestamp?: number;
209
212
  /**
210
213
  * Which of the app's activities the Dynamic Island shows first: the highest score wins. Without it the activity
211
- * keeps its score, 0 at first. Android ignores it, and an Android record does not repeat it.
214
+ * keeps its score, 0 at first. Android and iOS 16.1 ignore it, and their records do not repeat it.
212
215
  */
213
216
  readonly relevance?: number;
214
217
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tauri-plugin-live-activity",
3
- "version": "0.12.0",
3
+ "version": "0.13.1",
4
4
  "description": "Tauri 2 plugin for iOS Live Activities (ActivityKit and Dynamic Island) and Android Live Updates with ongoing notification fallback",
5
5
  "author": "1eedaegon",
6
6
  "type": "module",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "homepage": "https://github.com/1eedaegon/tauri-plugin-live-activity#readme",
13
13
  "bugs": "https://github.com/1eedaegon/tauri-plugin-live-activity/issues",
14
- "keywords": ["tauri", "tauri-plugin", "tauri-v2", "ios", "ipados", "android", "live-activity", "live-activities", "activitykit", "dynamic-island", "live-updates", "notifications"],
14
+ "keywords": ["tauri", "tauri-plugin", "tauri-v2", "ios", "ipados", "android", "live-activity", "live-activities", "activitykit", "dynamic-island", "live-updates", "live-update", "android-live-updates", "notifications", "ongoing-notification", "lock-screen", "widgetkit", "now-bar", "liveactivity-rs", "react", "tsx", "rust"],
15
15
  "sideEffects": false,
16
16
  "types": "./dist-js/index.d.ts",
17
17
  "main": "./dist-js/index.js",