Commit 2392e61
feat(example): rebuild app with sectioned UI, JS-first init, API coverage
Replace the legacy button-wall demo with an interactive, sectioned example
that covers the full Klaviyo SDK public API surface and initializes the SDK
from JavaScript instead of native code.
- App.tsx: SectionList layout with Profile / Events / Forms / Geofencing /
Push / Deep Links sections
- Profile section: External ID / Email / Phone inputs with individual set
buttons, plus a collapsible "Additional Attributes" accordion for
first/last name, title, organization and a "Location" accordion for
city/country/zip/lat/long, aggregate Set Profile button, Reset Profile
- Events: test event + Viewed Product, both with value + uniqueId + custom
properties
- Push: Firebase-backed permission request, Set Push Token, Set Badge Count
(iOS-only, with number input)
- Forms: explicit Register / Unregister
- Geofencing: explicit Register / Unregister, Get Current Geofences modal
- Deep link handling via Klaviyo.handleUniversalTrackingLink in a Linking
useEffect with a proper cleanup
- Env loading migrated to react-native-dotenv (.env + .env.example) with a
typed @env declaration — no more try/require gymnastics
- index.js registers a Firebase background message handler before
AppRegistry as required by @react-native-firebase/messaging
- Bumps @react-native-firebase/app and /messaging to ^24.0.0 for RN 0.81
bridgeless compatibility; adds react-native-dotenv dev dep
- Drops legacy AppViewInterface, KlaviyoReactWrapper, RandomGenerators
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent a7531e4 commit 2392e61
11 files changed
Lines changed: 1276 additions & 677 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
83 | 86 | | |
84 | 87 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
10 | 23 | | |
11 | 24 | | |
12 | 25 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
5 | 20 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | | - | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
0 commit comments