How to use IOS under Podfile

Source: Internet
Author: User

Configure Podlist

PodIs the IOS under the Package management tool, similar to JavaScript npm or yarn .

Create Podfile

PodfileThere are two ways of creating:

    • Open Terminal, in the root directory of the IOS project, to performtouch Podfile
      Or
    • Open Terminal, in the root directory of the IOS project, to performpod init
Configuration Podfile

A simplePodfile

target ‘MyApp‘pod ‘AFNetworking‘, ‘~>3.0.4‘  # AFNetworking 版本必须 >=3.0.4 并且 <3.1.0

A complexPodfile

Platform: iOS,' 9.0 '# Specify platform and version inhibit_all_warnings!# Global Suppress warning target' MyApp 'Do# Pods for Myapppod' Fabric ',' ~>1.6.0 '# Fabric version must be >=1.6.0 and <1.7.0pod' Objectivesugar ', ' >=1.0.0 ' # Objectivesugar version must >=1.0.0pod ' afnetworking ',' <=4.0 '  # afnetworking version must <=4.0 # Pods for testing target ' myapptests ' do # myapptests directory Reference inherit! : search_paths End # Pods for testing target ' myappuitests ' do # myappuitests directory Reference inherit! : search_paths endEnd               
Install dependent packages

Note: To turn off Xcode first, you will not be able to generate Podfile.lock and xxx.xcworkspace files properly

Open Terminal, in the root directory of the IOS project, to performpod install

Reference documents

    • http://www.jianshu.com/p/8af475c4f717
    • Http://www.devzhang.com/14557860422170.html

You are welcome to help error correction, together to help more people. Learn to exchange react, QQ Group: 413381701

Starting from: https://github.com/Kennytian/learning-react-native

How to use IOS under Podfile

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.