CocoaPods 遇到的一些无营养常规问题

pod install 找不到库:

现象:

1
2
3
4
5
6
7
8
9
10
11
12
[!] CocoaPods could not find compatible versions for pod "XXXX":
  In Podfile:
    XXXX (= 1.0.0.210416113435)

None of your spec sources contain a spec satisfying the dependency: `XXXX (= 1.0.0.210416113435)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

解法:

pod install --repo-update

The sandbox is not in sync with the Podfile.lock. Run ‘pod install’ or update your CocoaPods installation.

解法:

1
2
3
4
删除工程下的 Podfile.lock 和 Pods/ 
Xcode 工程 Clean
Derived Data 删一下
重新 pod install

查找 symbol 来自于哪个库

1
grep -r 'symbol_class_or_method_name' Pods

Comments