Skip to content

Desktop: remove hardcoded prod Firebase, use dev config for dev builds #5536

@beastoin

Description

@beastoin

GoogleService-Info-Dev.plist and AuthService.swift hardcode prod Firebase (based-hardware). Dev builds should use dev Firebase (based-hardware-dev) so local backend testing works with dev credentials.

Current Behavior

  • GoogleService-Info-Dev.plist points to based-hardware (prod) — same as prod plist
  • AuthService.swift:87 hardcodes prod API key AIzaSyD9dzBdglc7IO9pPDIOvqnCoTis_xKkkC8
  • Dev builds authenticate against prod Firebase, making local backend testing with dev credentials impossible

Expected Behavior

Dev builds (./run.sh / Omi Dev.app) use based-hardware-dev Firebase project. Prod builds use based-hardware.

Affected Areas

File Line Description
desktop/Desktop/Sources/GoogleService-Info-Dev.plist 12,20,22 API_KEY, PROJECT_ID, STORAGE_BUCKET all prod values
desktop/Desktop/Sources/AuthService.swift 87 Hardcoded firebaseApiKey (prod)

Solution

  1. GoogleService-Info-Dev.plist — update to dev values:

    • API_KEY: AIzaSyBK-G7KmEoC72mR10gmQyb2NFBbZyDvcqM
    • PROJECT_ID: based-hardware-dev
    • STORAGE_BUCKET: based-hardware-dev.firebasestorage.app
    • GCM_SENDER_ID: 1031333818730
    • GOOGLE_APP_ID: 1:1031333818730:ios:3bea63d8e4f41dbfafb513
  2. AuthService.swift — read API_KEY from the active GoogleService-Info plist at runtime instead of hardcoding. Dev builds load GoogleService-Info-Dev.plist, prod builds load GoogleService-Info.plist.

Files to Modify

  • desktop/Desktop/Sources/GoogleService-Info-Dev.plist
  • desktop/Desktop/Sources/AuthService.swift

Impact

None on prod — GoogleService-Info.plist (prod) unchanged. Only dev builds affected.


by AI for @beastoin

Metadata

Metadata

Assignees

No one assigned

    Labels

    desktopp2Priority: Important (score 14-21)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions