Package apple.corenfc

Class NFCNDEFPayload

  • All Implemented Interfaces:
    NSCoding, NSSecureCoding, NSObject

    public class NFCNDEFPayload
    extends NSObject
    implements NSSecureCoding
    NFCNDEFPayload A NDEF message payload consists of Type Name Format, Type, Payload Identifier, and Payload data. The NDEF payload cannot result into a record that is greater than 128KB in size. API-Since: 11.0
    • Constructor Detail

      • NFCNDEFPayload

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

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

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

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

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

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

        @NotNull
        public static @NotNull 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()
      • identifier

        @NotNull
        public @NotNull NSData identifier()
        API-Since: 11.0
      • initWithFormatTypeIdentifierPayload

        public NFCNDEFPayload initWithFormatTypeIdentifierPayload​(byte format,
                                                                  @NotNull
                                                                  @NotNull NSData type,
                                                                  @NotNull
                                                                  @NotNull NSData identifier,
                                                                  @NotNull
                                                                  @NotNull NSData payload)
        initWithFormat:type:identifier:paylaod:
        Parameters:
        format - NFCTypeNameFormat value.
        type - Identifier describing the type of the payload. Empty data indicates field is absent from the payload.
        identifier - Identifier in the form of a URI reference. Empty data indicates field is absent from the payload.
        payload - Payload data. Empty data indicates field is absent from the payload. This initializer uses the maximum payload chunk size defined by the NFC NDEF specification, i.e. 2^32-1 octets. API-Since: 13.0
      • initWithFormatTypeIdentifierPayloadChunkSize

        public NFCNDEFPayload initWithFormatTypeIdentifierPayloadChunkSize​(byte format,
                                                                           @NotNull
                                                                           @NotNull NSData type,
                                                                           @NotNull
                                                                           @NotNull NSData identifier,
                                                                           @NotNull
                                                                           @NotNull NSData payload,
                                                                           long chunkSize)
        initWithFormat:type:identifier:paylaod:
        Parameters:
        format - NFCTypeNameFormat value.
        type - Identifier describing the type of the payload. Empty data indicates field is absent from the payload.
        identifier - Identifier in the form of a URI reference. Empty data indicates field is absent from the payload.
        payload - Payload data. Empty data indicates field is absent from the payload.
        chunkSize - Maximum size of a payload chunk. 0 means no chunking on the payload, i.e. payload is fit in a single record. API-Since: 13.0
      • 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

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • payload

        @NotNull
        public @NotNull NSData payload()
        API-Since: 11.0
      • resolveClassMethod

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

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

        public void setIdentifier​(@NotNull
                                  @NotNull NSData value)
        API-Since: 11.0
      • setPayload

        public void setPayload​(@NotNull
                               @NotNull NSData value)
        API-Since: 11.0
      • setType

        public void setType​(@NotNull
                            @NotNull NSData value)
        API-Since: 11.0
      • setTypeNameFormat

        public void setTypeNameFormat​(byte value)
        API-Since: 11.0
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

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

        public static boolean supportsSecureCoding()
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • type

        @NotNull
        public @NotNull NSData type()
        API-Since: 11.0
      • typeNameFormat

        public byte typeNameFormat()
        API-Since: 11.0
      • version_static

        public static long version_static()
      • wellKnowTypeTextPayloadWithStringLocale

        @Nullable
        @Deprecated
        public static @Nullable NFCNDEFPayload wellKnowTypeTextPayloadWithStringLocale​(@NotNull
                                                                                       @NotNull java.lang.String text,
                                                                                       @NotNull
                                                                                       @NotNull NSLocale locale)
        Deprecated.
        API-Since: 13.0 Deprecated-Since: 13.0
      • wellKnownTypeTextPayloadWithLocale

        @Nullable
        public @Nullable java.lang.String wellKnownTypeTextPayloadWithLocale​(@NotNull
                                                                             @NotNull org.moe.natj.general.ptr.Ptr<NSLocale> locale)
        wellKnownTypeTextPayloadWithLocale:
        Parameters:
        locale - Returns NSLocale object that is constructed from the IANA language code stored with the text payload.
        Returns:
        NSString object base on a valid Well Known Type Text payload. nil if payload is not a text. API-Since: 13.0
      • wellKnownTypeTextPayloadWithStringLocale

        @Nullable
        public static @Nullable NFCNDEFPayload wellKnownTypeTextPayloadWithStringLocale​(@NotNull
                                                                                        @NotNull java.lang.String text,
                                                                                        @NotNull
                                                                                        @NotNull NSLocale locale)
        wellKnownTypeTextPayloadWithString:locale:
        Parameters:
        text - Text message.
        locale - NSLocale object. IANA language code specified by the locale will be saved with the payload. API-Since: 13.0
      • wellKnownTypeURIPayload

        @Nullable
        public @Nullable NSURL wellKnownTypeURIPayload()
        wellKnownTypeURIPayload
        Returns:
        NSURL object base on a valid Well Known Type URI payload. nil if payload is not a URI. API-Since: 13.0
      • wellKnownTypeURIPayloadWithString

        @Nullable
        public static @Nullable NFCNDEFPayload wellKnownTypeURIPayloadWithString​(@NotNull
                                                                                 @NotNull java.lang.String uri)
        wellKnownTypeURIRecordWithString: Used for creating NDEF URI payloads which cannot be represented with NSURL object. These are URIs that contain characters such as 'ä' and 'ö' which cannot be represent by the 7 bits ASCII encoding. API-Since: 13.0
        Parameters:
        uri - URI string. UTF-8 encoding representation will be used.
      • wellKnownTypeURIPayloadWithURL

        @Nullable
        public static @Nullable NFCNDEFPayload wellKnownTypeURIPayloadWithURL​(@NotNull
                                                                              @NotNull NSURL url)
        wellKnownTypeURIPayloadWithURL: Preferred convenience function for creating NDEF URI payload with common URLs such as "https://www.apple.com" or "tel:+1-555-555-5555". API-Since: 13.0
        Parameters:
        url - NSURL object.
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.