90% of time my requests do not return response nor fault:
[backendless initApp:applicationId APIKey:clientKey];
DataQueryBuilder *queryBuilder = [[DataQueryBuilder alloc] init];
[queryBuilder setPageSize:60];
id<IDataStore> dataStore = [backendless.data ofTable:@“tabletable”];
[dataStore find:queryBuilder response:^(NSArray<NSDictionary<NSString *, id> *> *resultsArray) {
NSLog(@“resultsArray:%@”, resultsArray);
}
error:^(Fault *fault) {
NSLog(@“fault:%@”, fault);
}];
I have a good network connection, but even when I wait long there is no response. The same code sometimes work, so I just have no idea, what could it be?
I can not even provoke a fault by specifying the table which doesn’t exist (for example:…ofTable:@“tabletableNOTEXIST”)
Hi. Please provide working code snippet with your appId that we can reproduce this problem.
Oleg,
Now I could get some more info: after a while it throws an error:
HttpEngine ->connection didFailWithError: 'Error Domain=NSURLErrorDomain Code=-1001
NSErrorFailingURLStringKey=https://api.backendless.com/116A4CEA-A221-E2F6-FFA7-8B908DEB5D00/“correctiOSKey”/binary, NSErrorFailingURLKey=https://api.backendless.com/116A4CEA-A221-E2F6-FFA7-8B908DEB5D00/“correctiOSKey”/binary
I don’t know which code snippet should I provide to you because the same code works in other apps and even in this app (sometimes). I understand that there should be my fault but I just can not find out what could be the reason for such performance of the api.
(the real table name: wishlist)
Hi Vasilii
Do you have any Business Logic in your app?
Regards, Vlad
never mind, I’ve checked it
NSURLErrorDomain Code=-1001 - this is request timeout error. It’s also can mean that your device/emulator doesn’t able to resolve domain.
Network error are also confirmed that you doesn’t get error when you try to get data from inexistent table. That’s mean that request doesn’t arrived to the server.
If you use emulator, try to check its network settings or/and try iOS Simulator -> Reset Content and Settings.