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