Premise
AppCode version:
AppCode 2019.3.5 Build #OC-193.6494.48, built on February 12, 2020
Language
Swift 5.0
CocoaPods:
version
CocoaPods 1.8.3
repo
cocoapods-
- Type: CDN
- URL: https://cdn.cocoapods.org/
- Path: /Users/***/.cocoapods/repos/cocoapods-
ModuleSpecs
- Type: git (master)
- URL: https://git.private pod source.com/***.git
- Path: /Users/***/.cocoapods/repos/ModuleSpecs
Specs
- Type: git (master)
- URL: https://git.private pod source.com/***.git
- Path: /Users/***/.cocoapods/repos/Specs
Public podfile
source 'https://git.private pod source.com/***.git'
source 'https://cdn.cocoapods.org/'
workspace 'IM.xcworkspace'
platform :ios, '10.0'
use_frameworks!
#use_modular_headers!
inhibit_all_warnings!
install! 'cocoapods',
:preserve_pod_file_structure => true,
:generate_multiple_pod_projects => true
# :incremental_installation => true
target 'IM' do
project 'IM/IM.xcodeproj'
# pod some private component
pod 'Kingfisher'
pod 'M13Checkbox'
pod 'IQKeyboardManagerSwift'
pod 'MJRefresh'
end
target 'Router' do
project 'Router/Router.xcodeproj'
# pod some private component
end
Question:
When I run my project using AppCode and manage third-party libraries through CocoaPods, I cannot use the code in the third-party library in the editor. but the project can run successfully! ?
Take a piece of code from Kingfisher
as an example:
import Kingfisher
...
imageView.kf.setImage(with: URL (string: ""))
- I can't click
Kingfisher
withcmd + left click
to preview Kingfisher's code - This code is not highlighted in AppCode
- Nothing about
kf
in code hints, Means I need to manually write any method I need without any hint - When I use
cmd + left click
on thesetImage (with:)
method, AppCode prompts Cannot find declaration to go to
However, with the exception of the second point, none of the above problems have occurred in my private pods, that is, only the pods in the CDN source (cocoapods-
) have the above problems.
This has had a big impact on my development ... How can I solve this problem?
supplement:
I now suspect that there is a problem with the configuration of the CocoaPods in my AppCode.
Because a friend of mine's Preferences-> CocoaPods settings are shown below. The pod with the CDN source is included in the settings, and there are tips about the CDN source
But what I see below is that it only contains my private pods, no information about the shared pods, and no tips about the CDN