is there any way to create an ios app that can pair ios device(iphone/ipad) to Mac/PC, so I can send a command like wireless keyboard sent to Mac/PC?
You cannot connect an iPhone to another device for file transfer; the only profiles supported are hands-free and tethering. (Read the rest of the thread for details). There are many ways to transfer data between an iPhone and other devices, but BlueTooth is not on the list.
Also this link may help you.
nevermind,
I've found the way to communicate
Related
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.
I am using EASession (External Accessory) library to integrate with my Non-BLE Bluetooth device. I am looking for a way to pair my device automatically without the need to go to the: iPhone Settings->Bluetooth->select my device->and manually click on the device.
is there a way I can get the list of all Bluetooth devices which already paired and send a connection command?
Objective-C answer will be appreciated
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.
I am developing an iOS application that talks to a lightning accessory. Now, when the accessory is attached, I cannot use the lightning port to debug my application in Xcode.
Is there a way to attach debugger to my application when a lightning accessory is connected to iOS device?
or
Can I somehow attach the lightning accessory to my Mac, and debug it in simulator?
I know some people are talking about WiFi debugging, but that is not supported in Xcode 6.
With Lightning accessories, there doesn't appear to be an option for connecting both Xcode & the Accessory at the same time. I think this has something to do with the way Lightning cables require authentication hardware inside (so nobody has been able to come up with a dongle/splitter). The solution I ended up using was a remote logging tool that sends log messages via network to your Mac. I use NSLogger but there is also CocoaLumberJack.
Granted, you have to pepper your code with log messages for this to be useful and there are other limitations, but it is better than nothing. You can also clean up your log messages by using a custom log macro (Objective-C only).
I am attempting the same thing. I could do it on 30 pin device using the CableJive adapter. But there does not appear to be a way to do this with Lightning. I suspect that since lightning connections (including cable) are all secured though embedded serial number chip, it means that the iOS device only allows one authentication chip per lightning connector, which means no splitters / bridges / Y-Connectors or other items unless approved by Apple.
Apple does have some magic devices for MFI approved developers, but my MFI approval expired, so not sure what they have now for Lightning device testing.
You may be able to connect to XCode wirelessly and develop with the accessory connected. This question may help guide that process.
What does the Xcode 4.2 preference "Support Wirelessly Connected Devices" do?
Wireless debugging is now available as of Xcode 9 or later and iOS 11 or later. A nice write-up on how to connect your mobile device to remotely debug are here:
https://medium.com/swiftist/wireless-debugging-xcode-b6e98e26e022
How do you perform wireless debugging in Xcode 9 with iOS 11, Apple TV 4K, etc?
Is it possible to pair an iDevice to an rs232-bluetooth adapter for the purpose of sending serial commands like it would through an iDevice dock connector to rs232 (just like the Redpark Serial Cable does)? I ask because the company I work for is thinking of having an iDevice control one of our systems for demo. I know it doesn't relate to anything specific but any information would be greatly appreciated.
(See also iPhone to RS-232 via Bluetooth)
Bluetooth modules exists that support MFi (Made For iPhone) such as this one from connectBlue http://www.connectblue.com/products/bluetooth-products/bluetooth-modules/bluetooth-iphone-ios-accessory-module-obs414/ So the standard iPhone Bluetooth stack can make a SPP/RFCOMM connection to that device. That device could be added to a board along with RS232 level-conversion etc... And thus success.
I don't know whether someone sells such a device. The RS232 device that connectBlue sells seems not to support MFi, http://www.connectblue.com/products/bluetooth-products/bluetooth-devices/bluetooth-rugged-serial-port-adapter-rbs433/
Not really. The GameKit is one way to access bluetooth in iOS, but it is very limited in what that API allows you to do.
Depending on what you are building, you might be able to use the Apple Made for iPod program, but it's probably a long shot.
http://developer.apple.com/programs/mfi/
The best way to go is probably to design a device that connects via WiFi. I've gone this route, and it worked out well. If you must interface with something with an RS-232 interface, you might design an intermediary "adapter" that connects via WiFi to the iOS device, and via RS-232 to the other device.
If you don't have a need to distribute your app via the App Store, you can use Redpark's iOS serial cable: http://redpark.com/c2db9.html. (Disclaimer, I've never tried one, but according to someone at Redpark, jailbreaking is not required, you just can't distribute your app on the app store.)
You could design a small dongle that attaches via the dock connector, and broadcasts over bluetooth to your other device.
Or you could use WiFi instead of bluetooth... perhaps communicating over WiFi to something that's physically plugged into whatever you want to control.
I worked on a jailbroken app which used BTStack to communicate with a serial device. You might be able to use this for your demo.
If you're still looking to use bluetooth, this helped me out alot to facilitate the standard serial connection for prototyping without jailbreaking:
http://www.seeedstudio.com/depot/bleshield-based-on-bluegigas-ble112-module-p-1367.html
It works on the Bluetooth 4.0 enabled iOS devices and all of the schematic, boardfiles, firmware sources and the iOS App sources are available here:
https://github.com/michaelkroll/BLE-Shield