AppCode 2016.3 Help

CocoaPods Support

AppCode comes with the support for CocoaPods - an Objective-C library dependency manager. CocoaPods resolves dependencies between the various libraries you use and fetches the source code for the dependencies, thus helping you overcome most of the issues associated with using third party libraries.

With AppCode you can perform CocoaPods operations from the menu or context menu in the editor, when a pod file is opened.

On this page:

Prerequisites

In order to proceed with CocoaPods, you should have the Command Line Tools for Xcode installed. Open Xcode, from the main menu navigate to Xcode | Preferences | Downloads | Components. Then select Command Line Tools and click on either Install or Update.

CocoaPods gem operations

To install CocoaPods gem

  • On the main menu, choose Tools | CocoaPods | Install CocoaPod gem

To view available pods and their description

  • On the main menu, choose AppCode | Preferences | CocoaPods

The available pods are listed in the right pane. Scroll down to see all pods, and click on a selected pod to view its description which will be displayed in the lower pane.

To update CocoaPods gem

  • On the main menu, choose AppCode | Preferences | CocoaPods and click Update CocoaPods

To update CocoaPods local repositories

  • On the main menu, choose AppCode | Preferences | CocoaPods and click Update Repositories

Podfile operations

To create a Podfile

  • On the main menu, choose Tools | CocoaPods | Create Podfile

To open an existing Podfile

  • On the main menu, choose Tools | CocoaPods | Edit Podfile

To install a pod, do one of the following

  • On the main menu, choose Tools | CocoaPods | Install
  • If the Podfile is opened, from the context menu in the editor, choose CocoaPods | Install

To update a pod, do one of the following

  • On the main menu, choose Tools | CocoaPods | Update
  • If the Podfile is opened, from the context menu in the editor, choose CocoaPods | Update

Podfile coding assistance

While working on a Podfile content, you can take advantage of the following coding assistance features:

  • Syntax highlighting and error detection.
  • Completion of:
    • key functions names (pod, target, podspec, etc.)
    • pod arguments (names and versions of available pods)
    • target argument (names of available targets)
    • platform arguments (names and versions of available platforms)
  • On-the-fly inspections. AppCode warns you whenever it detects:
    • pods defined in the Podfile but not installed
    • pods installed but not defined in the Podfile
    • installed version of the pod differs from the version described in the Podfile
    • unknown pod (pod "ThereIsNoSuchPod")
    • unknown or invalid pod version in the Podfile
    • locally installed pods versions do match the description in the Manifest.lockfile
    • new version of a pod available. (Look at the right gutter for a notification, or press ⌘+F1 with the caret on the pod name)
  • Quick fixes can be applied in some cases. (Press ⌥⏎.)

See Also

Last modified: 28 March 2017