test-native-extension

Validates native extension repos across structural, manifest, contract, and PCF compile layers.

808|167|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/microsoft/power-platform-skills --skill test-native-extension
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-native-extension
Source: https://github.com/microsoft/power-platform-skills/tree/main/plugins/power-apps-mobile-extension/skills/test-native-extension
Command: npx skills add https://github.com/microsoft/power-platform-skills --skill test-native-extension

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Native extension repos for Power Apps mobile (.ppmplugin bundles) can fail late — at build time or on device — due to fixable structural mistakes like mismatched module names, missing manifest entries, or unsafe constructors. This Skill runs a fast, toolchain-free pre-flight validation so those errors surface in seconds before slow Gradle or xcodebuild compiles.

Core Features & Use Cases

  • Layered automated validation: Runs Layer 0 holistic contract cross-checks (native ↔ manifest ↔ PCF), Layer 1 native-source structure asserts (Android getName(), iOS +moduleName, @ReactMethod, load/init readiness), Layer 2 manifest.json validation against ppmplugin-format rules, Layer 3 request/response/error-code agreement, and Layer 4 PCF compile.
  • Crash-at-launch prevention: Hard-gates checks for ReactPackage no-arg constructors, iOS [cls new] instantiation, requiresMainQueueSetup, and non-throwing eager construction so launch-time crashes are caught before any build.
  • Use Case: After scaffolding a third-party native control with Android and iOS modules plus a PCF companion, run this Skill to confirm the routing key, method names, and error codes agree across all three artifacts before invoking /build-android-binary or /build-ios-binary.

Quick Start

Ask the agent to run the test-native-extension validation on the current native extension repo and report pass or fail per layer with fix hints.

Frequently Asked Questions about test-native-extension

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate a Power Apps native extension before building it?

Run the test-native-extension skill, which checks native-source structure, manifest.json conformance, and request/response/error-code agreement across Android, iOS, and the PCF in seconds. It stops on the first failure and prints a fix hint per layer.

What does the test-native-extension skill check in native modules?

It asserts Android modules extend ReactContextBaseJavaModule with a getName() matching the manifest, iOS modules declare RCTBridgeModule with a matching +moduleName, at least one exported method exists, and constructors cannot throw during eager load.

Does this skill compile the Android or iOS native code?

No. Native compilation into a DEX or framework belongs to /build-android-binary and /build-ios-binary. This skill is the structural pre-flight that runs with no toolchain; only the optional PCF layer runs npm run build.

Why does my Power Apps mobile app crash on launch after installing a plugin?

The usual cause is a plugin failing to load or a module throwing during eager construction, such as a ReactPackage without a public no-arg constructor or a bare Handler() on a Looper-less thread. Layer 1 hard-gates these checks.

Can I run the validation without a PCF companion scaffolded?

Yes. Layers 1 through 3 always run using only read and grep operations. The PCF compile layer and the manual device recipe are marked deferred until the PCF companion is generated.

What are the limitations of this structural validation?

It does not verify that native code compiles or runs correctly on device, and Layer 0 contract checks are warn-only heuristics. Real compiler errors surface in the build skills, and end-to-end behavior requires the manual device recipe in Layer 5.