How do I obtain a GeoPoint relation to the Users table as a BackendlessUser object?

My AppId is BDCD56B9-351A-E067-FFA4-9EA9CF2F4000. I have GeoPoints which have a relation in the metadata to a Users object (e.g. the user that submitted that GeoPoint). The following query is used to obtain the GeoPoints:

 BackendlessGeoQuery *query = [BackendlessGeoQuery queryWithPoint:center radius:kDefaultMapRegion units:METERS categories:nil];

 query.includeMeta = @YES;

The metadata is included but the user is a dictionary object instead of a BackendlessUser one. How can I obtain the user metadata as a BackendlessUser object?
P.S. This is the behaviour of the iOS SDK. Haven’t checked the Android one yet.

Hi Milen,

Could you please prepare a minimal verifiable sample with some application credentials so that we could run it and reproduce the problem? It would greatly reduce the time we would need to investigate and fix the problem.

Hi Sergey,

How can I send you privately the link to the archive? I don’t want to upload it here because it contains the API key.

You can send it to support@backendless.com.

By the way, the API key is not meant to be secret. And it actually can’t be secret, for example, in JavaScript (and even in Android, because your .apk can be decompiled). You should better secure your app by setting proper permissions on your data instead.

I sent an email with the link and short instructions how to reproduce the issue.

I will keep in mind the API key is (somehow) public :slight_smile:

Thank you, I redirect your project to our iOS engineer, she’ll contact you here as soon as we have any results. For reference, the internal task ID is BKNDLSS-16063

Hello Milen,

Please add this command to cast the dictionary object into BackendlessUser:

[backendless.data mapTableToClass:@"Users" type:[BackendlessUser class]];

Regards, Olga

For some reason I did not receive an email for this comment.

Anyway, thanks, that worked!

After a lot of debugging I found that this line causes a crash when logging out after a Facebook login.

This is the crash log:

Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x1859c17f4 objc_object::release() + 16
1 Help A Paw 0x100f93390 -[UserService onLogout:] (UserService.m:573)
2 Help A Paw 0x100fc739c -[Responder responseHandler:] (Responder.m:208)
3 Help A Paw 0x100f94c94 -[HttpEngine processAsyncAMFResponse:] (HttpEngine.m:254)
4 libdispatch.dylib 0x1860d9088 _dispatch_call_block_and_release + 24
5 libdispatch.dylib 0x1860d9048 _dispatch_client_callout + 16
6 libdispatch.dylib 0x1860e5b74 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1016
7 CoreFoundation 0x1866fdeb0 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12
8 CoreFoundation 0x1866fba8c __CFRunLoopRun + 2012
9 CoreFoundation 0x18661bfb8 CFRunLoopRunSpecific + 436
10 GraphicsServices 0x1884b3f84 GSEventRunModal + 100
11 UIKit 0x18fbf02f4 UIApplicationMain + 208
12 Help A Paw 0x100f4b924 main (main.m:14)
13 libdyld.dylib 0x18613e56c start + 4

And this is the code for logout:



[backendless.userService logout:^void (id idOfSomething) {
        completion(nil);
    } error:^void (Fault *fault) {
        FINError *error = [[FINError alloc] initWithFault:fault];
        completion(error);
    }];

What should be done in order to have both Users relations AND Facebook login/logout working?

Hi Milen,

Your last question is not related to the topic you’ve created. Please create a separate one with extended description of what is failing and all additional info which may help to investigate the cause of the problem.

I would recommend not to post additional question in topics with resolution ‘Answered’ or ‘Solved’. Our engineers may simply not see them, so post new topics for any questions that are not related to the original one. Thanks in advance

Best Regards