Skip to content

Conversation

@weitingsun
Copy link
Contributor

@weitingsun weitingsun commented Dec 22, 2025

Description

Add RC and Production EAS certificates

Changelog

CHANGELOG entry: Added RC and Production EAS certificates

Related issues

Fixes: #23448

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Introduces environment-driven OTA code signing and production channel support.

  • Adds certs/production.certificate.pem and certs/rc.certificate.pem; keeps certs/exp.certificate.pem
  • app.config.js: selects updates.codeSigningCertificate and codeSigningMetadata.keyid via METAMASK_ENVIRONMENT (fallback to exp); removes hardcoded request headers
  • scripts/update-expo-channel.js: adds production to CONFIG_MAP; derives OTA env (production/rc/exp) and loads matching cert/keyid; writes code-signing certificate and metadata to Android (AndroidManifest.xml) and iOS (Expo.plist); continues setting channel, runtimeVersion, update URL, check policy, and launch wait
  • General refactors: path constants formatting and safer missing-cert handling

Written by Cursor Bugbot for commit 4edfcde. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-mobile-platform Mobile Platform team label Dec 22, 2025
@weitingsun weitingsun marked this pull request as ready for review January 5, 2026 15:50
@weitingsun weitingsun requested a review from a team as a code owner January 5, 2026 15:50
@weitingsun weitingsun self-assigned this Jan 5, 2026
@github-actions github-actions bot added size-M and removed size-S labels Jan 5, 2026
app.config.js Outdated
// - "production" and "rc" use their own certificates
// - all other environments (exp, dev, test, e2e, beta, etc.) fall back to "exp"
const OTA_ENV_SOURCE = process.env.METAMASK_ENVIRONMENT;
const OTA_ENV =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably cleaner to have an object that maps to the correct values instead. It'll make it a little easier to read and to manage in case environment requirements change

@weitingsun weitingsun requested a review from Cal-L January 5, 2026 17:09
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

The changes are purely build-time configuration changes for Expo OTA (Over-The-Air) updates:

  1. app.config.js: Modified to support environment-specific code signing certificates for OTA updates. This is a build configuration file that determines which certificate to use based on METAMASK_ENVIRONMENT.

  2. certs/*.certificate.pem (3 new files): Added new code signing certificates for exp, production, and rc environments. These are static certificate files used during the build process.

  3. scripts/update-expo-channel.js: Updated the build script to support environment-specific certificates and added production environment configuration.

These changes:

  • Are build-time/deployment infrastructure changes, not runtime app code
  • Don't modify any app functionality, UI, or user-facing features
  • Don't touch any controllers, Engine, or core app modules
  • Are specifically about code signing for OTA updates (a deployment concern)
  • Don't affect how the app behaves once built and running

Since E2E tests verify runtime app behavior and these changes only affect the build/deployment pipeline for OTA updates, no E2E tests are necessary to validate these changes.

View GitHub Actions results

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 5, 2026

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@weitingsun weitingsun added this pull request to the merge queue Jan 6, 2026
Merged via the queue into main with commit e23e3e1 Jan 6, 2026
92 checks passed
@weitingsun weitingsun deleted the wsun/add-eas-production-cert branch January 6, 2026 17:58
@github-actions github-actions bot locked and limited conversation to collaborators Jan 6, 2026
@metamaskbot metamaskbot added the release-7.62.0 Issue or pull request that will be included in release 7.62.0 label Jan 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.62.0 Issue or pull request that will be included in release 7.62.0 size-M team-mobile-platform Mobile Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OTA updates production: Enable EAS updates on production

5 participants