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
# Description
Part 3 of 4 in the RN example-app overhaul chain for
[MAGE-464](https://linear.app/klaviyo/issue/MAGE-464). Wires up
native-level Firebase push integration on both iOS and Android using the
JS-first init pattern. Both platforms compile and launch cleanly without
Firebase configured (push features are disabled in that mode); full push
flow lights up end-to-end when a Firebase config file is present.
## Due Diligence
- [x] I have tested this on a simulator/emulator or a physical device,
on iOS and Android (if applicable).
- [ ] I have added sufficient unit/integration tests of my changes.
- [ ] I have adjusted or added new test cases to team test docs, if
applicable.
- [x] I am confident these changes are implemented with feature parity
across iOS and Android (if applicable).
## Release/Versioning Considerations
- [x] `Patch` Contains internal changes or backwards-compatible bug
fixes.
- [ ] `Minor` Contains changes to the public API.
- [ ] `Major` Contains **breaking** changes.
- [ ] Contains readme or migration guide changes.
- [ ] This is planned work for an upcoming release.
## Changelog / Code Overview
### iOS
| File | Change |
|------|--------|
| `AppDelegate.mm` | Call `[FIRApp configure]` on launch (unconditional
— stub plist is the zero-config default, documented in #346); preserve
UN delegate, deep-link, universal-link, and silent-push handlers; retain
`getLaunchOptionsWithURL` helper for RN #32350 cold-start workaround;
keep native-init reference block commented |
| `Podfile` | `$RNFirebaseAsStaticFramework = true` so RNFirebase links
cleanly under `use_frameworks!` |
| `Info.plist` | `UIBackgroundModes = [location, remote-notification]`;
location usage strings; URL scheme registration |
| `*.entitlements` | `aps-environment = development`, wired via
`CODE_SIGN_ENTITLEMENTS` |
| `project.pbxproj` | Bundle id normalized to
`com.klaviyoreactnativesdkexample` (matches Firebase app id and Android
`applicationId`); `GoogleService-Info.plist` file reference added so
it's bundled when integrators drop it in |
| `.github/workflows/ios-build.yml` | Stub `GoogleService-Info.plist`
step so CI builds succeed without a real Firebase project (format-valid
values so `FirebaseApp.configure()` succeeds at launch; benign
backend-registration warning at runtime) |
### Android
| File | Change |
|------|--------|
| `gradle.properties`, `local.properties.template`, `app/build.gradle` |
Remove dead `initializeKlaviyoFromNative` / `publicApiKey` /
`useNativeFirebase` gradle→BuildConfig plumbing (nothing reads it) |
| `app/build.gradle` | Conditionally apply
`com.google.gms.google-services` plugin on the presence of
`app/google-services.json` — clean build without push configured |
| `MainApplication.kt` | Commented reference block for native init;
primary path stays in JS |
## Test Plan
- [x] iOS: build with stub `GoogleService-Info.plist` (values documented
in #346) — app launches, push section shows "Firebase not configured" UI
- [x] iOS: build with real plist — `[FIRApp configure]` runs, permission
request works (see known sim caveat below)
- [x] Android: clean build without `google-services.json` — gms plugin
not applied, app launches, push section shows "Firebase not configured"
UI
- [x] Android: clean build with real `google-services.json` — gms plugin
applies, Firebase init succeeds, token populates
### Known iOS simulator caveat
Apple has a documented regression on iOS 26.0 / 26.2 simulators where
`didRegisterForRemoteNotificationsWithDeviceToken:` never fires
(FB19400926, FB19404213; matches
[rnfirebase/#8937](invertase/react-native-firebase#8937)).
APNs token fetching works correctly on physical devices and iOS 18.x
simulators. Setup is correct — Apple's sim is broken.
## Related Issues/Tickets
Part of [MAGE-464](https://linear.app/klaviyo/issue/MAGE-464)
**Chained PR series:**
1. theme + components (merged in #342)
2. JS layer: permission helpers, hooks, app shell (merged in #343)
3. **This PR** — native platform setup (iOS + Android Firebase push)
4. docs — #346
Also stacked alongside: #347 (CI Play Store publish workflow, branched
off this PR).
Follow-up: [MAGE-534](https://linear.app/klaviyo/issue/MAGE-534) —
convert `AppDelegate.mm` to pure Swift.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
0 commit comments