I am trying to make a connection using bonjour and bluetooth between my mac and my iPhone.
I´ve been reading a bit and from these sites I have learned that I cannot use NSNetService as I did on my first attempt.
Bonjour over bluetooth WITHOUT Gamekit ?
Bonjour over Bluetooth on iOS 5.0
So I have modded the DNSSDObjects sample code to use the kDNSServiceInterfaceIndexP2P flag instead.
DNSSDObjects
But I still cant connect my iPhone with my mac. If I change the flag back to kDNSServiceInterfaceIndexAny I can make a connection over Wifi (lan). But no luck using kDNSServiceInterfaceIndexP2P or kDNSServiceFlagsIncludeP2P using bluetooth.
Is there something missing, is it even possible to connect OSX and iOS using bonjour and bluetooth?
Related
i'm an iOs developer and I actually need to make a mac application that use bluetooth framework to connect to another device (not iOS device).
I'm actually showing a modal view showing the connected bluetooth device with IOBluetoothDeviceSelectorController and I get the user choice with [modal getResults] but I don't know how to initiate the connection with the selected device and I can't find a simple way to do it on the mac dev library.
is anyone know a tutorial or sample code that could help me advance in my project?
linkos
The Mac Developer Library has two sample Bluetooth projects; connecting to a health thermometer and connecting to a heart rate monitor. There is also video available of the Advanced Core Bluetooth WWDC 2012 session.
I want to be able to transfer basic information (strings and such) from an iOS device to a Mac, and vice versa, via apps installed on each device. I've been trying to get bluetooth on the iOS device, but it seems to only want to connect to other iOS devices.
Bluetooth access on the ios is very limited. As a matter of fact you can only access it through the GameKit.
http://developer.apple.com/library/ios/#DOCUMENTATION/NetworkingInternet/Conceptual/GameKit_Guide/Introduction/Introduction.html
So if you want to share information with a Mac you would have to make the mac appear as an iOS device. I however ignore how you could do this.
In my app I want to notify the user for any internet notifications such as switching from ethernet to wifi or no reachability in System it has to automatically notify my app. I know how to do in iphone app using reachability example but the same doesnt work for Mac OS X Cocoa app. How to implement this using Objective-C in my cocoa app?
Reachability exists on Mac just like iOS. Some of the flags are a little different, but the basic approach is the same. See SimpleReach.
I am new to developing for the iPhone and would love some advice on an app i'm trying to develop.
Is it possible to send commands to an app on iOS 3.2 from OS X using AppleScript. The iOS app will display an image and run a small script when it recieves the appropriate command from the client software running on a Mac Mini. The devices would communicate over an a closed WiFi network.
Before I continue down this path does anyone have any advice on how to setup the communication (i.e. get the app to run in the background and listen on a designated port).
I don't know the full process but I know that various apps do this one way or another, such as 1password and desktop remote mouse apps. I think that CocoaAsyncSocket will help. An alternative to having the iOS app listening on a socket is to open a connection from iOS to OS X and then persist it. You can then send data either way through the connection.
Is this possible?
I want to be able to press a button on the iPhone app and something happens to the Mac app. Maybe via 3G and wifi.
Any ideas?
Yes, both Mac OS and iOS support numerous network APIs, including CFNetwork. You could use Bonjour to let the iPhone discover the Mac (or vice versa).