⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.txt

📁 This is an example application that shows how to connect connect two iPhone devices using Bonjour wi
💻 TXT
字号:
BonjourWeb===========================================================================DESCRIPTION:Shows how to find network services that are advertised by Bonjour.This application illustrates the fundamentals of browsing for network services using Bonjour. The BonjourBrowser hierarchically displays Bonjour domains and services as table views in a navigation controller. The contents of the table views are discovered and updated dynamically using NSNetServiceBrowser objects. Tapping an item in the services table causes the corresponding NSNetService object to be resolved asynchronously.  When that resolution completes, a delegate method is called which constructs a URL and opens it in Safari.===========================================================================BUILD REQUIREMENTSMac OS X 10.5.3, Xcode 3.1, iPhone OS 2.0===========================================================================RUNTIME REQUIREMENTSMac OS X 10.5.3, iPhone OS 2.0===========================================================================PACKAGING LISTClasses/BonjourWebAppDelegate.hClasses/BonjourWebAppDelegate.mThe application delegate.It creates, displays and is the delegate for a BonjourBrowser.When it gets the delegate callback, it constructs and launches a URL in Safari.main.mStandard application entry point.BonjourSupport/BonjourBrowser.hBonjourSupport/BonjourBrowser.mA subclass of UINavigationController that handles the UI needed for a user to browse for Bonjour services.It constructs and displays list view controllers for domains and service instances.BonjourSupport/BrowserViewController.hBonjourSupport/BrowserViewController.mView controller for the service instance list.This object manages a NSNetServiceBrowser configured to look for Bonjour services.It has an array of NSNetService objects that are displayed in a table view.When the service browser reports that it has discovered a service, the corresponding NSNetService is added to the array.When a service goes away, the corresponding NSNetService is removed from the array.Selecting an item in the table view asynchronously resolves the corresponding net service.When that resolution completes, the delegate is called with the corresponding net service.BonjourSupport/DomainViewController.hBonjourSupport/DomainViewController.mView controller for the domain list.This object manages a NSNetServiceBrowser configured to look for Bonjour domains.It has two arrays of NSString objects that are displayed in two sections of a table view.When the service browser reports that it has discovered a domain, that domain is added to the first array.When a domain goes away it is removed from the first array.It allows the user to add/remove their own domains from the second array, which is displayed in the second section of the table.When an item in the table view is selected, the delegate is called with the corresponding domain.BonjourSupport/SimpleEditViewController.hBonjourSupport/SimpleEditViewController.mView controller which allows the user to enter a small amount of text.===========================================================================CHANGES FROM PREVIOUS VERSIONSVersion 2.5- Updated for and tested with iPhone OS 2.0. First public release.Version 2.4- Updated for Beta 7.- Significant code changes that adopt Bonjour best practices.Version 2.3- Updated for Beta 6.- Added LSRequiresIPhoneOS key to Info.plist.Version 2.2- Updated for Beta 5.- Converted from CFNetService/CFNetServiceBrowser to NSNetService and NSNetServiceBrowser.Version 2.1- Updated for Beta 4. Added code signing.Version 2.0- Removed check for kCFNetServiceFlagIsDomain flag as BrowserViewController only browses for services.- Changed code so that the application now:-- Updates the UI only once there are no more add/remove events coming.-- Starts the resolve after the selection has changed rather than before it changes.-- Takes into account the port number and the various fields from the TXT record when constructing the URL.-- Asynchronously resolves services; the user should control cancelation, rather than an arbitrary timeout.-- Shows the network status activity indicator when resolving -- Uses a nib file for the main window.================================================================================Copyright (C) 2008 Apple Inc. All rights reserved.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -