Ethernet connection to iPhone simulator - iphone

I am trying to make a program that receives UDP data on a port that the user can choose. For this i am using asyncUdpSocket.
I could not find it but i believe there is a way to send data from your mac to the simulator. Can anybody tell me how to do this?
Thanks!

It seems that you can just call the simulator on the ip adress of the mac you are running on.
Sorry for bothering everybody.

Related

iPhone simulator writes to socket fine - but not iPhone

Despite working earlier, my socket chat app now refuses to write to socket on the iPhone!
It works fine on the simulator and again, used to run fine on my phone. I don't really know where to start troubleshooting this issue --- just seems weird. My server doesn't detect anything trying to connect.
Any ideas on how to start troubleshooting this?
Thanks tons.
I did run into a problem where using sockets on the iPhone would not open up the cell phone network unless something else opened it first. I had to run an http call to a generic web site first, and then the sockets would communicate normally. Try putting a call, like sendSynchronousRequest, to a generic web site, like www.apple.com, before opening your socket, and see if it works in that case.
I need to stop wasting all you nice peoples' time.
Long story, my friend updated to iOS 5.1. Now the 3G network reads 4G on iOS 5.1. So I turned off my (5.0) wifi to see if mine cell network was "4G" (which, of course, it wasn't).
But yeah, having turned off wifi my app could no longer join my locally hosted server...
I grabbed Charles though, and it looks handy, so thanks for that anyways. Also Owen's comment about the cell network originally made me think about checking my wifi, as my app shouldn't even be using the cell network yet. But I'll keep in mind what you said for the future.
Thanks everybody!

ffmpeg avformat_open_input not working in device

I have a method in an iOS project that calls avformat_open_input(), it runs very well in the simulator, however, when I try to run it on the device it hangs up and just stays there.
Has anyone seen this before?, Any help would be much appreciated.
That method establishes a connection to the source via URL, RTSP, RTP, etc, if it's hanging up:
Make sure that the source is in fact streaming data at that address and port
Make sure that you are connected to the right network if this is a local connection.
Please let me know how it works out.

Send data from iPhone using 3G connection

I have a Java Applicaction in where I have a TCP Server that accepts conections with Sockets. So I have done a Socket in C inside the iPhone app to send a String to my Java app and when I use the WiFi connection everything works perfect.
I type a string in a textfield in the iPhone app, I press send button and I recive that string on my Java app. But when I turn off the WiFi and I try with the 3G connection nothing happens. What I need to do to get that? There is a differente socket or method to do that?
Thanks in advance.
I think both should work the same. take a look a this:BSD Sockets don't behave in a iPhone 3G environment
Maybe you are using the BSD sockets, those don't activate the 3G radio.

Question about using Bonjour or other methods to secure a connection with a non computer device

So I have a project I am working on, and I would basically like to send a basic yes/no command from the iPhone to a wifi enabled device that is also connectedto the network on the same router. This other device is not a computer, so I am wondering if I can still use Bonjour? In order to use Bonjour, do both of the communicating devices need to have some sort of a script installed and running that is allowing them to communicate? What would be the best way to connect to this device that is connected to the router, and then to send information/commands to it? I could really use some help finding a direction, because once I identify which tools I need to use, I can research them out and get it done (maybe). If anyone could offer any insight/suggestions whatsoever, it would be greatly appreciated!! Thanks in advance
Bonjour is a local service discovery protocol based on multicast DNS. Even if your device supports it you still need some piece of software on the device to listen to your commands.

iPhone - see app documents folder using wifi?

The iPhone settings have an IP address for the device when it is connected to a wifi network. Is it possible to get this IP address and establish a connection between a desktop computer (on the same network) and the iPhone?
I want to be able to transfer files between the iPhone and the desktop computer. Some apps like the "Files" and "FourTrack" apps do this.
Can someone please guide me to where I can start?
Thanks a lot for any headsup
Google for SIOCGIFCONF and you'll find a bunch of example code in C for getting all your IP addresses. Once you've enumerated your devices, on iPhone they are always in the following order: Loopback, WiFi, WAN.
Once you have that, you can implement a web server with CocoaHttpServer pretty easily. You'll have to hack it to add directory listings and the like, but it's not too hard. It's not trivial, but it's not too bad.
I think you already answered your question... you have to download an app to do this. I use "Air Sharing" and it works fine.