The SDK “iphoneOS” cannot be located

The pod should have been installed before Xcode agreed to the agreement.

The solution is

  1. Enter the following command to check for errors

    xcrun -k --sdk iphoneos --show-sdk-path
    Copy the code

    If the following appears, our XCode path is incorrect

    xcrun:_ error: SDK "iphoneos" cannot be located
    xcrun: error: SDK "iphoneos" cannot be located
    xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
    Copy the code
  2. Enter the following command to check the default XCode path

    xcode-select --print-path
    Copy the code

    The output is generally as follows

    /Applications/Xcode.app/Contents/Developer
    Copy the code
  3. If not, run the following command to change the XCode path

    xcode-select --switch /Applications/Xcode.app/Contents/Developer/
    Copy the code

Warning: Your project does not explicitly specify the CocoaPods master specs repo.

[!] Your project does not explicitly specify the CocoaPods master specs repo. Since CDN is now used as the default, you may safely remove it from your repos directory via pod repo remove master. To suppress this warning please add warn_for_unused_master_specs_repo => false to your Podfile.

The reason for this warning is that you are using the default CocoaPods CDN:

source 'https://cdn.cocoapods.org/'
Copy the code

If so, you can safely remove the primary repo from your computer using the suggested command pod repo remove master

We can also resolve this warning by adding a source at the top of the Podfile just for the current project:

source 'https://github.com/CocoaPods/Specs.git'
Copy the code