# Build an AR app with the WeChat Mini Program template

The Mini Program integration uses XR-FRAME for local tracking and 01Spatial for an absolute camera pose in map coordinates. Persistent Content remains under a map root aligned to the current trackerSpace.

Enable the required Mini Program camera/XR capabilities and HTTPS domains, and prepare a Ready Map Key or Project Key, an API Key, and a confirmed Origin. Use one `scene.ar.getARRawData()` result for the image, intrinsics, `viewMatrix`, and camera-to-trackerSpace transform. Do not substitute a screenshot or unrelated camera stream.

Copy the synchronized sample before encoding. After a trusted response, use the sample corresponding to `poses[0].image`, ensure that the XR session has not reset, and update `mapRoot` rather than the XR camera. See [Localization API & AR integration](/tutorials/localization/localization-api) for the request and coordinate contract.

Before release, test domain routing, background/session resets, stale-response cancellation, credential handling, and both supported Android and iOS WeChat versions.
