Working tree is now the canonical repo. Off-chain play-money + trustless on-chain (FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution, mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4.5 KiB
Predikt Native — Firebase & Ship Setup
This is the SHIP note for the Predikt native app (Expo / React Native WebView
shell). Brand = Predikt, bundle id = com.predikt.app.
The repo intentionally contains no secrets and no foreign (Manifold) identifiers. Several values are placeholders you MUST replace before building/shipping. This document lists every one of them.
1. Firebase config (REQUIRED — not committed)
The Firebase config files contain live API keys and are therefore
gitignored and NOT in the repo. The previously committed files were
Manifold's live keys (project_id: oracle / dev-oracle,
package_name: com.markets.manifold) and have been removed.
You must create your own Predikt Firebase project and supply your own files.
Create the Firebase project
- Go to the Firebase console and create
a project (e.g.
predikt). Optionally create a second project for dev (e.g.predikt-dev). - Add an Android app with package name
com.predikt.appand download itsgoogle-services.json. - Add an iOS app with bundle id
com.predikt.appand download itsGoogleService-Info.plist.
Where to drop the files
Place them in the per-environment config dirs (these paths are gitignored):
configs/prod/google-services.json
configs/prod/GoogleService-Info.plist
configs/dev/google-services.json # dev project, or reuse prod
configs/dev/GoogleService-Info.plist
envscript.sh copies the correct set into place based on
NEXT_PUBLIC_FIREBASE_ENV (PROD vs anything else). Android reads
./google-services.json at the native root (via googleServicesFile in
app.config.js); iOS reads ios/Predikt/GoogleService-Info.plist.
envscript.shmust be run afternpx expo prebuild --clean, because theios/Predikt/directory only exists once prebuild has generated it.
2. Generated native dirs (ios/ and android/)
ios/ and android/ are prebuild-generated artifacts derived from
app.config.js + plugins/. They were removed (they carried the old
com.markets.manifold / manifold.markets / Manifold names and a stale EAS
update URL) and are now gitignored (/ios, /android).
Before building, always run:
npx expo prebuild --clean
This regenerates ios/ and android/ correctly from the fixed config
(com.predikt.app, predikt scheme, the real EAS_PROJECT_ID update URL,
and the real DOMAIN for deep links / associated domains). Do not commit the
generated dirs.
3. Placeholders to replace before shipping
| Placeholder | Where | How to set |
|---|---|---|
REPLACE_WITH_DOMAIN |
lib/config.ts, app.config.js (DOMAIN) |
Set env EXPO_PUBLIC_WEB_DOMAIN to the real Predikt web host (bare host, no scheme), e.g. predikt.app. Drives deep links + Apple/Android associated domains. |
EXPO_PUBLIC_WEB_URL |
consumed in lib/config.ts / App.tsx |
Must be set to the real Predikt web deployment origin (full origin + trailing slash, e.g. https://predikt.app/) for OTA / deep-links / the WebView to load the live site. If unset it falls back to https://<DOMAIN>/. |
REPLACE_WITH_EAS_OWNER |
app.config.js (owner) |
Set env EAS_OWNER to the Predikt EAS account/org that owns the project. (Was Manifold's iansp — removed.) |
REPLACE_WITH_EAS_PROJECT_ID |
app.config.js (EAS_PROJECT_ID) |
Run eas init, then set env EAS_PROJECT_ID to the generated UUID. Needed for push tokens and the OTA update URL. |
REPLACE_WITH_SENTRY_ORG |
app.config.js (Sentry plugin) |
Set to the Predikt Sentry org, or remove the Sentry plugin + sentry.properties + Sentry.init if error reporting isn't wired up. |
EXPO_PUBLIC_SENTRY_DSN |
App.tsx |
Set to the real Predikt Sentry DSN, or leave unset (Sentry no-ops). |
REPLACE_WITH_APP_STORE_URL |
common/src/envs/constants.ts (APPLE_APP_URL) |
Set to the real Predikt App Store listing once published. The Play URL already uses com.predikt.app. |
4. Ship checklist
- Create the Predikt Firebase project(s); drop config files into
configs/{dev,prod}/. eas init; setEAS_PROJECT_IDandEAS_OWNER.- Set
EXPO_PUBLIC_WEB_DOMAINandEXPO_PUBLIC_WEB_URLto the real Predikt web deployment. - (Optional) Set Sentry org + DSN, or strip Sentry.
- Replace
APPLE_APP_URLonce the App Store listing exists. npx expo prebuild --cleanto regenerateios/andandroid/.- Run
envscript.sh(via the existing build flow) to place the Firebase files. - Build with EAS.