0

I am experiencing an issue when I try to create a new parse class through swift. My code for creating a new class is the following:

let query = PFQuery(className: "newClass")

The issue is that a "newClass" class is not created in my Parse dashboard and I don't get an error message. And since some other code is dependent on retrieving information from this class the app does not function properly.

I have created classes through swift previously and have never run into this problem. I also know that I can create a new class directly through Parse, but that doesn't really help me since there seems to be an issue with the connection between my swift code and Parse.

Thank you in advance for any help!

2 Answers 2

1

Is Allow client class creation turned on?

Try using PFObject to create the new class

PFObject(className: "yourNewClass")
Sign up to request clarification or add additional context in comments.

3 Comments

I need it to be of type PFQuery because later on I need to use the whereKey constraint. But your first recommendation seems to be very relevant, where to I find this option in Parse?
Are you using parse.com or are you on your own parse server?
You could try deleting the app from the simulator and then run it again on the simulator. Parse sometimes seems to save the database structure. That is why it may have worked on your phone because it was the first time you ran it on your phone.
0

I managed to solve it to some extent. After quite some while I got the idea to try to simulate the app on my iPhone instead of only on the simulator that xcode provides. For some reason everything then worked as planned... This is good news for me, but I would like to know why xcode couldn't do it.

Thanks for taking time and giving me some tips Brett!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.