This document describes how to store CocoaPods artifacts in CODING-AR for centralized artifact management and version control. The following sections introduce how to create an artifact, configure authentication, and pull and push artifacts.
Open CODING-AR
1. Log in to the CODING Console and click Use Now to go to CODING page.
2. Click in the upper-right corner to open the project list page and click a project icon to open the project. 3. In the menu on the left, click Artifact Management.
Preparations
Note:
Before you begin:
Install CocoaPods.
Select CocoaPods as the repository type.
Install CocoaPods
Run either of the following commands to install CocoaPods.
$ sudo gem install cocoapods
-- or
$ brew install cocoapods
Create a Demo Project
This section describes how to quickly create a demo CocoaPods artifact. You can skip this section if you are familiar with CocoaPods artifacts.
Run the following command in a directory and select a template as needed when asked.
pod lib create <custom pod name>
The sample CocoaPods code will be cloned from GitHub to your local machine.
Install the CODING CocoaPods plugin.
sudo gem install cocoapods-coding-ar
You can select manual or automatic configuration. Automatic configuration is used in the following example. Click Generate configuration from access token in "Guide". A personal token will be generated as your access credential. You can manage your personal token in Personal Account Settings > Access Token.
Copy the commands to your ~/.netrc
file. If this file does not exist, run vim ~/.netrc
to create it and then copy the commands.
Push an Artifact
Run the commands in the guide.
Pull an Artifact
Pull a specific CocoaPods artifact by referring to the specific guide.
1. Modify the Podfile.
source '<repository URL in the guide>'
target 'MyApp' do
pod '<Artifact Name>', '~> <Version>'
end
2. Run the pull command.
Was this page helpful?