This guide hopes to help testers quickly understand Mini Programs, understand the related concepts of Mini Programs, and locate and troubleshoot problems.

Learning Content

Mini Program Documentation

More detailed mini-program documentation can be jumped to: Smart Mini-Program Documentation

Smart MiniApp

The Smart MiniApp can be understood as Tuya providing a development framework for developers. Developers can develop services with native app experience according to the prescribed grammar and framework rules, and run them into various apps in Tuya ecosystem.

The advantages of mini programs are:

Developer Platform

The developer platform is a platform for managing small programs. On this platform, you can perform version management, code scanning experience, permission management, and multi-language configuration for small programs.

Before entering the testing process, the developer must have created the corresponding Miniapp project on the platform, and the tester can ask the developer to add himself in the developer platform - member management, and share the existing project with him.

**The developer platform can also generate an experience QR code, and testers scan the experience QR code through the App to evoke the Miniapp. **

More detailed operating instructions for the developer platform: Smart Mini Program Documentation - Developer Platform

Compared with the normal testing process, the difference between Miniapp testing is that the app scans the experience QR code generated by the developer platform to evoke and enter the Miniapp page.

Refer to the next section to experience the process of using the QR code.

App installation

The tester first needs to find the client personnel to get the App installation package to be tested. The client personnel need to ensure that the App integrates the Miniapp capabilities, and the basic library version and the Kit package version are compatible with the current Miniapp to be scanned.

Become a project member and join the whitelist

Developers are required to add tester accounts in Developer Platform - Member Management, so that testers can find Mini Program items under their account list.

At the same time, it is also necessary to let the developer configure the "Traffic Management" correctly, and add the tester account to the "Whitelist".

The specific process reference document: [Developer Platform - Experience QR Code](https://developer.tuya.com/miniapp/guide/platform#%E4%BD%93%E9%AA%8C%E4%BA %8C%E7%BB%B4%E7%A0%81).

Generate experience QR code

  1. In Developer Platform - Version Management, set the version to be tested as the trial version.
  2. Click the "Experience QR Code" button.
  3. Configure the QR code information, you can specify the Miniapp to automatically enter a certain page. You can also configure nothing, just click OK.
  4. Scan the experience QR code.

Basic library

The basic library is responsible for the loading container of the Miniapp framework, and provides standard components and some JS API interfaces required by the Miniapp framework.

Kit Package

The client divides the provided device capabilities and basic business capabilities into different Kit packages, and provides them to Mini Programs, RN, H5, etc. through plug-ins.

Detailed description of TTT capabilities.

Basic library and client

Different versions of client apps will be bound with some basic library versions. When the app invokes the Miniapp, it will compare the basic library version bound by the app with the basic library version of the Miniapp. If it is backward compatible, the Miniapp can be displayed, otherwise an error will be reported.

E.g:

The uploaded Mini Program base library version is 2.0.22.

  1. If the basic library version bound by the client App v1.1 version is 2.0.20, which is lower than the basic library version of the Mini Program, an error will be reported and you will not be able to enter.
  2. If the basic library version bound by the client App v1.2 version is 2.0.26, which is higher than the basic library version of the Mini Program, it is backward compatible.

Kit package and client

The client app may integrate different types and versions of Kit packages, so when the app invokes the Miniapp, it will also check whether the app is compatible with the kit package required by the Miniapp.

E.g:

The uploaded Miniapp requires four Kit packages:

  1. If the client App v1.1 version integrates the Kit package only BaseKit, MiniKit, TYKit, and lacks IndustryKit, it will report an error and cannot enter.
  2. If the client App v1.3 version integrates BaseKit: 1.3.0 / MiniKit: 2.0.3 / TYKit: 1.5.1 / IndustryKit: 1.0.0, the Kit package types are covered, but the MiniKit 2.0.3 version If it is lower than MiniKit 2.0.5 specified by the Miniapp, it will report an error and cannot enter.
  3. If the client App v1.3 version integrates BaseKit: 1.3.0 / MiniKit: 2.0.5 / TYKit: 1.5.1 / IndustryKit: 1.0.0, all types of Kit packages are covered, and the version is higher than that specified by the Miniapp Kit package version is compatible and can be entered.

Before going online for approval, you need to correctly configure the domain name and request path.

For specific rules and configuration methods, please refer to: Online Audit