-
-
Notifications
You must be signed in to change notification settings - Fork 70
Array of Pointer not working in User class #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @Mammut-Felix, when posting a potential issue, please post the full Also, is the struct you provided what you actually tested. You originally posted: struct User: ParseUser, Codable {
var username: String?
var email: String?
var password: String?
var authData: [String: [String: String]?]?
var objectId: String?
var createdAt: Date?
var updatedAt: Date?
var ACL: ParseACL?
var pointerArray: [CustomObject] // Not optional, which will definitely give you an error because all keys should be optional
} These are not the same... You can see this answer for more details as from you original post it seems like the same problem. |
Hi @cbaker6, thanks for your reply. The complete ParseError:
At the CustomObject all properties are optional, too. |
Something doesn't seem right with your code. The error states: struct User: ParseUser, Codable {
var username: String?
var email: String?
var password: String?
var authData: [String: [String: String]?]?
var objectId: String?
var createdAt: Date?
var updatedAt: Date?
var ACL: ParseACL?
//var pointerArray: [CustomObject] // Not optional, which will definitely give you an error because all keys should be optional
} It looks like your All |
Be sure to verify your code against the example in playgrounds: Parse-Swift/ParseSwift.playground/Pages/8 - Pointers.xcplaygroundpage/Contents.swift Lines 67 to 85 in 99b6196
Querying: Parse-Swift/ParseSwift.playground/Pages/8 - Pointers.xcplaygroundpage/Contents.swift Lines 87 to 140 in 99b6196
|
I've added another example to ParseUser in playgrounds that uses a Parse-Swift/ParseSwift.playground/Pages/4 - User - Continued.xcplaygroundpage/Contents.swift Lines 87 to 104 in b4d15de
The playground examples work which leads me to believe something is wrong with your code. You should look through the examples and verify your code is setup properly. |
@cbaker6 Thank you for your support. I've got it going now. The error was actually in the CustomObject |
Can you post what the error was and your your fix just in case someone else has the same issue in the future? Feel free to close this issue |
Hey Parse-Community!
I'm trying to get an array of pointers from a user.
This works perfectly with a logged in user.
But when logging in for the first time it doesn't work.
I get the following error:
The Objects:
The text was updated successfully, but these errors were encountered: