12

I'm really intrigued by the meteor.js framework. However, I'm not certain whether or not I can take advantage of the framework's real-time capabilities via the objective-C's native objects such as NSURLConnection. I have some specific questions referencing this question on how meteorjs works: How does the Meteor JavaScript framework work?

Let's start with web sockets:

The client/server messaging is done via websockets using something like socks.js or socket.io.

Is there an objective-C library or framework for utilizing websockets in native apps that would be able to communicate with a Meteor server?

Second, is the mongoDB client:

The client side connection to mongodb is really cool. It replicates the mongo-server driver into the client. Unfortunately, last I checked, they were still working on securing this database connection.

This seems like the most intriguing part of meteor. However, does this mean there is no standard way to communicate to the meteor server other than executing strings of javascript in a hidden UIWebView?

Community
  • 1
  • 1
Jim Jeffers
  • 16,164
  • 4
  • 39
  • 49

2 Answers2

9

For anyone interested in this, I've been working on an objective ddp client library here. I've only just started and there is no documentation yet, but everything works well. The project is here: https://github.com/boundsj/ObjectiveDDP

The specs for the ddp client are here: https://github.com/boundsj/ObjectiveDDP/blob/master/Specs/ObjectiveDDPSpec.mm

I'm also building a library for meteor auth so ios clients can authenticate with a meteor server using the password package. It's all put together and working in this sample todo app (also part of the same repo): https://github.com/boundsj/ObjectiveDDP/tree/master/Example

boundsj
  • 311
  • 5
  • 3
5

not a full answers but hopefully a few pointers to get you started.

Meteor uses a protocol called DDP - Distributed Data Protocol. The blog post introducing it is here: http://meteor.com/blog/2012/03/21/introducing-ddp

There is an Objective-C client library on github here: https://github.com/alansikora/objective-c_ddp-client Although I can't vouch for it and it has no real documentation, the code is short and should be reasonably understandable by someone who already writes Objective-C.

Other than that I would suggest digging in and see if you can uncover any techniques for iOS clients. It's early days for Meteor and were all learning how to use it.

Joc
  • 1,039
  • 8
  • 7