[IOS][SWIFT] Property Name Contains Invalid Characters

Hello gang,
You were very helpful before so here is my current issue :
code :

        let uploadedFile = backendless.fileService.upload(filename, content: jsonDataString, overwrite: true)
        if uploadedFile.fileURL != nil {
            let sessionData = BLSession()
            sessionData.user = user
            sessionData.timestamp = session.timestamp
            sessionData.fileJSON = uploadedFile.fileURL
            sessionData.favorite = session.favorite
            sessionData.duration = session.duration
            sessionData.location = session.locationName
            sessionData.latitude = session.latitude
            sessionData.longitude = session.longitude
            sessionData.paddleDistance = session.paddleDistance
            sessionData.paddleTime = session.paddleTime
            sessionData.favorite = session.favorite
            let dataStore = backendless.data.of(BLSession.ofClass())
            var error: Fault?
            let result = dataStore.save(sessionData, fault: &error) as? BLSession
            if error == nil {
                print("Session has been saved: \(result!.objectId)")
            }
            else {
                print("Server reported an error: \(error)")
            }
}

When it goes to save the error I get is :
Server reported an error: Optional(FAULT = ‘2004’ [Property name contains invalid characters: ___class=__NSOrderedSetI . Please make sure all parameter names start from the letter.] <Property name contains invalid characters: ___class=__NSOrderedSetI . Please make sure all parameter names start from the letter.> )

The error message is confusing in so much that I am not sure what letter my parameter names should start with. I am guessing that’s a typo and you mean “start with a letter”.

If that is the case then I can say that my class and the Backendless schema are both ok in that regard.

Thanks for your help!
Rob

Hi Robert,

Could you provide your BLSession class?
Please add some log or screenshot with ‘name’ value.

Regards,
Slava

Ah, it was an issue with my class. Thank you for pointing it out.
Resolved :slight_smile: