AIR mobile debug - "Enter ip address or hostname" - ios

I'm developing a mobile app using Flash Builder 4.6/AIR. I've been able to debug on the device (an iPhone 4s) just fine until now. I connect my iPhone to my mac with the USB corad, and debug.
All of a sudden I'm getting a black screen for close to a minute. Then I see the "Enter ip address or hostname" dialog. If I enter the ip address of my machine it doesn't matter. The window goes away for about 15 seconds, then comes back. Meanwhile, Flash Builder on my mac times out. The only way I can actually see the program running is if I hit 'Cancel' on that dialog. The app then launches, but I cannot set any breakpoints, cannot debug.
Everything I've found on the internet around this issue mentions it in reference to AIR for android -- not iOs. But I'm seeing it with iOs.
Anyone know what's going on here?
Thanks.

To make it easier for future readers, the official answer to this issue;
With the current (official) version of the AIR SKD (3.2) USB debugging is not supported on iOS devices. This is going to change with the future 3.3 release which (amongst others) adds USB debugging support:
"USB debugging for AIR iOS
This new feature allows the iOS developer to connect to the desktop via USB while debugging their mobile applications instead of relying on network connectivity."
With version 3.2, iOS debugging works over the local network, so both devices (the machine the debugger runs on and the iOS device) have to be in the same network so that they can communicate with each other.

See also the reply to What is the address of my Flash debugger?, it really helped me to resolve similar issue. Using 'ios-debug' mode was the way to go.

If you still have this problem using Android with the device connected to same wifi, try checking firewall rules. In my case FlashDevelop was blocked and I didn't suspected because of updates worked perfectly.

Related

Xamarin VS Windows - IPhone does not show up

I'm using Visual Studio for Windows and I have a Xamarin Forms app for Android and iOS. I mostly test physically on Android (since that is much easier) and I have tested on an IPhone as well about a year ago, which worked fine (without a mac). Now I plugged it in again and it doesn't work anymore: the IPhone does not show up in the debugging list.
I have:
Apple Developer account and I'm connected with this account from Visual Studio
Identifier for Bundle
Profile (created by VS itself, with Type 'Development')
What am I missing here? I haven't added the provisioning profile in my solution, is that something that needs to be done? Am I missing another step?
I hope someone can help.
For the exact breakdown on how to setup and get started with your iOS solution, follow Microsoft's Xamarin iOS on Windows guide.
The tl;dr though is: you absolutely need a Mac to run a Xamarin iOS project, even on windows. I do not know how you had your project setup last time, however this has been the case since Xamarin's debut. Although, you could also just have access to a Mac through network connection instead of having a physical Mac. Without a physical device, you can use the Mac's ios simulator. If you are planning on using a physical iphone though, said device needs to be plugged into the Mac and not the windows machine. Later MacOS do support wireless connections of trusted devices, but it is still a wireless connection from the iphone to the mac (needing to be on the same network).

How to debug an app on iPhone without internet

I'm using Xcode 10.1, and I don't have a checkbox whether I want to connect through network or not on my device page (which was there in Xcode 9 and Xcode 10 beta). Search "connect via network xcode" on google images if you don't know what I mean.
However, I must debug the offline flow of my app (which is written in React-Native btw). Not just no-internet-connection, but turning off wifi and mobile-data, which will trigger a status change. By using the developer settings of the iPhone, I can make every call fail (100% loss), but cannot change the internet-status of the phone.
So I want the debugger to stay connected and either be able to:
debug the old-school way through the cable (if I turn off internet now, I get a red error screen and nothing is possible anymore), so I can disable wifi and mobile-data,
or simulating that status change on the phone.
Btw, I cannot use a simulator, since the app requires Bluetooth.
Thanks in advance!
Edit:
The checkbox is not there for older iPhone devices. With iPhone 7s, I do see the checkbox "connect via network". But enabling or disabling does not change the fact that your iPhone needs internet to debug. If I disable internet on the phone I get the following error:
Ok, I've found the problem. We are testing on a iPhone5, which is no longer officially supported by Apple. Which means that Apple has decided to cut features for iPhone5 so you would buy a new one (wonderful strategy =/). Hence debugging with a cable is no longer supported on iPhone5.
We tested with a iPhone6 from a colleague, and everything works fine.
Edit:
Altough the checkbox is there, and I can disable wifi for connection... The moment I turn off internet on the phone, the app crashes and says: "Runtime is not ready for debugging: make sure packager runtime is running"... so no solution yet...

Xcode 9 Wireless debugging not working

For some reason the wireless debugging does not work here. Here is what I've done:
Using newest Xcode 9
Using newest iOS 11 on my iPhone 7+
Both devices are in the same network
Connected the iPhone via Lightning, selected "Connect via Network" in the Devices & Simulator menu
Run an app on the iPhone while still connected via Lightning - everything works
But as soon as I unplug the phone, Xcode is no longer able to connect with the phone. I can ping the phone with the Mac, but even the "connect via ip" option in Xcode does not work.
Anybody got tips on how to get this working?
I had the same issue, but it was intermittent - i.e. sometimes the globe would not appear next to the phone name in Xcode Devices and Simulators window and when the phone was disconnected from the lighting cable, I could not debug to it from Xcode. My fix was much simpler, though - I just turned WiFi on and off both on the Mac and on the phone. After the devices reconnected to the network wireless debugging was available again. This seems to be an issue with the network communication (regardless whether the device can be pinged or not).
Make sure System Preferences->Internet Sharing is enabled using USB ports:
I was able to find a solution to this on another stack overflow question:
How do you perform wireless debugging in Xcode 9 with iOS 11, Apple TV 4K, etc?.
You can also check this answer: "Connect via network" wireless debugging not working Xcode 9
Near the bottom, from "IOS DEV". Briefly, the solution ended up to be to unpair my phone, disconnect and re-pair. After that Xcode automatically added it with the globe. As an FYI, I was able to ping my iPhone using the network utility prior to the un-paring but was still unable to get the phone to connect. good luck.
Restarting xcode is the only thing that fixed this intermittent connectivity problem for me.
I realized this can also happen if my Mac is connected to a VPN. I had to:
Kill the VPN connection
Turn the computer's wifi off and back on
Open Devices and Simulators
Plug the device in and the globe icon should appear.
Unplug the device and make sure the globe icon is still there.
Run the app via network!
Wireless debugging mysteriously stopped working for me until I turned off my VPN client. I now believe that I had the VPN turned off when I was trying it out the first time, but then the VPN auto-connected after my computer restarted sometime later.

Does iOS 8.3 now support Wifi debugging?

I updated iOS on my phone to 8.3 and I saw this message popup on first boot, but I have not seen it since:
I have been searching all day for information and I can't find a single reference to this message or to Xcode supporting wifi debug.
I am using a macbook pro 2009 model, and I have read that this is not compatible with the new continuity features (as well as airdrop etc). I am wondering if this is part of the wifi debug (and also if BTLE is involved at all). Of course it is all speculation since I cannot find any documentation about this.
Has anybody used wifi debug, or can point me to any documentation?
No, the feature was disabled as it causes serious security flows, for example when debugging you can fake location for any app, access confidential data like your number, udid etc. WiFi can be used now only to sync using iTunes.
It's restricted to USB only. You would need to write a bridge between USB and WiFi. You could in theory connect iPhone to Raspberry Pi, use open source crossplatform libMobileDevice. And mirror all USB requests from your XCode to this device USB.

ipad programming with vpn issues

Do iPad in the simulator and the Macbook share a same network? I have connect a wifi then VPN on my Macbook and everything works just fine on the outside Safari. But when I open the iPad simulator and it seems on that inside Safari the VPN is not set up yet cuz I cant access to my specified website. (But internet still works. I guess it is the wifi)
Not sure if I make it clear. I wonder how can I solve this problem. Thanks for helping!
Generally the iOS Simulator runs with the same IP and actually in the same process space as other applications on your Mac.

Resources