Weexpack creating projects, packaging Android and iOS

Source: Internet
Author: User

1: First to ensure that node.js the version is greater than 6.0 , or weexpack will be used to error (partially using the Es6 language, node version is too low support ES6)

All of the following commands are executed by the command line

2: Global Installationweexpack

NPM Install Weexpack-g

3: Build Weex Project

Weexpack Create project Name

Note: The project created by default does not contain iOS and Android engineering templates

4: Go to Project Root install dependency

NPM Install

at this time if you have other Weex items, you can run the normal web, you can copy all the files under the src file to paste the src file in this file, the package will be compiled into the APK
However, first look at the next android.config.json or ios.config.json specified Weex bundle file WeexBundle and change to your starter file index.js / main.js 之类的 5: Install application template Generation android or ios engineeringWeexpack platform add Android//android after execution is completed platformsfolder under Build androidFile directory Weexpack Platform add iOS//ios after execution is completed platformsfolder under Build iosFile directory 6: Pack apkWeexpack Run android-Note:information in ' Android.config.json ' or ' Ios.config.json '- ' AppName: ' generated apk installed app name- ' AppId: ' application_id package name- ' splashtext: ' Open the Welcome page above the display text- ' weexbundle: ' The specified Weex bundle file (in the form of file name and URL) The file name is loaded as a local file, The URL loads the bundle remotely if the bundle is specified locally. We file please put in the SRC directory. Weexpack run iOS//simulator runs Weexpack build Web//Build IPA Package Build package, you will be prompted to enter codesign (certificate)
, Profile (provisioning profiles), AppId, can only be successfully packaged by entering the actual information. The rest, such as appname, and portal Weex bundle files can be edited under the project directory under the Ios.config.json configuration. After the successful completion of the package, you can obtain the IPA file in the/playground/build/ipa_build/directory
Note: The certificate needs to be pre-installed into keychain, right-click in the keychain to obtain the Certificate ID (certificate name), provisioning profile (mobileprovision) need to get UUID, enter the directory You can see the mobileprovision_uuid.sh file, this file can be obtained to uuid*
Mobileprovision_uuid.sh usage is as follows: $./mobileprovision_uuid.sh *mobileprovision
Parameter (*mobileprovision) is the provisioning profile file path 7:HTML5 PackagingWeexpack build Web so you can upload your packaged resources to a CDN server and then go online with your Web project. Weexpack Run web


Weexpack creating projects, packaging Android and iOS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.