TCP client connection timesout from iPhone but works in Xcode simulator - iphone

I have the server program running in one Linux virtual machine and client program running in Xcode in another virtual machine. The connection establishes successfully when run in a Xcode simulator but fails when deployed on device. My iPhone is not able to connect to the server from the app.

Related

IPhone connection to Xcode/Mac fails or is flapping

I have very frequent issues with connecting my IPhone to the Mac and getting recognized by Xcode. Either the IPhone is not recognized at all on Mac or Xcode sees the device 2 sec then doesn't see it anymore and flapping this way endlessly. What I do to fix the issue is rebooting Iphone, closing and restarting Mac and disconnecting the IPhone and resetting the USB port with command -> sudo pkill usbmuxd. Sometimes it works but not always in this case I reboot the Mac as well and this process I do it every 3rd time I connect my Iphone. All versions are up to date: Mac, Xcode, Iphone. Do you have the same issues and idea to fix it. By the way I also bought a brand new USB cable but still the same problem.

Virtual Mac XCode iPhone debugging - device not connected issue

Please bear with the question (I know there are many repeats but I am sure this is unique) and read this first before you think of downvoting due to duplicity:
This is pertaining to iPhone connected to my local desktop and XCode running on remote VM
The USB gate software is connecting my iPhone to the VM
It's not that XCode fails to detect it altogether.
It's an iPhone 3GS running iOS 5.1. XCode version is 4.6.
Now the issue:
I have the iPhone UDID added to my Apple developer Profile.
I can very well detect the iphone connected into XCode once I do all the necessary sharing for the USB Gate software. I see the yellow light.
It shows yellow light, shows some of the apps installed while some process is running in background. It shows the UDID and usual stuff.
After few moments though, XCode displays the message Device not connected.
I have already added support for armv6 inside my app, so that possibility is ruled out.
What to do?
PS: for the first time it launched iTunes after detection. However then onwards I disabled auto-syncing from iTunes. And now iTunes doesn't detect it even if I launch it explicitly. XCode does detect it, but after some time disconnects it automatically.
I successfully connected to remote VM installing Logmein's Hamachi VPN software on both my host and VM. Using it, XCode could detect my iPhone device once shared via USB Network Gate.

Get iPhone app to iPod from remote machine for testing

My problem is - I work on a remote mac through Remote Desktop Connection - from a windows host.
I have my app ready on remote mac.
I have my iPod with me, connected to my windows host.
How do I get this app onto my device for testing purpose?
My access to the mac is through RDP.
I edited the rdp connection to allow local usb access to my remote mac, (remotely) hoping that my mac would see it as a device. But it didn't.
Is there any way it would see my iPod?
(I already read this and it requires mac-to-ipod direct connection.)
Or is there any other path I can get my app package on my device for testing through windows machine?
Firstly you will have to add your iPod to the developer portal if you haven't already. Next you can do a build and archive which will export your app into organiser. Click on the app version in organiser and click the distribute button and make sure you select ad-hoc distribution. This will give you a .app packaged version of your app which can then be sent across to your windows machine from your remote desktop where you can then drag it into iTunes and install it on your iPod.
If you are testing lots of different builds of your app over a short space of time then i would suggest using test flight, which can be found easily when googled. It allows you to upload versions of your app through and ad-hoc .app package which ca then be installed across all your devices using the test flight app on your phone. I would only recommend doing this if you are doing lots of builds and testing on lots of devices though.
Hope this helps
Sam

iPhone SDK: Access Localhost through iPad device possible? (while debugging)

While running/debugging my app with an iPad real device, I want to a establish an internet connection to the localhost:8080 on my computer but it does not work! Why does it work with the simulator but not with a real device?
I want to test my app in a real device but not on a simulator..but thats not possible if I don't have an internet connection..is there a workaround for this in Xcode settings or in the actual code?
The simulator is actually running on localhost, the device isn't. Set the ip to the actual internal network ip of your machine running the web server.

Could not receive a message from the device (iPhone)

I built and run an iPhone application on iPod Touch 2.2.1 device, got some problems and made a fix attempt. Now trying to re-build & run the application gives two (2) error popup notes:
Could not receive a message from the device [OK]
Google couldn't find this! The device itself is working happily, I can even launch and use the app I'm trying to install. iTunes looks like it's still connected... What could be the problem?
Restart the iPhone.
Restart your iPhone device. Also, restart Xcode. This worked for me.
Are you using some "cheap" USB cable? This was the cause in my case.
Just got the same message. I fixed it by connecting my iPhone directly to my Macs USB-Port instead of connecting it to a USB-Hub.
I was having the same issue, and it was due to having old WiFi connection settings. I just connect new WiFi in both iMac and iPhone. I never connect via USB. iMac automatically connects to my iPhone and I can debug directly on my iPhone. Sometimes the connection is loose; in that case, I just go to
-> Windows -> Device and simulators -> select my device -> right click -> connect vai IP address.
Just enter an IP address from my iPhone WiFi. For that, just go to --> WiFi of iPhone -> info (symbol) -> IP address.
I also got this messsage, the problem was too many devices (via USB) connected to my MacBook Pro.
Received this message recently and tried the steps above, specifically different combinations of restarting the iPhone, disconnecting/reconnecting it, and quitting/restarting Xcode.
In the end, I restarted my comp and it works fine now.