views:

103

answers:

3

I have 2 application, one is iOS app and one is .NET app. I want my iOS app send an message (call a method of .NET app, send some string to .NET app to save to database). So, how can my iOS app can comunicate with .NET app? Anybody can help me. Thanks :)

+1  A: 

Create web services for whatever messages you need sent to your .net app. Then look at NSURLConnection to figure out how you can make those 2 communicate.

domino
A: 

I agree with domino (and I voted his response as an answer). .NET web services would be the way to make this work. Web Services were created with the intent of allowing applications on different architecture and technology to communicate together. If you are looking to build an iPhone app that reports usage or saves user data "in the cloud", you would need to have the iPhone app call a .NET web service.

Jeremy
I also need my iPhone app tell .Net app show an alert, can i do it with webservices. Sory about this question because i don't known about webservices. :D
leduchuy89vn
+1  A: 

If you're looking to communicate with a desktop application on a local network, Bonjour discovery (also called ZeroConf) may be the way to go. Apple makes the Bonjour SDK for Windows freely available, so it appears to be reasonably easy to integrate with your desktop .NET application. Bonjour is already present as part of the networking services in the iPhone SDK.

Using Bonjour, you can transparently detect the presence of an iPhone running your application on the local network from your desktop client (and vice versa), making the process of connecting the two trivial. Once networked, you can send whatever data you want between the two. I show an example of this in action in the video for the networking portion of my advanced iPhone development course on iTunes U.

Brad Larson
Thanks Brad Larson. This info is very usefull for my course project.
leduchuy89vn