问题
I just started a new project from scratch and tried to install Parse with Cocoapods for the first time. I'm using Xcode 6.4 and Cocoapods 0.37.2.
I did the standard Cocoapods install with Terminal:
sudo gem install cocoapods
pod setup --verbose
cd ~/Documents/"Application Development"/VeilApp
pod init
open -a Xcode Podfile
In my Podfile:
platform :ios, '8.0'
use_frameworks!
target 'VeilApp' do
pod 'Parse'
pod 'ParseUI'
end
target 'VeilAppTests' do
end
And then again in Terminal:
pod install
I closed xcodeproj and opened xcworkspace version of app, and then I run into this:
imgur.com/D272Tle
Basically a bunch of red (not found? not linked correctly?) Cocoapod files. I tried to save something on Parse, and it does work. But then I tried to subclass PFQueryTableViewController and it couldn't find it. I'm not exactly sure where I went wrong, did I skip a step in installing Cocoapods? I'm quite new to programming in general, so if someone could shed a light on what I'm doing wrong it would be awesome if it comes with steps :)
回答1:
Short Answer = yes
red items in Frameworks
and Products
, pointing to derived data are normal.

Troubleshooting
Have you tried the obvious:
- Quit/Relaunch Xcode
- Xcode > Window > Projects > Derived Data Delete...
- Proper
import ParseUI
in your Swift source code - Start over:
rm -rf Podfile.lock Pods/ ; pod install
Assuming you got this after the pod install
:
Downloading dependencies
Installing Bolts (1.2.0)
Installing Parse (1.7.5)
Installing ParseUI (1.1.4)
Generating Pods project
Integrating client project
...and you followed Cocoapod's advice (generally better to have closed Xcode Project before creating the workspace)...
[!] From now on use
VeilApp.xcworkspace
.
...then this does work:
Swift
import ParseUI
class MyQueryTableViewController : PFQueryTableViewController {
}
class AClass {
func aFunction() {
let pf:PFQueryTableViewController = MyQueryTableViewController(style: .Plain)
}
}
来源:https://stackoverflow.com/questions/31226185/are-all-these-cocoapod-files-supposed-to-be-red-after-installing