var user = BackendlessUser() Crashes

Hi,

I was using Backendless a few months ago and had everything working the way I wanted. I took a break but have started back up.

Now, for some reason, a line of code under “fun registerUserAsync()”

var user = BackendlessUser() for some reason crashes my app. I haven’t made any changes and it was working before I left. Has something changed in my account or is there another problem?

Hi Mike,

It rather seems to be the problem in your Swift code, than with our service. Please look for the error message in log or somewhere and try to find a solution on some Swift resources. If you find that something doesn’t work on our side - please feel free to report, but describe the issue thoroughly.

Regards,
Sergey

I’m kind of new to this so please let me know what other information I can provide.

Using breakpoints I found that it is this one line of code:
var user = BackendlessUser()

This line and the entire function is setup exactly as it states in the Backendless tutorial and, again, it was working before and I have made no changes.

The only warning or errors I get are:

warning: could not load any Objective-C class information. This will significantly reduce the quality of type information available.

(lldb)

0x10048a118 <+512>: adrp x8, 943 Thread 1:EXC_BAD_ACCESS (code=2, address=0x16fcb7fd0)

Are you sure you’re using latest Backendless SDK and latest Swift?

When was it updated and how do I update if I’m not using it?

You’re not using what?

The latest back endless or Swift.

What are the current versions and what do I need to do to catch up?

The latest Backendless SDK is 3.0.14, you can download it here - https://backendless.com/downloads/

As to Swift, it seems to me it’s automatically updated with Xcode.

I’m now getting the following error, can you help?

bridging header ‘/Users/mike/XCode/PetDetect/lib/backendless/include/Backendless-Bridging-Header.h’ does not exist

Check the path, make sure the file is there (or put the right path for the bridging header).

Hi Mark, I’ve done both these things. Still getting these two errors

‘DEBUG.h’ file not found

failed to import bridging header ‘/Users/mike/XCode/PetDetect/lib/backendless/include/Backendless-Bridging-Header.h’

Please use CocoaPods, this will simplify your project tuning

Hi Mark,

I’m not sure what to do here. I’m out of options and getting very frustrated. My code worked fine before. I tried to upgrade the SDK and now I have nothing but problems. There must be something with where my files are placed or with the links etc (I’ve checked and the paths point to the necessary files).

Is there anyway you can offer remote support to help me sort through this? I’m at the point where if I can’t get it working I need to find a new Backend.

Thanks,
Mike

Mike, try to remove your app from your device/simulator, then build & run your app again

Same errors occur

Download this project and try it. This is a simple app making user registration, login & logout. Try it with your appID & secretKey, and let me know how it goes.

Tried it

Here is the error I get
Linker command failed to exit code 1
(user -v to see invocation)

What Xcode version do you use?

You should load the project using TestSCP3016.xcworkspace

I’m on Xcode 7.3

TestSCP3016.xcworkspace compiled and ran. Does that give you the info necessary to fix my project?