所有这些Cocoapod文件在安装后是否应该都是红色的? [英] Are all these Cocoapod files supposed to be red after installing?

查看:438
本文介绍了所有这些Cocoapod文件在安装后是否应该都是红色的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从头开始了一个新项目,并尝试首次安装带有Cocoapods的Parse.我正在使用Xcode 6.4和Cocoapods 0.37.2.

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.

我在终端机上安装了标准的Cocoapods:

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

在我的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

我关闭了xcodeproj并打开了应用程序的xcworkspace版本,然后遇到了这个问题:

I closed xcodeproj and opened xcworkspace version of app, and then I run into this:

imgur.com/D272Tle

imgur.com/D272Tle

基本上是一堆红色的(未找到?未正确链接?)Cocoapod文件.我试图将某些内容保存在Parse上,但它确实起作用.但是后来我尝试将PFQueryTableViewController子类化,但找不到它.我不确定自己出了什么问题,是否跳过了安装Cocoapods的步骤?一般而言,我对编程还很陌生,所以如果有人可以告诉我我在做什么错,那么如果它附带了步骤,那就太好了:)

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 :)

推荐答案

简短答案=是

FrameworksProducts中的

红色项指向衍生数据是正常的.

Short Answer = yes

red items in Frameworks and Products, pointing to derived data are normal.

您是否尝试过显而易见的事情:

Have you tried the obvious:

  1. 退出/重新启动Xcode
  2. Xcode>窗口>项目>派生数据删除...
  3. Swift源代码中的
  4. 正确的import ParseUI
  5. 重新开始:rm -rf Podfile.lock Pods/ ; pod install
  1. Quit/Relaunch Xcode
  2. Xcode > Window > Projects > Derived Data Delete...
  3. Proper import ParseUI in your Swift source code
  4. Start over: rm -rf Podfile.lock Pods/ ; pod install

假设您在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

...并且您遵循了Cocoapod的建议(通常最好在创建工作区之前先关闭Xcode Project)...

...and you followed Cocoapod's advice (generally better to have closed Xcode Project before creating the workspace)...

[!]从现在开始使用VeilApp.xcworkspace.

...那么这确实可行:

...then this does work:

import ParseUI

class MyQueryTableViewController : PFQueryTableViewController {
}

class AClass {
    func aFunction() {
        let pf:PFQueryTableViewController = MyQueryTableViewController(style: .Plain)
    }
}

这篇关于所有这些Cocoapod文件在安装后是否应该都是红色的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆