mirror of
https://github.com/stablyai/orca.git
synced 2026-09-21 16:02:20 +00:00
* Restore mobile push for delivery validation * fix(mobile): register push task before headless startup * Add authenticated mobile push test and fix iOS release entitlements * Mock push-test transport in notification consent tests * Fix slept workspace test for structured remount result * Fix mobile notification review findings * Pad Android notification icon to prevent square cropping * fix(mobile): present visible Android data pushes in foreground * test: use deterministic clock for teardown deadline * fix(mobile): present foreground pushes through Expo public APIs * fix(mobile): check push eligibility before foreground scheduling * fix(mobile): register push from shared host connection lifecycle
33 lines
1.3 KiB
JavaScript
33 lines
1.3 KiB
JavaScript
// Why this file exists: a bare "expo-notifications" plugin entry writes
|
|
// `aps-environment: development` into the iOS entitlements, while push-token.ts
|
|
// reports `production` for every non-__DEV__ build. A TestFlight or App Store build
|
|
// would then register a production APNs token against a sandbox entitlement, and the
|
|
// gateway's pushes would be accepted by Apple and delivered nowhere. Deriving the
|
|
// mode from an env var the release workflow sets makes the two agree by construction
|
|
// instead of relying on the export step to rewrite the entitlement.
|
|
//
|
|
// app.json stays the source for everything else: Expo reads it first and hands it to
|
|
// this function, so the fastlane version/buildNumber rewrite still flows through.
|
|
const APS_ENVIRONMENT =
|
|
process.env.ORCA_IOS_APS_ENVIRONMENT === 'production' ? 'production' : 'development'
|
|
|
|
module.exports = ({ config }) => ({
|
|
...config,
|
|
ios: {
|
|
...config.ios,
|
|
entitlements: { ...config.ios?.entitlements, 'aps-environment': APS_ENVIRONMENT }
|
|
},
|
|
plugins: (config.plugins ?? []).map((plugin) =>
|
|
plugin === 'expo-notifications'
|
|
? [
|
|
'expo-notifications',
|
|
{
|
|
enableBackgroundRemoteNotifications: true,
|
|
mode: APS_ENVIRONMENT,
|
|
icon: './assets/notification-icon.png'
|
|
}
|
|
]
|
|
: plugin
|
|
)
|
|
})
|