Quick start for developing WeChat mini-program with image cloud recognition
This article will guide you through quickly developing an AR application based on EasyAR's image cloud recognition on WeChat mini-programs. Through this introduction, developers can learn how to integrate EasyAR's cloud recognition capabilities in the WeChat mini-program environment and use the XR-FRAME framework to build interactive AR experiences.
Development preparation
- WeChat Developer Tools.
- Obtain an "AppID (Mini Program ID)". If you don't have one, register a WeChat Official Account Platform account or apply for a test account.
- Download WeChat Developer Tools.
- An API Key that supports cloud recognition.
- A running cloud recognition library.
Upload cloud recognition image
Prepare a recognition image and upload it to the cloud recognition library. For the upload method, refer to Image library management.
Download sample
Download the "EasyAR CRS WeChat Mini Program Sample" from the EasyAR download page.

Configure sample
- Unzip the downloaded "EasyAR-miniprogram-WebAR-Demo-tracking.zip" to your directory.

- Import into WeChat Developer Tools.


- Under "Details" and "Local Settings," check "Do not verify legal domain names, web-view (business domain names), TLS versions, and HTTPS certificates."

- Preview effect in "WeChat Developer Tools."

- The sample code has reserved configuration items. Please configure according to the actual environment.

Effect preview
- Click "Preview" in "WeChat DevTools".
- Select "Start automatic preview on mobile".
- Click "Compile and preview"

Tip
Do not use "Real Device Debugging".
- Running effect on mobile.

- If you haven't added the domain to the legal request list, enable "Development Debugging". Enable as follows:

- If it is the first time running, click "Allow" to authorize camera access.

- Click "Cloud recognition function" in the preview page.

- Point your phone camera at the recognition image you uploaded, click "Click to recognize". If a target is recognized, the name of the recognized target will pop up.
