Search code examples
iosparse-serverpfloginviewcontroller

Parse API change, PFLogInViewController not found


Getting back to an Objective C project of mine started a while ago , which was compiling fine, I now find myself with a few issues related to Parse pods. Searching the net I already found a few things, but still have some problems (and doubts).

First I got an error message saying that a file was not found on this line:

#import <ParseUI/ParseUI.h>

After reading a few related post, I understood that ParseUI was deprecated and I should use Parse/UI instead in my Podfile, so I changed the line above to:

#import <Parse/Parse.h>

And I also changed in the Podfile:

pod 'ParseUI'

to:

pod 'Parse/UI'

I then reran:

pod install

But I now have these messages showing up:

Cannot find interface declaration for 'PFSignUpViewController', superclass of ....
No type or protocol named 'PFSignUpViewControllerDelegate'
.....
Cannot find interface declaration for 'PFLogInViewController', superclass of ....

along the project.

And I was indeed subclassing PFSignUpViewController as well as PFLogInViewController. So where did those classes go? Deprecated, different names or what?

Any help would be very much appreciated.

.......

After making a separate new project to check how things work, I found out that I can still use PFLogInViewController. And then looking again on the net for posts about similar issues, I tried to add this line:

@import Parse;

But I get this error:

Module 'Parse' not found

I must be doing something wrong hiding the PFLogInViewController class.


Solution

  • After making a separate small project to isolate the problem, I first hit the same issue. And with a bit more digging I ended up solving it by adding this import:

    #import <PFLogInViewController.h>
    

    after the one which was already there:

    #import <Parse/Parse.h>
    

    I hope this can help someone else having the same problem at some point.