How to clear Bonjour cache programmatically on iPad? - ios

I'm having a strange behaviour with the Bonjour service discovery on the iPad.
My code which probably is not the best yet, sometimes is not able to discover a bonjour service.
For this conclusion I had my Macbook open at my side with a little app called Bonjour explorer, and a small app on a Windows XP PC which is a Bonjour service.
First I had to struggle with Windows XP side, which also seems an enemy for Bonjour services. But when it was getting discovered all the time by the Macbook app, the same was not happening on the iPad side.
My question is:
Is there any recommend way of establishing a connection with a Bonjour service using the iOS API?

Related

Mirror MacBook Desktop on iPhone?

I was wondering if anyone have any ideas of how you could mirror a MacBook desktop on to an iPhone. I'm not looking for an app to install but a way to program it myself. What would be the best approach?
And to clarify, I'm not looking for a way to mirror my iPhone to my computer, but the other way around.
Thanks for any answers you might have
What you are talking about can be achieved in a number of ways. You need a server component running on the MacBook, which vends a video stream of the MacBook display(s) over a suitably secure network connection, and your app on the iPhone behaving as a client to this video stream. VNC (Vertual Network Computing) is the established, open, system for doing this. Conveniently macOS has a built in VNC server (Screen Sharing in the Sharing preference pane), so the server side is already done. Your app will need to implement the VNC client. I suggest you start by looking for existing open source implementations for this functionality, http://cocoapods.org

Bluetooth iOS Windows

I recently developed an application for a client, an app iOS, Android and windows, the mobile app acts as a controller and launches certain events on the windows application. The Windows application also shares data at random (not known to the mobile app) moments. The communication was done by TCP. And works great.
The client now wants it for bluetooth. Between Android and Windows, it's not been a problem and has been done, and works well. But iOS is sadly not the same story... The use of Bluetooth low energy seems to complicate things.
I've hunted high and low on google to find anything on communication between a .net application and a Swift application, to no avail. This surprises me that no one talks of a bluetooth communication between Windows and iOS.
My question is, very simply. Is it possible? I know very little about bluetooth and I've tried researching devices and all I find is a BeeWi device that's in our office, not my computer (I maybe need to launch something on computer first? The devices are paired)
My computer has a Bluetooth 4.0 dongle and the BLE emulator is present in the Device manager.
If this isn' possible, tell me know and put me out of my misery, otherwise give me hope!
Any additional advice is warmly welcome - Thank you all !
Beau Carrel
Windows has support for being a BLE client. Just Google it and you'll find many examples, such as https://developer.microsoft.com/en-us/windows/iot/Samples/BLEGatt2.
You need to set up iOS to be an advertising peripheral.

General questions about Bluetooth

I have been fiddling with Bluetooth lately and I feel as if there is some elusive thing I am missing, anyways here are some of my questions. What I want is to have my Bluetooth enabled laptop running Windows, communicate with my iOS and later Android devices.
Is Bluetooth LE compatible with older Bluetooth technologies?
-My believe is that Bluetooth LE is the same as other Bluetooth versions
only that of course, as the name implies, it is low power. My confusion arises from the fact that on the iOS page they refer to some of the schemes as GAT servers , and what I am guessing is another protocol, ATT. Upon reading the article posted Here there is no mention of these two only L2CAP. As well as there is no mention of those in the Bluetooth API for windows Programming with Windows sockets The protocol that this article mentions is RFCOMM
-How is a connection between the two devices started?
I know that there are service ID's which can be published in an internal Service Description server according to the article previously referenced. However there is no concrete mentioning on the iOS bluetooth pages. They mention peripherals advertising bundles of data and the central device connecting to it. No mention of SDP, unsure if the windows docs do. And I' am bit confused about how the process flows, do the two devices connect first and then one device checks what services are available and the other one subscribes? Here by services I mean which applications are running, and by connection I mean as in establishing a connection from say (in iOS) Settings>Bluetooth and then starting the application on your phone, and then it is able to scan, or can the process of enabling Bluetooth and establishing a connection be done in the application itself. Same for windows, do I have to start the Bluetooth device by Settings>Bluetooth or can it be triggered within the Bluetooth enabled application?
-Is it pivotal to assign which device is the central and which is the peripheral?
Since at the end of the day they are able to both exchange data. In my case I want to have my computer running windows communicate with my iOS 7 device. Now as mentioned there are two roles that you could choose from in iOS: Peripheral and Central. It makes sense to me that the phone should be a peripheral since the main application will run on my computer, and I want my computer to enter the listening state before the device, and have the device connect afterwards. But it makes sense to have my computer advertise its services and then letting the iOS application choose the correct one. If someone could give me some pointers on what the best practices are and how to tackle this problem, I'd appreciate it.

Ios filesharing without iTunes or an internet connection

I am working on developing an enterprise application for ios 7 that needs to work offline and then sync with a desktop client (that I also need to write) for data transfer.
My company does not allow wireless or cell data in this area, and would strongly prefer to not use iTunes either.
The question is, how do you transfer data from an iPad over the usb cable to a custom windows program, without iTunes.
The simplest answer would be: iExplorer (http://www.macroplant.com/iexplorer/) plus some kind of a script to automate the data sync.
Otherwise, you can use the ExternalAccessory framework to communicate with the desktop via a USB tether. This would necessitate a desktop client running simultaneously to communicate with the device.
peertalk (https://github.com/rsms/peertalk) does what you want, however the computer side library is only for mac os. Maybe you can port the protocol to windows by looking at that (the license is BSD)
Edit: this guy managed to have it run under linux. It sits on usbmuxd, which also has a windows port, so it shouldn't be impossible.

Demonstrate intranet laptop site on iPad

We have an application which is intended for intranet use. It's not available on the web and we'd prefer to keep it that way.
In house the iPad can connect to the wifi and we can demonstrate the website that way. At a customers is there any way of connecting the iPad to the laptop and showing a website running on IIS off that laptop?
The only way I can think of is by attaching a router to the laptop and running a local network that way, not sure if customers would be entirely comfortable with that
We could also look into some kind of VPN arrangement? It would be so much easier if we could connect the iPad and laptop though
thanks
(Edit) Is Bluetooth a possibility?
I did a huge kludge when I needed something like that. I don't really recommend it because it's annoying, but it works to some level.
Connect your phone to the laptop, sharing the 3G connection via USB.
On the laptop, share that USB connection via WiFi.
Connect the iPad to the laptop's access point (WiFi)
The iPad should now be able to "see" the webserver that runs on your laptop

Resources