You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/for-ios/upgrade-guides.md
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,52 @@ sidebar_label: Upgrade Guides
6
6
import Tabs from '@theme/Tabs';
7
7
import TabItem from '@theme/TabItem';
8
8
9
+
## Portals for iOS 0.9.x → 0.10.0
10
+
11
+
- Portals for iOS version `0.10.0` is compatible with Portals Web Plugin versions `0.8.0` and up.
12
+
13
+
### Differential Live Update Support
14
+
15
+
Portals for iOS 0.10.0 introduces support for differential live updates by requiring `IonicLiveUpdates` 0.5.0 as the minimum supported version.
16
+
This feature allows for updating only the changed files in a web asset bundle,
17
+
reducing the amount of data that needs to be transferred to the device. This feature is _enabled by default_.
18
+
To opt-out, explicitly set the [`strategy`](https://live-updates-sdk-ios.vercel.app/documentation/ionicliveupdates/liveupdate/strategy-swift.property) property
19
+
on the `LiveUpdate` configured for the Portal to [`Strategy.zip`](https://live-updates-sdk-ios.vercel.app/documentation/ionicliveupdates/liveupdate/strategy-swift.enum/zip).
20
+
21
+
### Convenience Live Update API
22
+
23
+
#### Individual Portal Sync
24
+
`Portal` now has a [`sync`](https://ionic-portals-ios.vercel.app/documentation/ionicportals/portal/sync()) method that allows for triggering a live update sync manually
25
+
without needing to interact with the `LiveUpdate` or `LiveUpdateManager` instance directly.
26
+
27
+
```swift
28
+
let portal =Portal(/* ... */)
29
+
let result =tryawait portal.sync()
30
+
```
31
+
32
+
`sync` will return a `LiveUpdateManager.SyncResult` or throw an error if the sync has failed. If the Portal is not configured to use live updates, `sync` will throw an error.
33
+
34
+
#### Multiple Portal Sync
35
+
If you need to sync multiple Portals, you can use the static `sync` method on `Portal`:
36
+
```swift
37
+
let portals: [Portal] = [/* ... */]
38
+
forawait result in Portal.sync(portals) {
39
+
// do something with result
40
+
}
41
+
```
42
+
43
+
There is also an extension on Array that allows for syncing an array of Portals:
44
+
```swift
45
+
let portals: [Portal] = [/* ... */]
46
+
forawait result in portals.sync() {
47
+
// do something with result
48
+
}
49
+
```
50
+
51
+
Each result is a `Result<LiveUpdateManager.SyncResult, any Error>` that can be handled as needed.
52
+
All sync operations are performed in parallel and results are yielded as they complete. This AsyncSequence does not throw
53
+
to avoid halting the entire operation if one sync fails.
54
+
9
55
## Portals for iOS 0.8.0 → 0.9.0
10
56
11
57
- Portals for iOS version `0.9.0` is compatible with Portals Web Plugin version `0.8.x`.
0 commit comments