How to communicate between iOS and OS X - ios

I'm trying to make an app to allow me to switch from playing music on my computer over to my phone and back. I have it largely implemented, but I have reached a snag. Namely, how to tell the other device that it should start the transition.
How should I go about communicating between these devices? (iOS 9 iPhone and OS X 10.10 Macbook)
I thought about Bluetooth and the Multipeer Connectivity framework, but I'm not sure they really fit what I'm trying to do. I need to be able to send some information back and forth about what song to start playing and when to begin the transition.
Any help on the best way to go about this is welcome
Thanks,
-tlf
P.S. I'm using Swift, so any examples in that would be especially appreciated.

Related

ROBOTC: Talking to EV3 brain from Android app developed in Xamarin through Bluetooth

This one's a doozy: I'm developing an Android app in Xamarin which will send messages to an EV3 brick running ROBOTC. Anyone think they could help me with this? I understand that NXT bricks can use sendMessage(); but I'm using an EV3, and can't find a way to use this. Any help on this would be greatly appreciated. As for the type of info I wish to send, either strings or, if not, integers will do.
EDIT: Right, I forgot. The app will be for a Kindle Fire, and preferably held in landscape mode.
RobotC does not have Bluetooth support yet (they are working on it). Once they do get it working, you will need the "EV3 Communication Developer Kit" from the LEGO MINDSTORMS downloads page. This explains the communication protocol. In particular, look for the "mailbox" instructions. This is how messages are passed back and forth between applications.

How to move cursor in Mac OSX through Bluetooth LE?

I am working on iOS app which is similar to Apple Magic Mouse, function of which is to mirror the gestures on the iOS device to the Mac after establishing connection between them using Bluetooth LE.
I've purchased a new HID bluetooth dongle and managed to set up connection using CoreBluetooth Framework for the last whole week.
However, completely no idea on what data of which format should be sent from the iOS device to reflect the gestures.
I've gone over the many tutorials and demos, but still no idea.
Please help me with the solution like the APIs or anything.
Thank you.

Bluetooth Low Energy Emulate Keypress

I am playing around with a TI CC2541 chip, and was wondering if it is possible to send a "keypress" over BLE. This would be similar to the new Muku Shutter for iOS and Android, because I am trying to figure out a way to interface with a mobile device without installing a 3rd party application. Essentially, I would press the button on the CC2541 chip, and then it would emulate a keypress of volume up?
I have been researching for a while now, and all solutions to handle this have included writing a 3rd party application to map the commands in the BLE packet to a system command.
Any help would greatly be appreciated. Thank you!
On iOS the answer is no
Edit:
Exception: You might be able to set up your BT chip as a Bluetooth keyboard.
You could certainly write an app that talks with a remote BLE device and uses an agreed-upon protocol to pass key presses to your app, and then you could interpret those messages using code in your app.
However, Apple enforces a "sandbox" on its apps, and apps are not allowed to interact directly with the system except through very tightly controlled set of APIs. If there is not an official interfere to do something, it is not allowed.
If you were to run on a jailbroken device then the answer would likely be different. I can't help you there however.
Edit:
#OliverMason says in a comment that iOS shutter buttons are apparently single-key BlueTooth keyboards that emulate the volume up button, which the camera app recognizes as a way to trigger a photo. Thus my answer above isn't quite accurate.

How can I programmatically interact between iOS and OS X apps?

This may sound a little strange, so I have to tell you why I am making this app. I just got a very old iMac that has very low processing power. I am attempting to make an application for my iPod Touch that can make it act as an external processor for OS X Panther. I have almost everything worked out, but I need the iPhone to be able to interact directly with the OS X app I am making, like iTunes does.
To be clear, I only want the iPod to work as an external processor by moving data from my OS X app to the iPod app, complete the code blocks, and send it back (thats the easy part). It does not have to work with any other OS X app. What I need to know is how I can send data through the cable to my iOS app directly. If this cannot be done, I have a backup data transmitting solution, but the cable would be much faster. Any ideas?
Good idea, don't post good idea's online ;-)
I'm going to tell you up front; unless you are lucky I don't think you will be able to get this to work.
I know that someone once found out that iTunes uses some kind of daemon program to communicate with your iDevices. I'm not sure if this is still true, but that daemon is undocumented but 'available'. I have no more clues than this, maybe you get lucky and find something on Google.
I'd go with wireless communication, I don't think speed is such an issue if we're talking about small instruction sets.
Also there's this, but I'm not sure if that will be of any help to you.
UPDATE:
found this post: Where is the mount point for the iPod/iPhone in Mac?
Which should help you write to the iDevice disk. You should be able to continuously look for filesystem updates on your device to process the data, and vice versa, to establish some kind of transfer system.

How can I setup peer-to-peer connections without using GKPeerPickerController?

I want people to be able to start my iOS app on their device, and anyone nearby running my app (probably bluetooth only for now) would automatically connect with each other. I've read about and used GKPeerPickerController, but I don't want the user to have to think about which device they want to connect with.
I'm just not understanding how to handle the connectivity without using GKPeerPickerController.
I am targeting iOS 5.0 with this app. Thanks!
This page goes into more detail on how this is possible, although the focus is more on using just bluetooth: http://www.iphonedevsdk.com/forum/iphone-sdk-development/40710-gamekit-api.html

Resources