Class MCNearbyServiceAdvertiser

  • All Implemented Interfaces:
    NSObject

    public class MCNearbyServiceAdvertiser
    extends NSObject
    MCNearbyServiceAdvertiser MCNearbyServiceAdvertiser advertises availability of the local peer, and handles invitations from nearby peers. To create the MCNearbyServiceAdvertiser object and start advertising to nearby peers, a new MCPeerID should be created to represent the local peer, and a service type needs to be specified. The serviceType parameter is a short text string used to describe the app's networking protocol. It should be in the same format as a Bonjour service type: up to 15 characters long and valid characters include ASCII lowercase letters, numbers, and the hyphen. A short name that distinguishes itself from unrelated services is recommended; for example, a text chat app made by ABC company could use the service type "abc-txtchat". For more detailed information about service type restrictions, see RFC 6335, Section 5.1. The discoveryInfo parameter is a dictionary of string key/value pairs that will be advertised for browsers to see. Both keys and values must be NSString objects. The content of discoveryInfo will be advertised within Bonjour TXT records, and keeping the dictionary small is good for keeping network traffic low. MCNearbyServiceAdvertiser must be initialized with an MCPeerID object and a valid service type. The discoveryInfo parameter is optional and may be nil. A delegate that conforms to the MCNearbyServiceAdvertiserDelegate protocol must be provided. No assumption should be made as to which queue the callbacks are called on. See Bonjour APIs https://developer.apple.com/bonjour/ for more information about service types.
    • Constructor Detail

      • MCNearbyServiceAdvertiser

        protected MCNearbyServiceAdvertiser​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • discoveryInfo

        public NSDictionary<java.lang.String,​java.lang.String> discoveryInfo()
      • serviceType

        public java.lang.String serviceType()
      • startAdvertisingPeer

        public void startAdvertisingPeer()
        The methods -startAdvertisingPeer and -stopAdvertisingPeer are used to start and stop announcing presence to nearby browsing peers.
      • stopAdvertisingPeer

        public void stopAdvertisingPeer()