@marktiderman/genesis-native 0.4.1 → 0.4.2
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.md +29 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -454,6 +454,19 @@ typed text, the link and the notifier's notification id. A backend that sets
|
|
|
454
454
|
`usesInstallationId` gets this install's id (made once, kept across sign-ins)
|
|
455
455
|
as `register`'s fourth argument; `supabasePushBackend` doesn't.
|
|
456
456
|
|
|
457
|
+
An app with its own device functions (its own `register` / `forget` RPCs) doesn't
|
|
458
|
+
stub `loadPreferences` / `savePreferences`: it spreads in the notifier's, and
|
|
459
|
+
Settings → Notifications works.
|
|
460
|
+
|
|
461
|
+
```ts
|
|
462
|
+
import { notificationsPushPreferences } from "@marktiderman/genesis-notifications/native";
|
|
463
|
+
|
|
464
|
+
const backend: PushBackend = { register, forget, ...notificationsPushPreferences(supabase) };
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
Spread it after your own keys: a `loadPreferences` or `savePreferences` written later in the object
|
|
468
|
+
replaces its functions.
|
|
469
|
+
|
|
457
470
|
```ts
|
|
458
471
|
// lib/push.ts
|
|
459
472
|
import * as Notifications from "expo-notifications";
|
|
@@ -624,9 +637,22 @@ What it sets:
|
|
|
624
637
|
minimum iOS and team. The app embeds it and depends on it.
|
|
625
638
|
- **EAS:** `extra.eas.build.experimental.ios.appExtensions`. The extension is
|
|
626
639
|
a separate bundle id, so it needs its own provisioning profile. EAS Build
|
|
627
|
-
reads this entry and
|
|
628
|
-
|
|
629
|
-
|
|
640
|
+
reads this entry and registers the extension's App ID with the app's, but on
|
|
641
|
+
a first build its capability sync can fail ("invalid value at
|
|
642
|
+
bundleIdCapabilities attributes") and leave the extension without a profile.
|
|
643
|
+
Before the first build with the plugin, once per app:
|
|
644
|
+
1. In the Apple developer portal (Certificates, Identifiers & Profiles →
|
|
645
|
+
Identifiers), open the `<bundle id>.NotificationService` App ID (create it
|
|
646
|
+
if EAS hasn't) and enable **Communication Notifications**. Leave it off
|
|
647
|
+
with `communication: false`.
|
|
648
|
+
2. From a checkout that has the plugin in its app config, run
|
|
649
|
+
`eas credentials --platform ios`, pick the **production** profile, then
|
|
650
|
+
**Build Credentials** → **All: Set up all the required credentials to
|
|
651
|
+
build your project**. EAS makes the extension's provisioning profile
|
|
652
|
+
(and the app's, if missing) with that capability.
|
|
653
|
+
|
|
654
|
+
After that, EAS Build reuses the profiles. A local `expo run:ios` on a
|
|
655
|
+
device needs an Apple team (`ios.appleTeamId`) that can sign both.
|
|
630
656
|
|
|
631
657
|
**The payload contract.** The sender sets `mutableContent: true`, or the
|
|
632
658
|
extension never runs. `richPushMessage(message, { image, senderAvatar })`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marktiderman/genesis-native",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -76,10 +76,10 @@
|
|
|
76
76
|
"README.md"
|
|
77
77
|
],
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@marktiderman/genesis-core": "^1.
|
|
79
|
+
"@marktiderman/genesis-core": "^1.10.0",
|
|
80
80
|
"@marktiderman/genesis-design-system": "^1.5.0",
|
|
81
|
-
"@marktiderman/genesis-features": "^0.4.
|
|
82
|
-
"@marktiderman/genesis-ui-native": "^2.
|
|
81
|
+
"@marktiderman/genesis-features": "^0.4.1",
|
|
82
|
+
"@marktiderman/genesis-ui-native": "^2.5.0"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"@tanstack/query-async-storage-persister": "^5.0.0",
|