How to detect connected devices on same network including Smart TV [Swift iOS] - ios

I am creating an iOS Application in which I have to show a list of all connected devices on the same network and connect to Android TV. The application's purpose is to create a Remote for Android Tv.
I have used MMLanScan to fetch a list of all connected devices it is returning only IP Addresses but hostnames are nill. Also It's not providing any info to connect with these devices.
I actually want to get a complete idea of how this working will be done in Swift similar to this app
Have somebody worked using this library or any similar one? Any help will be appreciated.

Related

macOS - Get information from connected iOS device via USB

I'm developing a macOS app which needs to detect & get information from connected iOS devices via an USB cable.
I've read here how I can get the name of the devices connected via USB, but I'm only able to get a short name of the device (i.e. iPhone instead of John's iPhone)
I'm looking for a way to retrieve the device's full name, and other information about the device: iOS version, device id, carrier etc.
Can this be achieved using Swift?
Thanks to #Robert's comment, I found out about libimobiledevice's ideviceinfo which does what I needed. I couldn't find a way to directly include it in my app, but I found the imobiledevice-net repo, which has macOS libraries on the release page.
These libraries can be used with the help of Swift's Process class.

Connect to Devices on same wifi network IOS

i am going to create application which will connect to smart TVs on same wifi network.
Here is link to reference app which i want to create.
Apple provide following services to connect to devices:
NEHotspotHelper
Wireless Accessory Configuration (WAC)
Peer-to-peer(Only for apple-apple)
NEHotspotConfiguration
Which one should i need to use and also any reference if you can provide.
I want to share picture and video on TVs as above reference app does.
i Tried EAWiFiUnconfiguredAccessoryBrowser but this only shows homekit devices. i want to connect all TVs that support wifi.
I have gone through many links but could not find what i want.
I just want to know on which SDK/library should i work?

How to send data to apple tv app from my iphone

I'd like to know if there is a way to send some data from my iphone to my apple tv.I'll explain:I want to make an app for my apple tv and extend this app to my iphone.Using the extension in running on the iphone you should send some data to my app in running on my apple tv.Sending data it should not be through wi-fi but using for example the bluethoot.How should I do to build this comunication?Can you explain to me how to do or link me some resources?Thanks to all!
Ps. sorry for my english!
The MultipeerConnectivity framework should allow you to do this. It's available in the SDK and supported by both tvOS and iOS.
The advantage is that you don't have to chose what type of connection the devices use. It supports both WiFi and BT. But if you don't want to use WiFi because wifi is not available, it can by default create a peer to peer wifi network between devices.
https://developer.apple.com/reference/multipeerconnectivity
And also, here https://www.hackingwithswift.com/example-code/system/how-to-create-a-peer-to-peer-network-using-the-multipeer-connectivity-framework is a good tutorial.

Communicate iOS with ODB 2

I need to create an app read info from the ODB2 device installed in a car and show the data to the user but in a "funny" way. So I need to read the data and connect the phone to internet simultaneously.
I found this questions:How to communicate with OBD II using bluetooth or wifi using iphone , but is from 2014, maybe now there is something.
I've been looking for an ODB2 device that can communicates with iOS via Bluetooth.
I found a couple of devices that can do the trick (like viecar or bluedriver), but using their own apps. Also, I found some devices that can talk with iOS via WiFi, but it would be annoying to be connecting your device to WiFi, then turning off WiFi and using mobile data again...
So my questions is:
Is it there any way to communicates via bluetooth with an ODB2 devices? Or better said, is it there any ODB2 device that can be used via Bluetooth with iOS?

Bluetooth connectivity using IOS device

Hi i just want to clarify few things after i went through all the details by googling whole day.
Firstly i want to know Can we list all the devices*(including Android,blackberry etc)*using bluetooth connectivity in our ios device?
If yes how do we do??Once listing out the device can we able to connect to it*(including Android,blackberry etc)* ?According to my knowledge we cant connect to any other device using bluetooth as apple wont support.But is there any way can we connect it?Just for my knowledge purpose.
Secondly i went through framework called BluetoothManager where i saw a sample code where it displays a list of devices when bluetooth is ON, but i didnt see IOS devices listing when we use Bluetooth Manager.
So can anyone tel me For what exactly Bluetooth manager is used for and can we connect with ios device to any other Devices and tranfer files using this Framework?Is it possible?
I know about Gamkekit Framework where it is used to connect between two or more IOS devices.
But i am eager to know Other than Gamekit there are any other way where we can connect to other devices using bluetooth.
Please anyone would tel me regarding would be very helpfull for me and others as well.Looking forward to for the answers.
There are three frameworks available in iOS using which you can develop the bluetooth applications:
GameKit: This is the publicly available framework . But using this you can only establish and communicate between only two iOS device. So this framework having its own limitations .
BluetoothManager: This is private framework .I used this framework to discover the non iOS devices . I have established the connection also . But cant able to do the data exchange. I think it is still under development. For the reference you can refer this link
CoreBluetooth: This is also the public framework. This can only discover BLE enabled devices . I have successfully used this to transfer the data between the BLE enabled devices.

Resources