CFNetwork and Bonjour integration for iPhone to Mac integration
I want to use CFNetwork and Bonjour in conjunction to be able to have communications between my iPhone app and a Mac app. The app on the iPhone would have one button. Then on the Mac app, there will be a label. If the button is pushed on the iPhone app, the label changes on the Mac app.
Is there example code out there that can do this? If not, can someone lead me in the right direction?
- NSNetServiceBrowser/Bonjour issues on iOS
- After upgrading to Xcode 6.3, on launch I now get the error: “The Bonjour service could not be resolved.”
- Disconnecting with server immediately after connecting
- Bonjour not advertising over BT
- Bonjour Service Browser with Swift does not fetch serviceinfo
- Using iOS GameKit's “Bluetooth Bonjour” with other platforms
2 Solutions Collect From Internet About “CFNetwork and Bonjour integration for iPhone to Mac integration”
Bill Dudney created a sample iPhone Bonjour application to demonstrate how to use Bonjour to discover and connect to two iPhones. I ported this example to the Mac to demonstrate how to do Bonjour discovery between the two platforms. Bill also provides a nice writeup of how he put together the Bonjour wrapper used in this example.
This is a very simple example, and with the Mac and iPhone clients it does something similar to what you want. Only minor modifications should be needed.
I show this in action in the video for the Networking session of my Advanced iPhone Development course on iTunes U.
- ios 8 – buttons in horizontal scroll view intercepting pan event – scroll does not work
- Viewing SQLite3 Database (XCODE)
- Difference between using Generic and Protocol as type parameters, what are the pros and cons of implement them in a function
- Using #pragma to suppress “Instance method not found” warnings in Xcode
- How can I sort multiple arrays based on the sorted order of another array
- How can I debug in a framework in Xcode?
- Keep UIAlertView displayed
- UICollectionView only calling didSelectItemAtIndexPath if user double taps, will not call when user single taps
- XMPP library for iOS (iPhone/iPad)
- How can a get the auto layout size of the UICollectionViewCells in iOS 8? (systemLayoutSizeFittingSize returns size with zero height in iOS 8)
- how to access segue in 'didSelectRowAtIndexPath' – Swift/IOS
- What's a reliable way to make an iOS app crash?
- What is the selector syntax for Core Data custom policies?
- When to use categories and when to use subclassing?
- iPhone: How to convert “yyyyMMddThhmmss” format string to NSDate?