Skip to content

Commit 22c6630

Browse files
authored
chore(docs): Upgrade Guides for iOS 0.10.0 and Web 0.9.0 (#261)
1 parent 3ca96cd commit 22c6630

File tree

3 files changed

+62
-3
lines changed

3 files changed

+62
-3
lines changed

lerna.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"rnMinVersion": "0.63.4",
66
"androidLiveUpdatesVersion": "0.4.1",
77
"rnVersion": "0.5.1",
8-
"iosVersion": "0.9.0",
8+
"iosVersion": "0.10.0",
99
"androidVersion": "0.8.3",
10-
"version": "0.8.1"
11-
}
10+
"version": "0.9.0"
11+
}

website/docs/for-ios/upgrade-guides.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,52 @@ sidebar_label: Upgrade Guides
66
import Tabs from '@theme/Tabs';
77
import TabItem from '@theme/TabItem';
88

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 = try await 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+
for await 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+
for await 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+
955
## Portals for iOS 0.8.0 → 0.9.0
1056

1157
- Portals for iOS version `0.9.0` is compatible with Portals Web Plugin version `0.8.x`.

website/docs/for-web/upgrade-guides.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@ sidebar_label: Upgrade Guides
66
import Tabs from '@theme/Tabs';
77
import TabItem from '@theme/TabItem';
88

9+
## Portals Web Plugin 0.8.x → 0.9.0
10+
11+
- Portals Web Plugin `0.9.0` is compatible with Portals for Android and Portals for iOS versions `0.8.0` and up.
12+
13+
### Breaking Changes
14+
15+
This release removed the `SubscriptionCallback` type. This should only affect TypeScript users who were using the type directly.
16+
If you were using the type directly, `SubscriptionCallback` should be replaced with the following,
17+
replacing `T` with the concrete type of the message data:
18+
```typescript
19+
let callback: (result: PortalMessage<T>) => void;
20+
```
21+
922
## Portals Web Plugin 0.7.x → 0.8.0
1023

1124
- Portals Web Plugin `0.8.0` is compatible with Portals for Android and Portals for iOS versions `0.8.x`.

0 commit comments

Comments
 (0)