Skip to content

Update mobile template for native host 0.3 upgrade flow - #436

Merged
Ameya Apte (ameyaapte1) merged 4 commits into
mainfrom
users/amapte/mobile_template_upgrade_1808
Aug 18, 2026
Merged

Update mobile template for native host 0.3 upgrade flow#436
Ameya Apte (ameyaapte1) merged 4 commits into
mainfrom
users/amapte/mobile_template_upgrade_1808

Conversation

@ameyaapte1

Copy link
Copy Markdown
Contributor

Summary
This PR updates the mobile-apps template for the newer Power Apps native host and moves template version metadata into app.json.

Key changes:

  • Upgrades template dependencies:
    • @microsoft/power-apps-native-host to ^0.3.0
    • @microsoft/power-apps-native-offline to ^0.1.32
  • Adds app.json with expo.extra.powerappsNative metadata, replacing the deleted .powerapps-native/version.json file.
  • Wires optional offline-profile.json loading into the root PowerAppsProvider.
  • Wraps Metro middleware with withPowerNativeMetroLogging while preserving the existing /__pawrap_verify endpoint.
  • Adds the adaptive icon asset required by the newer template shape.
  • Updates customization guidance to treat expo.extra.powerappsNative as the upgrade/version source of truth.
  • Updates plugin and template README docs:
    • Node.js requirement is now 24 LTS.
    • Adds required Power Platform API delegated permissions for the Entra app registration.
    • Updates upgrade-template docs to reference app.json metadata.
    • Adds manual migration guidance for moving app/ and src/ into a fresh template.

Notes
This is a breaking template update, existing users need to migrate to the new template manually

Copilot AI lite review requested due to automatic review settings August 18, 2026 04:26
@ameyaapte1
Ameya Apte (ameyaapte1) requested a review from a team as a code owner August 18, 2026 04:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the plugins/mobile-apps Expo template to align with the newer Power Apps native host (0.3.x), relocates template version/upgrade metadata into app.json, and refreshes docs to reflect the new upgrade and migration expectations for existing consumers.

Changes:

  • Bumps template dependencies to @microsoft/power-apps-native-host@^0.3.0 and @microsoft/power-apps-native-offline@^0.1.32.
  • Introduces app.json (with expo.extra.powerappsNative) and removes .powerapps-native/version.json as the template upgrade/version source of truth.
  • Updates Metro middleware to wrap with withPowerNativeMetroLogging while preserving the /__pawrap_verify endpoint; updates docs (Node 24 LTS, permissions guidance, manual migration steps).

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
plugins/mobile-apps/template/README.md Updates template docs for Node 24, version metadata location, required permissions, and manual migration guidance.
plugins/mobile-apps/template/package.json Upgrades native host/offline dependencies for the 0.3 template.
plugins/mobile-apps/template/metro.config.js Wraps Metro middleware with withPowerNativeMetroLogging while keeping /__pawrap_verify.
plugins/mobile-apps/template/CUSTOMIZATION.md Updates customization guidance to treat app.json metadata as upgrade source of truth.
plugins/mobile-apps/template/app/_layout.tsx Wires offlineProfile into PowerAppsProvider (intended optional load).
plugins/mobile-apps/template/app.json Adds expo.extra.powerappsNative (and related extra keys) as template metadata store.
plugins/mobile-apps/template/.powerapps-native/version.json Removes the previous version metadata file.
plugins/mobile-apps/README.md Mirrors documentation updates for Node 24, permissions guidance, and manual migration steps.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread plugins/mobile-apps/template/app/_layout.tsx
Comment thread plugins/mobile-apps/template/README.md Outdated
Comment thread plugins/mobile-apps/README.md
Copilot AI review requested due to automatic review settings August 18, 2026 04:30
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

plugins/mobile-apps/template/app/_layout.tsx:24

  • offline-profile.json is intended to be optional, but require('../offline-profile.json') uses a static string literal. Metro resolves require() calls at bundle time, so if offline-profile.json is absent (it is not present in the template directory), bundling will fail even though the call is wrapped in try/catch. To keep the profile optional, ensure the file always exists (e.g., add a stub offline-profile.json in the template / scaffold step) or switch to a loading mechanism that doesn’t require Metro to resolve a missing module.
let offlineProfile: Record<string, unknown> | undefined;
try {
  offlineProfile = require('../offline-profile.json') as Record<string, unknown>;
} catch (error: unknown) {
  if (!isMissingOfflineProfile(error)) throw error;

Comment thread plugins/mobile-apps/template/.gitignore
@ameyaapte1
Ameya Apte (ameyaapte1) enabled auto-merge (squash) August 18, 2026 04:43
@ameyaapte1
Ameya Apte (ameyaapte1) merged commit 051c279 into main Aug 18, 2026
3 checks passed
@ameyaapte1
Ameya Apte (ameyaapte1) deleted the users/amapte/mobile_template_upgrade_1808 branch August 18, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants