【发布时间】:2015-08-03 21:53:47
【问题描述】:
我正在尝试将 Parse 集成到 Swift 应用程序中。我下载了 SDK,设置了应用程序 ID 并添加了依赖项,但是当我尝试导入 Parse 时,它显示“没有这样的模块 - Parse”。
【问题讨论】:
标签: ios xcode swift parse-platform backend
我正在尝试将 Parse 集成到 Swift 应用程序中。我下载了 SDK,设置了应用程序 ID 并添加了依赖项,但是当我尝试导入 Parse 时,它显示“没有这样的模块 - Parse”。
【问题讨论】:
标签: ios xcode swift parse-platform backend
检查 Parse 框架是否已复制到您的项目文件夹中,以保存您的第 3 方依赖项(例如 Vendor)。
然后,将 Parse 框架的路径添加到构建目标的框架搜索路径 (FRAMEWORK_SEARCH_PATHS)。
它应该看起来像这样:
$(inherited)
$(PROJECT_DIR)/Vendor/Parse
我会清理 DerivedData 文件夹并重建。
【讨论】:
我认为这个链接应该可以解决您的问题: Set up new Parseproject 或 here ist explained it for a existing project please check this
在我看到代码后编辑。首先请不要在此处发布 api 密钥,这是您的私有 api 密钥。
第二个我认为代码应该是这样的:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
Parse.enableLocalDatastore()
// Initialize Parse.
Parse.setApplicationId("appID",
clientKey: "Key")
// [Optional] Track statistics around application opens.
PFAnalytics.trackAppOpenedWithLaunchOptions(launchOptions)
//end parse
// Override point for customization after application launch.
let splitViewController = self.window!.rootViewController as! UISplitViewController
let navigationController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] as! UINavigationController
navigationController.topViewController.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem()
splitViewController.delegate = self
let masterNavigationController = splitViewController.viewControllers[0] as! UINavigationController
let controller = masterNavigationController.topViewController as! MasterViewController
controller.managedObjectContext = self.managedObjectContext
return true
}
你必须输入你的钥匙,我为你更正了方法
【讨论】:
我的问题似乎在于应用程序的命名:我包含了一个数字。
一旦我纠正了这个错误,错误就消失了。也许这个名称会阻止某些框架的导入。
【讨论】: