Call web service running on Parallels from iPhone connected via USB - iphone

I can request a web service running on IIS Express/Parallels from Mac OS with...
http://windows:57239/api/hello
This works fine from the iPhone simulator, but not from an iPhone device connected via USB, when debugging in XCode.
Is it possible to make this work? I would like to debug my API with in-app purchases.

I switched my Parallels instance to Bridged networking mode and let the Wifi's DHCP assign an IP address to it. Then I used this IP address from the iPhone app.
Not entirely satisfying because the IP will vary, but its very cool having an iPhone trigger a break point in Visual Studio running on a virtual instance of Windows.

Related

iPhone With Windows - New Bluetooth Pairing is requested when logging into Windows even though pairing has already been completed on iPhone

iPhone With Windows 10 Enterprise Via Bluetooth Low Energy (GATT)
Bluetooth pairing is requested when logging into Windows even though pairing has already been completed. After that, even if the pairing is done, pairing will be asked again at the next login to Windows every time when the Windows is restarted.
Our iOS app acts as a Bluetooth central and the other as a peripheral (Bluetooth Driver on Windows).
when the app is trying to connect using Bluetooth Low Energy (GATT) at step 5 as mentioned below, new pairing is requested from windows every time when the PC is restarted.
Steps to reproduce the problem:
log into Windows and connect the app to the Windows computer
See the paring request on Windows and on iPhone,
Pair on both Windows and iPhone
Turn off the Bluetooth toggle on iPhone and then turn it on
Restart windows and see the login screen
Start the app on your iPhone and try to connect,
See the paring request on iPhone
With the above steps, if this issue is not reproducible, try rebooting the iPhone instead of changing the Bluetooth toggle at S4.
we also observe the iPhone device is receiving this log from Windows:
default 15:38:27.555377+0530 SpringBoard Received request to activate alertItem: <SBUserNotificationAlert: 0x105916a90; title: Bluetooth Pairing Request; source: bluetoothd; pid: 88>
We observed that looks like the issue reproduces more consistently when the windows restarts or reboots.
On the pairing request alert dialogue on iPhone, If I press "cancel", the app disconnects from the peripheral (Windows). If I press "pair", the peripheral nothing happens. However, Windows continues sending me pairing requests whenever the machine is restarted or rebooted.
We did not observe this behaviour with the Android Device. Windows and Android work without any problem (i.e. No new Pairing is requested once the device is paired in any situation).
In the below screenshots, we could see that the iPhone is already paired in Windows Bluetooth Settings but the Paring is requested from Windows on iPhone to pair again and in the background, our app is successfully connected to Windows using Bluetooth Low Energy (GATT).
Environment:
Windows details
Edition Windows 10 Enterprise
Version 22H2
Installed on β€Ž 5/β€Ž5/β€Ž2021
OS build 19045.2486
Experience Windows Feature Experience Pack 120.2212.4190.0
iPhone OS - iOS 15.6.1 and 16.1.1
Is this a known bug with Windows 10 Enterprise?
Is there any way to get around this issue?
Sample Code to reproduce the problem on iOS:
Our iOS app acts as a Bluetooth central and the other as a peripheral (Bluetooth Driver on Windows)
Initializes the central manager with a specified delegate and dispatch queueself.cbManager = [[CBCentralManager alloc] initWithDelegate:self queue:bleManagerQueue];
Scans for peripherals that are advertising services to discover other Bluetooth devices, passing in the UUID of the service it’s searching for.
[self.cbManager scanForPeripheralsWithServices:(NSArray<CBUUID *> *)serviceUUIDs options:(NSDictionary<NSString *,id> *)options;]];
When the central manager discovers a peripheral with a matching service UUID, The method saves the peripheral as the property discoveredPeripheral and calls connect to it.[self.cbManager connectPeripheral:
[[self.currentConnection device] peripheral] options:nil];
Step 3, when trying to establish a connection to a peripheral, pairing is requested even though pairing has already been completed. After that, even if the pairing is done, pairing will be asked again at the next logon to Windows.
Is this a known bug with Windows 10 Enterprise?
Is there any way to get around this issue?
iPhone Already Paried
Pairing Request on iPhone from Windows
Is this a known bug with Windows 10 Enterprise?
Is there any way to get around this issue?

Fiddler with iphone and ipad - local vhosts not working

I'm trying to run some local testing on iDevices but I must be missing something in the setup. I did that before when it all worked, so maybe someone can helpout:
I'm using Fiddler on a windows machine, have all devices set up via proxies and yes it also captures the traffic of the iphone and ipad.
I've got a few localhost vhosts set up, so running
http://mydomain.local
this works swimmingly on the windows phone via proxy to fiddler. but the iphone and ipad just says the server stopped responding.
The firewall is completely turned off and I can see all other traffic from the iDevices, so what could be the issue? Why does the iphone not read the hosts file but the windows phone does?
Almost a year late, but I had the same problem and can confirm that iOS does reserve ".local" to identify Bonjour-accessible devices
If possible just change your domain extension to something else like ".lan" and your requests will go through the Fiddler proxy as expected.

How to connect TWO android devices to a pc via USB

I wrote an app which runs on two android tablets at the same time. The app enables both devices to communicate with a java server which is running on the pc, via WLAN socket communication.
The problem with the WLAN connection is that it doesn't always seem to be reliable. So I wanted to setup a socket communication to the server via USB cables.
My problem no is how to connect TWO android devices to the server via USB cables. I found this tutorial for connecting ONE device to the server via ADB, but I see no possibility using this approach for two devices:
http://www.anothem.net/archives/2010/10/15/android-usb-connection-to-pc/
Has anyone an idea how to solve it? Thanks!
If your tablet is runs ICS or newer Android OS, then it is very likely that it has OTG capable micro-USB socket, and you can add a USB-Ethernet dongle, and then connect the 2 tablets to your PC over ethernet, instead of USB. This, might be the most elegant solution.
Of course, you'd need a switch (or hub) to connect them together. Also note that, not all USB-Ethernet dongles may work out-of-the-box. You might have to experiment with few models, especially the el-cheapo ones to get them to work.

View localhost site on iPhone on OSX

I am building a .NET website with MonoDevelop on OSX Lion that is targeted for mobile devices.
On my desktop's browser, I am able to access the site via http://127.0.0.1:8080, but I would like to view it on my physical iPhone (I don't want to use the XCode simulator).
My iPhone and Mac are on the same network and I have enabled Web Sharing. I can actually get to the default Apache index.html (http://192.168.1.104:80) page, but I am not able to get to my site (http://192.168.1.104:8080).
I'm newer to the Mac and even less familiar with network management, so I hope I'm missing something very simple.
You may as well turn off web-sharing because web-sharing only operates the built-in Apache web-server.
What is happening is that the web-server that MonoDevelop is hosting your pages on has been set up to only allow connections coming from localhost. If this is the problem, entering in the lan IP of the OS X machine on the OS X machine will likely also not work (if the IP filtering work like it does on Apache).
You need to find the config files for the MonoDevelop server and allow access from addresses other than 127.0.0.1

Does Bonjour networking work on ppc running 10.4?

I developed an application for Mac 10.5 desktop which communicates with iPhone over wifi using Bonjour service, and it is working fine on Mac 10.5 and able to do required syncing with iPhone over wifi using bonjour.
But same desktop app (although I recompiled for ppc 10.4 and there were some changes in coding like #property needed to be removed, etc.) doesn't work on ppc running 10.4.
I tried in both scenario:
1. Let Desktop be the server and iPhone will find service, published by desktop
2. Let iPhone be the server and desktop will find service, published by iPhone
but in both case I don't get success, either desktop not able to publish service or not able to find service.
Please let me know, if you also faced this type of bug and found some solution in this.
Also if you need more explanation, just ask me.
Thanks,
Sanniv
Bonjour does work in 10.4, even PPC, so it seems like you have a Tiger-specific bug in your code.