解析 API 更改,未找到 PFLogInViewController
Parse API change, PFLogInViewController not found
回到我不久前开始的一个 Objective C 项目,它编译得很好,我现在发现自己有一些与 Parse
pods 相关的问题。网上搜了一下,已经找到了一些东西,但还是有一些问题(和疑惑)。
首先我收到一条错误消息,说在这一行找不到文件:
#import <ParseUI/ParseUI.h>
阅读了一些相关的 post 后,我了解到 ParseUI
已被弃用,我应该在我的 Podfile
中使用 Parse/UI
,所以我更改了上面的行至:
#import <Parse/Parse.h>
而且我在Podfile
里也改了:
pod 'ParseUI'
至:
pod 'Parse/UI'
然后我重新运行:
pod install
但我现在显示了这些消息:
Cannot find interface declaration for 'PFSignUpViewController', superclass of ....
No type or protocol named 'PFSignUpViewControllerDelegate'
.....
Cannot find interface declaration for 'PFLogInViewController', superclass of ....
沿着项目。
而且我确实在子classing PFSignUpViewController 和 PFLogInViewController。
那么那些 classes 去哪儿了?已弃用,不同的名称或什么?
非常感谢任何帮助。
.......
在创建一个单独的新项目来检查它是如何工作的之后,我发现我仍然可以使用 PFLogInViewController。然后再次在网上查找有关类似问题的 posts,我尝试添加这一行:
@import Parse;
但是我得到这个错误:
Module 'Parse' not found
我一定是在隐藏 PFLogInViewController
class.
时做错了什么
在做了一个单独的小项目来隔离问题之后,我第一次遇到了同样的问题。通过更多的挖掘,我最终通过添加这个导入解决了它:
#import <PFLogInViewController.h>
在已经存在的那个之后:
#import <Parse/Parse.h>
我希望这可以帮助其他人在某个时候遇到同样的问题。
回到我不久前开始的一个 Objective C 项目,它编译得很好,我现在发现自己有一些与 Parse
pods 相关的问题。网上搜了一下,已经找到了一些东西,但还是有一些问题(和疑惑)。
首先我收到一条错误消息,说在这一行找不到文件:
#import <ParseUI/ParseUI.h>
阅读了一些相关的 post 后,我了解到 ParseUI
已被弃用,我应该在我的 Podfile
中使用 Parse/UI
,所以我更改了上面的行至:
#import <Parse/Parse.h>
而且我在Podfile
里也改了:
pod 'ParseUI'
至:
pod 'Parse/UI'
然后我重新运行:
pod install
但我现在显示了这些消息:
Cannot find interface declaration for 'PFSignUpViewController', superclass of ....
No type or protocol named 'PFSignUpViewControllerDelegate'
.....
Cannot find interface declaration for 'PFLogInViewController', superclass of ....
沿着项目。
而且我确实在子classing PFSignUpViewController 和 PFLogInViewController。 那么那些 classes 去哪儿了?已弃用,不同的名称或什么?
非常感谢任何帮助。
.......
在创建一个单独的新项目来检查它是如何工作的之后,我发现我仍然可以使用 PFLogInViewController。然后再次在网上查找有关类似问题的 posts,我尝试添加这一行:
@import Parse;
但是我得到这个错误:
Module 'Parse' not found
我一定是在隐藏 PFLogInViewController
class.
在做了一个单独的小项目来隔离问题之后,我第一次遇到了同样的问题。通过更多的挖掘,我最终通过添加这个导入解决了它:
#import <PFLogInViewController.h>
在已经存在的那个之后:
#import <Parse/Parse.h>
我希望这可以帮助其他人在某个时候遇到同样的问题。