# Officially build the first App

Refer to the previous documentExperience multiple applications quicklyAchievable based on theMobile App AssistantQuickly experience the ability to convert Mini programs to App According to the text operation, the Mini Program can be built in minutes through the WeChat developer tool. App Install the package and install the application to the phone for real debugging.

# 1. Download and install Weixin DevTools

Download and install supportMultiterminal application modeOf the developer tools, the corresponding version requirements are as follows:

  • Version number 1.06.2306272 ofDevelopment Developer Tools(It is recommended to use the latest developer tools for multi-terminal application development and debugging)

# II. Creating multi-terminal applications and binding Mini Programs

  • Route 1 : In the WeChat Developer Tool, switch the development mode and drop down the selection.Multiterminal application modeIf it is not bound, scan the code to create a multiterminal and bind the Mini Program
  • Route 2 : In the WeChat developer tool, in the menu bar - tool - Upgrade to multi-terminal project, if not bound then scan code to create multi-terminal and binding Mini Program can be
  • Route 3 : Go to dev.weixin.qq.com Creating space - Creating Multiterminal Applications - Binding Mini Program account

# III. Upgrading Small Program Projects to Multiterminal Projects

In the above steps, the Mini Program account has been bound to the multi-terminal application. At this time, you can go to the WeChat developer tool to switch the Mini Program mode to the multi-terminal application mode.

  • After upgrading the Mini Program to a multi-terminal project, it does not affect the Mini Program project, nor does it account for the volume of the Mini Program code package.
  • This upgrade is just a new addition.project.miniapp.json and app.project.miniapp.json, as well as in theproject.config.jsonAdded in.projectArchitectureFor tagging multiterminal frames
  • That is, delete the above content can be restored to the original Mini Program items

# 4. Running in a simulator or a real machine

  • In the toolbar, select theversionThen choose to run the simulator or the real machine, and then click run
  • supplement 1 , if you want to run on the simulator, you need to refer to the documentationRunning in the simulatorInstall the simulator
  • supplement If you need to run on the real machine, you need to connect the phone through the data cable, and then refer to the documentation.Running on the real machineMake use of

# V. wx.login adaptation

  • Because in the Mini Program project is through the wx.login To be logged in, and the business is done through the Openid As the unique id of the user's identity, howeverwx.loginin App Mode is not available, but the first step of the business logic of the Mini Program depends on obtaining the user's identity before subsequent other operations. Therefore, the need for wx.login Make the adaptation.
  • Developers can use it in multiterminal modewx.getMiniProgramCodereplace wx.login, so as to achieve without modifying the Mini Program background code logic can be achieved wx.loginCompatibility, details can be found.Quick Access Mini Program Login Service

# VI. Compatible handling of more interfaces and components

# VII. Build the official version of the installation package

  • In order to facilitate developers to quickly experience the effect of building Mini Programs into multi-terminal applications, the platform defaults to the developer's application configuration beta Package Name(Android Platform) as well as the beta version of the Bundle ID(iOS Platform)
  • Build the development version of the IPA or APK Only available for testing experience, not for the app marketIf the developer needs to build a full version of the installation package for submission to the application market for review, it is necessary to configure the official multi-terminal application Package Name and Bundle ID, the relevant documentation is as follows:
  • iOS Bundle ID and Android Once the package name is configured, you can rebuild it in the developer tools APK and IPA
    • In the toolbar, clickto construct - Package generation IPAor to construct - Package generation APK
    • Go to the cloud build panel, complete the relevant information configuration, clickdetermineCan be constructed IPA or APK
    • More operational details can be viewedPackage generation IPAandPackage generation APK

# VIII. Before the Application Market checklist

Other Instructions: If you have problems, you can go tocommunityFeedback, or contactLittle helperJoin the official technical exchange group for feedback