layer/place not triggering
  • I need some help since I am not able to make the layer place trigger

    Input HeadersX-Forwarded-Ssl: on
    Connection: close
    User-Agent: GrabioDev/3.4 CFNetwork/548.1.4 Darwin/11.0.0
    Content-Length: 55
    Accept: */*
    Content-Type: application/json
    X-Lq-Device-Manufacturer: Apple
    X-Lq-Device-Hardware: iPod4,1
    X-Lq-Device-Os: iPhone OS
    X-Lq-Device-Version: 5.1.1
    X-Lq-Package-Version: 3.4
    X-Lq-Sdk-Version: 12.060
    X-Lq-Sdk-Build: 748712f769b90ac7293ba74f8f18a848729f4e89
    X-Lq-Provide-Hints: location
    Authorization: OAuth 18409-cf24fbe396428fcc75e8f2d80723aebecc8ad460
    Accept-Language: en-us
    Accept-Encoding: gzip, deflate
    Input Body{
    "longitude": -87.6448,
    "latitude": 41.93229,
    "distance": 5
    Response Body{
    "triggers": [],
    "refresh_bounds": false,
    "refresh_timestamp": 1344675320
    The trigger array is empty even though I have set up a layer and added a place to it. Any idea why?
    Immediately after I arrive at BB_Chicago_Clark notify". This should happen every time I arrive at BB_Chicago_Clark…

  • 9 Comments sorted by
  • Also, how can I pass in some details about the user?
    [LQSession setAPIKey:_GEOLOQI_API_KEY secret:_GEOLOQI_API_SECRET];NSUserDefaults* defs = [NSUserDefaults standardUserDefaults];NSDictionary* gDict = [NSDictionary dictionaryWithObject:[OpenUDID value] forKey:@"device_id"];
    [LQTracker configureAnonymousUserAccountWithUserInfo:gDict profile:LQTrackerProfileRealtime];Should I be able to capture the device_id somewhere?
  • if I look for 41.93229, -87.6448 on google maps, I can see that it falls within the radius of my trigger centered in 41.929749,-87.643272
  • the log from the device shows the same empty trigger list

    /__38-[LQSession runAPIRequest:completion:]_block_invoke_0 (LQSession.m:322) API Request:

    /__38-[LQSession runAPIRequest:completion:]_block_invoke_0 (LQSession.m:335) Response: {

        "refresh_bounds" = 0;

        "refresh_timestamp" = 1344675901;

        triggers =     (



  • Make sure the user has subscribed to the layer you created. If you're not seeing anything in the trigger/nearby call it could be because the user isn't subscribed. Also, "distance=5" is very small, try something larger like 150 meters or 500 meters. 
  • Your example of setting the device_id for a user is correct. If you look at account/profile you will see "device_id" in the "extra" object.
  • Thanks Aaron. so should I use createAccountWithUsername:password:extra:completion:instead of anonymous? For each user create an account?
    not sure where that 5m distance is coming from.
  • Either way you create the account is fine, it just depends on whether you want the users to be able to log back in to an account with a password. We see a lot of people just use the createAnonymous method because their users don't even necessarily have an account, they're just opening the app.

    The 5m distance came from the input body example you gave at the top, 
      "longitude": -87.6448,
      "latitude": 41.93229,
      "distance": 5
  • I am using .. I missed this section previously. but

    sessionLocal.userID unrecognized selector sent to instance - any ideas why?

    I will need the user_id in order to subscribe to a layer.

    sessionLocal.accessToken - works fine

    sessionLocal.username - fails like userID does

    [LQSession createAnonymousUserAccountWithUserInfo:gDict completion:^(LQSession *sessionLocal, NSError* error)


                 if(sessionLocal.accessToken) {

                     NSLog(@"Logged in successfully! %@ user %@", sessionLocal.accessToken, sessionLocal.username);




    Note: I see in the logs that I get all the details from the server
    /__38-[LQSession runAPIRequest:completion:]_block_invoke_0 (LQSession.m:335) Response: {
        "access_token" = "18653-407d5fb6767424773f2a3bbf15a023a2f223f485";
        "display_name" = Anonymous;
        extra =     {
            "device_id" = 415348825ce800db8731da526d65596eea48af2f;
        "is_anonymous" = 1;
        "password_reset_token" = "_zTje21iknxVhed_3D";
        scope = "<null>";
        "user_id" = TkP;
        username = "_5YG7g1iknxVjep5jr";

    "The 5m distance came from the input body example you gave at the top, "
    yes, but I never specified to be 5m, so that's why I was saying that I have no idea where the value 5 is coming from. I just see that 5 showing up when I debug my app.

    Thanks for your help Aaron.
  • so basically why sessionLocal.username - fails

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion