I was developing an application for an assigment of the university and I encountered an NSInvalidArgumentException error when calling the Backendless API. After looking into it I realised that while it did not work on my physical device (iOS 7.1.3), it did work on the emulator (iOS 9.2). I double-checked the project was correctly configured following the quick start guide, but I could not find any error…
This is the error I receive: ‘NSInvalidArgumentException’, reason: '-[__NSCFConstantString containsString:]: unrecognized selector sent to instance
And this is the code the error happens in:
let username = “username”
let password = password
// The instance is correctly retrieved by the app
let backendless = Backendless.sharedInstance()
// This is the line the error happens. It does not get into the response or error sections, the console shows the exception and the application crashes
backendless.userService.login(username, password: password, response: { (logedInUser) -> Void in
print("You're in") },
error: { (error) -> Void in
print("Try again, please")
})
Is there any known issue with old versions of iOS and the current Backendless iOS SDK? If so, I would prefer developing my app with the physical device, which SDK version should I use so that it supports my OS version (7.1.3)?
Hi Vyacheslav,
First of all, thanks for your answer.
The iOS device I am using is rather old so I don’t think it could handle an upgrade… Is there any other alternative? An older version of the SDK perhaps? It’s for an assignment in the university so I don’t mind if the SDK does not have all the features that are currently available…
Manex
I’ve tried it (first I had to change the deployment target to 7.1 so that I could execute it in my device) and the app crashes before printing the output about the meals, portions etc. The error I receive is the same I got with my code:
‘NSInvalidArgumentException’, reason: '-[__NSCFConstantString containsString:]: unrecognized selector sent to instance
i checked my App-statics. There are just 8% iOS7-User that installed my app in december, so you are right. But it would be fine to support them to as Parse did with the latest SDK.
Is there an older release of the SDK available with official iOS7-Support?
If you go with an older SDK, it would not support the latest iOS, then you’re facing a new problem - how to support the majority of users downloading your app, right?