Viewing real-time group location in a map using iOS sdk
  • I understand how to create a group and can view history with the group history method, but is there a way to view real-time location of other group members on a map using the ios sdk or is there a separate server side implementation requirement?
    In a simple example, I create a group, invite 3 people to the group and I want all 4 people to be able to view each others location on a map in real time.  
    Thanks!
  • 4 Comments sorted by
  • Rephrasing the question - is there a way to connect to the socket streaming server without using the javascript sdk?  I can implement a websocket connection in objective-c outside of the framework, so if anyone knows how to connect to the streaming server without the javascript sdk, I think that is all I would need.

    From the iOS SDK:

    Streaming

    Geoloqi provides a real-time streaming service through Websockets and Socket.IO.

    ...

    You can subscribe to the location updates for all users in a group by connecting to the streaming server and listening to the group token.

  • The iOS SDK does not currently provide a mechanism for connecting to the streaming server. However, you should be able to connect to it from an iOS app by using a library written to be compatible with socket.io. 

    Here is the best looking one I found with a little searching: https://github.com/pkyeck/socket.IO-objc

    Let me know if you start going down this route and have any questions about the streaming service.
  • Cool thanks - still same question though - what is the connection info (websocket end point) to make a connection to your streaming server if I go non javascript sdk? 









  • Using the framework from your link I was able to connect to the streaming server with the following:


        socketIO = [[SocketIO alloc] initWithDelegate:self];


        NSDictionary *groupWithToken = [NSDictionary dictionaryWithObjectsAndKeys:@"xxxxxx", @"group", nil];


        socketIO.useSecure = YES;




        [socketIO connectToHost:@"subscribe.geoloqi.com" onPort:443 withParams:groupWithToken];

Howdy, Stranger!

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

In this Discussion