Use Cordova to pack IOS apps and problems with Mac

Source: Internet
Author: User

    1. Install Cordova

      sudo npm install Cordova

    2. Create a project

      Create a demo folder Inside automatically loading basic files and directories

      Cordova Create demo Com.test.demo demo

    3. Copy the Web project to the Demo/www directory

    4. Prepare

      $ npm install-g Ios-sim $ npm install-g ios-deploy

      Install both plug-ins, parameter-G is a global installation.

    5.  

      Add platform
      Switch to the demo directory because the demo project already has Cordova Android Environment
      Just add the iOS platform.
      Cordova Platform add iOS

    6. Build
      cordova build iOS

    7. Run
      cordova run iOS

    8. remove
      cordova Plateform rm iOS

    9. Note: If you need to set up trust to open the app in ios9+ system: Settings-profile-corresponding AppID select Trust
    10. simultaneously in, iOS9, You may encounter an issue where data cannot be requested because IOS9: the network that is accessed within the

      app must use the HTTPS protocol. Most of our current requests still use the HTTP protocol.

      So the simplest way is to fallback the HTTP protocol.

Solution: Add an app Transport Security Settings to the plist file, and add a item:allow Arbitray loads set to Yes at the bottom

  

Official Document: Http://cordova.apache.org/docs/en/5.1.1/guide/cli/index.html#link-2

Cordova.apache.org/docs

Use Cordova to pack IOS apps and problems with Mac

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.