Weex launching the iOS simulator

Source: Internet
Author: User

Prerequisites Required for installation

Node

Npm

Weex-toolkit

CocoaPods

1. Create a Weex project

Weex Create Hellowolrd

2. Go to Hellowolrd folder installation dependency, I use CNPM install the words will error, here is best with NPM install

NPM Install

3. Add an iOS app

Weex Platfrom Add iOS

4. To the Platforms/ios directory for iOS Engineering with Cocoapods installed third-party dependencies, here iOS project needs to install the dependencies can open the iOS directory of the Podfile file view, as follows

  

OK, next use pod command to install these dependencies, CD to iOS directory, pod install, if you want to install the Cocoapods,ios development is familiar with it, this online has a lot of tutorials. Also, if the pod library is not updated for a long time, it is likely that the installation will fail because the new version of Weex-related libraries cannot be found, and build Justice pod setup,pod update updates the library. This is best to turn over-wall operation, otherwise it will wait for a long time. If you have previously updated the pod, it will be quicker to install using pod install--no-repo-update. Install it as follows:

  

5. Go back to the Weex root directory and launch the iOS emulator

Weex Run iOS

This line of command, will first start the Weex Webpack service, that is, it opens in the browser, but also pop up another command line, display the blue Word, as follows.

= = would start IOS app

= pod Update

  Just wait a moment and then come out and choose the simulator interface, as follows

  

6. I chose a iphonex simulator, like after startup, and on the PC on the browser to display the same content

  

Weex launching the iOS simulator

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.