Install the plugin management tool Alcatraz

1. Install the plug-in management tool Alcatraz:

a>Xcode plugin management tool Alcatraz-Dream One Piece-Blog Channel-CSDN.NET

b>After upgrading to Xcode7.2, there is a problem with the installation environment, you need to reconfigure and reinstall:

Xcode7.2 install Alcatraz
2. Example to install AFNetWorking:

3. Installation steps:

4. After the stand-alone Install Poads:

5. Note that after Xcod is upgraded to 7.0, you need to reconfigure the Ruby environment (upgrade ruby ​​environment). The following is the configuration URL: How to use CocoaPods-Brief Book. (Reconfigure Ruby environment)

6. When this problem occurs:

Summary of issues
need to enter in this location: / usr / bin

Then execute in the terminal:
sudo gem install -n /usr/local/bin cocoapods

7. After updating the ruby ​​environment, if you cannot find GEM_PATH, you need to restart the computer.

8. Update:

Reason for error:

The command path could not be resolved

Expanded GEM_PATH: /usr/bin

2016.6.14 update:

原因:一般找不到路径都是因为ruby环境版本太低,cocopoads插件版本太低导致,ruby路径问题或者是没有安装ruby环境。

解决方法:干掉你已经安装好的cocopoads插件,重新安装一次插件就好了,多安装几次cocopoads。

插件路径(移到废纸篓):

~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/

iOS solution is based on Alcatraz installation error solution

2016.6.14 update summary:

Due to re-upgrading xcode7.3.1 and reinstalling the system to the latest OSX 10.11.5 version in the past two days, I encountered a lot of problems, and found that the visual three-way import cannot run normally, so here is a summary of the terminal importing cocoapoads method:

注意:需要首先移除cocoapods、Alcatraz插件,为了防止插件冲突。(新cocoapods与旧的插件冲突)

1. Summary of problems encountered:

1. The original ruby ​​environment version is too low and needs to be upgraded again.

2. The cocoapods plug-in version is too low, causing it to fail to install.

3. Cocoapods cannot be installed because the gem version is too low.

4. Since the data source of cocoapods is blocked by the wall, the installation is unsuccessful because it cannot be overturned.

5. After upgrading to version 10.11, the installation command of cocoapods has changed.

Attach a picture of your own terminal command below:

Terminal command

2. Installation steps: (The system is version 10.11 or above)

Terminal command:

1. $ sudo gem uninstall cocoapods (移除原来的cocoapods)

2.$ sudo gem install -n/usr/local/bin cocoapods   (安装最新的cocoapods,最新命令行)

3.$ gem sources -l

4. 如果不是https://ruby.taobao.org/就更换为:

$ gem sources --remove https://rubygems.org/    (移除数据源)

$ gem sources -a https://ruby.taobao.org/             (更换数据源)   

$ gem sources -l                            (查看数据源)

5.$ pod install    (创建pod仓库)

Use the cocoapods command to create a podfile file:

1.$ cd 创建工程路径

2.$ touch Podfile  (创建一个podfile)

3.$ open -e Podfile (打开podfile文件)

4.$ pod install (运行)

3. Summary of the problem:

/Library/Ruby/Site/2.0.0/rubygems.rb:250:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException)

from /Library/Ruby/Site/2.0.0/rubygems.rb:278:in `activate_bin_path'

from /usr/local/bin/pod:22:in  '<main>'

As shown below:

Ruby environment version is low

Reason: The ruby ​​environment is too low.

Solution: (update gem)

$ sudo gem update --system

After the update, go back to the above steps and do it again.

Four, problem summary 2

1. After installing cocoapods, edit the podfile as follows:

pod 'AFNetworking','~> 3.1.0'

edit

2. The error is as follows:

Analyzing dependencies

[!] The dependency `AFNetworking (~> 3.1.0)` is not used in any concrete target

The pictures are as follows:

Error message

3. Reason of error:

Not the correct target.

4. Modification method: change the format in the podfile file as follows:

target 'aaaa' do     (aaaa为工程名,一定注意单引号 ‘ ’的特殊性,用xcode打开并且写出 ' ' ,格式不正确也不行)

pod 'AFNetworking', '~> 3.1.0'

end

5. Re-run the command line: $ pod install

Get it done

Guess you like

Origin blog.csdn.net/woruosuifenglang/article/details/54924479