Xcode退出时找不到Parse / Parse.h文件

时间:2014-01-25 20:04:39

标签: ios xcode parse-platform

我在项目中添加了Parse SDK,一切都很顺利。但是当我退出Xcode并打开项目时,我遇到了这些错误:

Parse/Parse.h file not found

我删除了Parse Framework并将其重新添加到我的项目中,错误消失了。但是每当我退出Xcode并重新打开这个项目时,我都会遇到这些错误。

我该怎么办?

提前致谢。

4 个答案:

答案 0 :(得分:8)

@Tuyen回答帮我解决这个问题。不过我想说清楚一点。 在Build Setting > Framework Search Path中,添加新路径$(PROJECT_DIR)并设置递归。

我把所有第三方框架都放在项目目录/框架下,所以这个设置肯定会找到框架文件。

答案 1 :(得分:1)

我有同样的问题。这是我的解决方案。

  1. 将Parse.framework拖到xcode(检查副本)
  2. 中的文件夹中
  3. 将构建设置中的“框架搜索路径”更改为相对路径。例如:MyProject / Libraries
  4. 可选更干净的代码:在xcode中,将Parse.framework拖到文件夹Frameworks
  5. 完成这些步骤后,这个问题就消失了。

答案 2 :(得分:1)

create new parse app download parse sdk for ios

create new project - master detail go to build settings under search paths >> framework search paths >> 1) debug - add $(PROJECT_DIR)/** 2) release - add $(PROJECT_DIR)/**

go to general tab
under Linked frameworks and libraries, Add the following frameworks from parse SDK Parse.framework ParseCrashReporting.framework Bolts.framework ParseUI.framework

        Also add the below frameworks
            AudioToolbox.framework
            SystemConfiguration.framework

        Add the below frameworks using "Add framewors popup" -->> Add other -->> ctrl+shift+g --> enter /usr/lib/ -->>
            choose the following
                1) libz.1.dylib
                2) libsqlite3.dylib

create new file -->> chose Objective-C type -->>create. Xcode will ask you whether you want to create a bridging header? select yes. it create 2 files. one is .m file and one is .h file go to .h file, add the following line #import

Open up the AppDelegate.swift file, uncomment and edit the setApplicationId line in the application:didFinishLaunchingWithOptions function with your keys: Example: Parse.setApplicationId("sJjEQei2m15RD9MJiZjVtygI1o6wQ23TxhdIllUo", clientKey: "IZDfhmPiO2b01yEacRBAStyKAznXrguFku78pWO3")

Test the SDK

First make sure to include our SDK imports at the top of your ViewController.swift file:

import Parse

Then copy and paste this code into your app, for example in the viewDidLoad function of ViewController.swift:

let testObject = PFObject(className: "TestObject")
testObject["foo"] = "bar"
testObject.saveInBackgroundWithBlock { (success: Bool, error: NSError?) -> Void in
  print("Object has been saved.")
}

Run your app. A new object of class TestObject will be sent to the Parse Cloud and saved. When you're ready, click the button below to test if your data was sent.

答案 3 :(得分:0)

不确定是否有效。从来没有像你这样的问题。无论如何,请检查this一个。

希望它有所帮助。