After spending an afternoon and nearly 6 gigabytes of traffic, Xcode 10 is finally loaded and happy.

Our company’s network really can not bear to ridicule, usually work is even hot in the pain of work, do you understand…

The installation is followed by a variety of pothole Tours.

After pod install is executed, Terminal displays a large number of error messages. The core message is as follows:

RuntimeError - [!]  Xcodeproj doesn't know about the following attributes {"inputFileListPaths"=>[], "outputFileListPaths"=>[]} for the 'PBXShellScriptBuildPhase' isa.
Copy the code

After a little Google search, I found that the project used Run Script Phase, and inputFileListPaths and outputFileListPaths are new attributes in Xcode 10. As a result, older versions of CocoaPods cannot parse. So, the best solution is to upgrade CocoaPods.

gem install cocoapods --pre
Copy the code

Error:

Unable to download data from https://gems.ruby-china.org - bad response Not Found 404 (https://gems.ruby-china.org/specs.4.8.gz)
Copy the code

I found the problem was that the gem source I used was Ruby China, but Ruby China changed the domain name due to the domain name registration problem, so the original domain name cannot be resolved (404). The following is the announcement on the original Ruby China website:

Due to domain name registration problems, the.org domain name can no longer provide RubyGems mirror service, we provide.com instead of.org domain name, everything else remains the same!!

I have no choice but to change the source.

gem sources --add https://gems.ruby-china.com --remove https://gems.ruby-china.org
Copy the code

Install CocoaPods again

You don't have write permissions for the /usr/bin directory.
Copy the code

/usr/bin has no write permission. This is due to the rootless mechanism added after macOS 10.11, so files cannot be modified even with root permission. Finally, a solution was found online, which was to change the CocoaPods installation directory:

gem install cocoapods --pre -n /usr/local/bin
Copy the code

View the installation result:

Pod - version 1.6.0. Beta. 1Copy the code

At this point, CocoaPods is updated and ready to use in your project.