Class MCAdvertiserAssistant

  • All Implemented Interfaces:
    NSObject

    public class MCAdvertiserAssistant
    extends NSObject
    MCAdvertiserAssistant MCAdvertiserAssistant is a convenience class that handles advertising, presents incoming invitations to the user and handles user's responses. To create the MCAdvertiserAssistant object 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". 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. A delegate that conforms to the MCAdvertiserAssistantDelegate 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

      • MCAdvertiserAssistant

        protected MCAdvertiserAssistant​(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()
      • initWithServiceTypeDiscoveryInfoSession

        public MCAdvertiserAssistant initWithServiceTypeDiscoveryInfoSession​(java.lang.String serviceType,
                                                                             NSDictionary<java.lang.String,​java.lang.String> info,
                                                                             MCSession session)
      • serviceType

        public java.lang.String serviceType()
      • start

        public void start()
        The methods -start and -stop are used to start and stop the assistant.
      • stop

        public void stop()