Values not binding to BackendlessUser

I seem to be getting inconsistent behavior from objects in the backendless library. Sometimes Xcode doesn’t recognize them as valid objects and now I’m having an issue saving values to my Backendless user object. I used Cocoapods to import the library and at first none of the objects were recognized. I was able to fix this by adding an objective C bridging header with “#import <Backendless.h>”
I’m writing my app in Swift and according to the Cocoapod instructions I shouldn’t need a bridging header, is that right? If so it makes me think the unexpected behavior I’m getting could somehow be related to the need for a bridging header.
My primary issue is that I was using a BackendlessUser object and it was working then at one point during testing it just stopped working and now it won’t hold values assigned to its properties

class NewUserTVC: UITableViewController, UITextFieldDelegate 
{


 var user = BackendlessUser()


 @IBOutlet weak var firstNameField: UITextField!
 @IBOutlet weak var emailField: UITextField!
 @IBOutlet weak var passwordField: UITextField!


 @IBAction func submitButton() 
 {
 if validateFormFields() == false {


 user.email = emailField.text!
 user.password = passwordField.text!
 user.name = firstNameField.text!
 
 }
 } 


}

When I try to use my user object after setting values for the 3 fields the system says those properties are nil. Obviously this is very simple code so I don’t really understand what could be going wrong which makes me think there must be something going on with the implementation.
I tried to do a “pod update” to see if that would do anything but had no effect, I also tried removing the bridging header again and got errors that all the backendless objects were unrecognized.

As an aside… this is my second project using backendless. I first created a basic “test” project to demonstrate all the functionality I’d need in my more complex project. In my test project I never needed a bridging header and never had any issues with the backendless objects and I have a block of code basically identical to the above and it works no problem. Now I’m updating a much more complex existing project to use backendless instead of Parse and started having issues with backendless objects as soon as I started working with Backendless.

Please investigate a project in attachment.

TestValidUserToken.zip (19.54MB)

I just created a project (see in attachment) with the latest Backendless SDK using pod ‘Backendless’ (3.0.30 release), it works for me, and I have no problem with a bridging header.

TestSCP3030.zip (19.53MB)

Thanks for the feedback. As I pointed out I have 2 projects, one that requires the bridging header and one that doesn’t. The one that does is giving me issues with backendless objects. So I’m aware that it can work as I have a working example myself my issue is why does one project force me to use a bridging header in order to recognize backendless objects and does it make sense that the bridging oddity could be the source of my other problems with backendless objects.

I’ve been continuing to play around in my “broken” project and found something interesting… if I move my “var user = BackendlessUser()” into the function where I want to use it there’s no issue, I only have a problem when I declare it as a class level object.

In my “funcitoning” project I also have the user declared at the class level and it still works, so not sure what that tells us, but interesting, no?

Chris, I tried your workflow (made var user as class property) - and still I have no problem with it.

Please, provide a test project here (in attachment) which demonstrates the issue.