How to send get data between ios apps without launching - iphone

I want to use an ios application like proxy. There will be various application installed on same device and all applications will communicate with server via proxy application.
I will send request to proxy application, Proxy application will handle request, send it to servers and send response to the various applications.
When I use URLScheme this will launch application and bringd it front. I dont want applciation launch.Is it possible to make this? Use an application lie a service?

The AppSupport framework exposes an Objective-C class suited for interprocess communication: CPDistributedMessagingCenter. You can read about its usage and details about how it is implemented here.

For sign-in across many apps, you should be using the KeychainManager and a shared sub-domain with an entitlement linking the apps together with a keychain-access-group.
See How to share keychain data between iOS applications

Related

Socket connection between rails and iphone native app

I have an iphone app with rails serving as a backend server.
Now I need to implement a chat functionality using sockets connections.
A lot of examples show you how to implement chat using sockets in browser.
What I need here is how I can implement an application where you create socket server in the rails app , and the client in iphone app which listens to the channel I give them.
I tried using faye(examples given only how to implement client in the browser) and using fayeObjC library for iphone to create client, but am not able to listen to the channel from this library.I know I must be implementing it wrong here.
I'll share my code also here, but first I need to know is there a better solution than this?
Also I appreciate some links to some examples where socket server is in rails and clients are iphone app.
Appreciate any help and mostly need a right direction to implement it.
Update
I tried the faye combination again and it worked.Although still looking for more solutions.
You can check about TCP sockets:
http://www.raywenderlich.com/3932/how-to-create-a-socket-based-iphone-app-and-server
Chat Application Using Ruby
http://quickblox.com/modules/chat/
http://caydenliew.com/2011/11/ios-mac-os-communication-with-asyncsocket/
http://www.macresearch.org/cocoa-scientists-part-xxix-message
Next link is a comprehensive Networking Guide - Using Internet Sockets
You must keep in mind two major problems to peer-to-peer communications (Chat): reachability and how to receive new messages while your application is in the background (get notifications).
For the last you can use APNS approach: an invisible notification will be pushed to the iPhone indicating that a new message is ready to be read. So your app will make a request for unread messages (what app like WhatsApp does).
Besides TCP sockets you could use websockets (HTTP - so there are no firewall problems).
Best in class - Socket.IO.
Here you will find the wiki https://github.com/learnboost/socket.io/wiki (you will find there an extension for Ruby also)
Here an example for iOS chat client for socket.io & node.js backend
Jabber
Another option: XMPP - "stands for eXtensible Messaging and Presence Protocol. Such a protocol is open-standard and oriented to message exchange (builds and maintains by Jabber community). Message exchange happens near real time, so it is an ideal infrastructure to build chat-like applications. The protocol also implements a mechanism to notify presence information (whether a user is online or not) and the maintenance of a contact list. XMPP is a thorough protocol, which has been adopted also by big companies like Google to build their Instant Messaging service."
Here you will find all about developing a Jabber Client for iOS (enable users to sign in, add buddies, and send messages; how to install and configure a jabber server, create accounts, and interact with the server from an iOS application http://mobile.tutsplus.com/tutorials/iphone/building-a-jabber-client-for-ios-server-setup/
I know that SocketRocket by square is a strong native Objective-C library. But it doesn't offer the channel abstraction you seem to be looking for.
If you would consider outsourcing the WebSocket connections then you could use a hosted service like Pusher, who I work for. You can publish messages (trigger events) on channels using the pusher-gem. And you can subscribe to channels and receive messages using one of Pusher's Objective-C libraries.
Other solutions will also have Objective-C libraries and you can find a list of them via this realtime web tech guide.

Web API and Native API compatibility

Ok. Here is my situation:
I am developing an embedded device, which provide a service. It will provide some web based services to a client (a smart phone).
Currently we are planning to implement a REST server in the device so that web applications can easily access and use the services provided by the device.
In the future, we plan to add a display and a better processor to our embedded device so that we can run the web applications on the device itself.
We want to maintain application compatibility - i.e all the current web applications should work on the device without any modifications.
Is there a better way to implement this than using REST and HTTP? I am worried about performance running both the server and the client on the device.
If you take care to separate the REST Api code from the actual service code, your newer device can interface (direct call) directly with the service instead of wrapping everything into HTTP and REST.
This being said, you can always try an implementation using you REST api and validate if performance is adequate. If it is, you do not even need to add the indirection.

How can I test an iOS App I am creating and simulate a Chinese user?

I am developing an app that will be used world-wide and have a co-worker who lives in China. He claims it takes a very long time to reach our server here in the US and I want to be able to use the app on my phone but through a VPN and proxy on my iPhone so it appears that I am in China. Is that possible?
Here you can find a list of Chinese web proxies.
You should also change your app so that it goes to through the proxy. This depends on how you are dealing with HTTP communication but if you google it, you will find many posts.
Keep in mind that a proxy will add a further delay in communication.
If you want to setup a VPN, have a look at this tutorial for setting up a VPN on your Mac and then connect the iPhone to it.

iOS Device communication

I am keen to get some apps built that can communicate with other devices/ web etc. i have played around with FTP and can get so far. But what is the best way to do this? We don't have any Servers with databases etc, but do have a site that we are currently uploading and downloading files to.
can anyone suggest a good/ better way to get the device to send/ receive files?
thanks
sam
If it's HTTP communication you're wanting to do, the simplest and most powerful tool is ASIHTTPRequest.
HTTP is the protocol your web browser uses to talk to web servers. If you have a site you're storing and downloading files at, it's almost certainly HTTP you're talking to it.
For iOS device to device communication one can use Bump API.
EDIT: I don't know of a generic framework for device <-> server communications, but having built applications that use web services of other providers like Yelp, Yahoo, Google Maps, I would say the way to go for this is to have REST based web services which exchange data in JSON format.

Do most iPhone apps communicate via web services?

Do most of the popular iPhone apps that communicate with a back end Internet server communicate via web services? I was assuming this was the case.
Some apps I'm thinking about would be: Facebook, Bloomberg, NY Times, ESPN, etc.
Well a web service is just an API - Application Programming Interface
The apps you mentioned would probably all implement their own API for exchanging data between the client and the server so yeah, I would say the answer is yes. You can implement your own API via XML, JSON etc. You just need to define the protocol. You can implement existing concepts in your own apps. Have a look at the following:
REST
SOAP
JSON
Most of the Apps that I've written use web services of some sort, I prefer being RESTful, but I have been forced to use SOAP.