Sending a Message from a iPhone to a Mac - objective-c

How would I send a message to an App on my mac (which I develop) from my iPhone via WiFi?
This message would then make something happen in the Mac App.
This is just a fun app for myself so it doesn't need any security like SSL.

I'd recommend looking into a tutorial on Bonjour.
http://www.mobileorchard.com/tutorial-networking-and-bonjour-on-iphone/
http://www.macresearch.org/cocoa-scientists-part-xxviii-bonjour-and-how-do-you-do

Use TCP to create a connection. Here's a tutorial: http://dev.im.ethz.ch/wiki/Socket_communication_on_the_iPhone
But TCP is extremely common protocol, so on the Mac side you can probably just read up on TCP sockets and be fine.

Related

Can WebRTC work over an Android USB Ethernet connection?

I am trying to use WebRTC on an Android App to stream to a media server running on my workstation using a USB tethering connection. I see have good signaling, with an offer and an answer that seem to make sense with respect to the IP addresses, but I do not get any UDP streaming traffic.
Is there something in the Android WebRtc library that would omit this rndis0 interface? Over Wi-Fi, everything works as intended, but not if the tethered ethernet is the only connection.

ios 7 fetch offline message from xmpp server

I am developing chat application using XMPP protocol.
My development target is iOS 7.0
Every think is working fine user can able to communicate only when they are online.
But I want to notify user message has come when they are offline.
I have tried iphone XMPP App run background
But it doesn’t work for me.
First think it is possible or not?
Using what VIOP, background fetch or some other way?
If yes please let me know. how?.
The thread you are referring mention declaring that your app is a VoIP app to be allowed to constantly run in background.
It is technically possible but has two drawbacks:
If your application does not do voip, Apple will reject it (as misleading).
Battery consumption will be excessive as you will stay connected.
The state of the art is to fallback to Apple push notification service when the TCP connection between the client and the server is not established. This is battery efficient and provide a very good way to notify the user of new messages.

Testing tool for TCP/IP communication

I am creating an iPad app, which has to communicate with a WiFi enable device using TCP/IP protocol. I have the API sets of the device for communication. Now what i want is i would like to see whether the device is responding to the requests send via TCP/IP. Please suggest a good tool for MAC OS, where i can simulate the WiFi communication and get the response messages from the device.
Thanking you guys in advance
I have just started to use MAC OSX recently and I also have the same question as yours.
Luckily I have found a good tool that you can try:
https://packetsender.com/
It's multiplatform, support both TCP and UDP client/server.
If I get your question you may use telnet. With telnet you can establish a TCP connection with the device and communicate with it, sending and receiving messages.

Using iOS device as TCP client - no Bonjour

I'd like to use iOS device as a TCP client, but I can't find an understandable API/guide/sample of how to do that. I tried SimpleNetworkStreams and PictureSharing, but they are both using Bonjour. I can make UDP connections easily, learned via UDPEcho, but I can't find as good sample as UDPEcho for TCP. I want a simple example of connecting to a server, and print in the screen all the incoming messages from the server - that's it.
Thanks!
Have you looked at the AsyncSocket project?
http://code.google.com/p/cocoaasyncsocket/
It supports TCP and UDP. To find it, I googled "cocoa tcp socket class".
Note:
The project was moved to https://github.com/robbiehanson/CocoaAsyncSocket
Bonjour is just a way to announce services — not a replacement for tcp/udp.
The services still use tcp or udp.
ASIHTTPRequest makes your life easier.
edit
As I mentioned above: tcp is a basic protocol for services, while Bonjour can announce services. So see this tutorial and dont care about the Bonjour stuff.
May google be with you!

Monitoring packets going in and out of an application

I'm building a VoIP application using the TeamSpeak 3 SDK. Is there any way to view the UDP packets going in and out of the server/client applications?
Any packet sniffer such as Wireshark (formerly Ethereal) can do that for you.
Did you already try Wireshark?