Class NSKeyedArchiver

All Implemented Interfaces:
NSObjectProtocol, ObjCProtocol

public class NSKeyedArchiver
extends NSCoder
  • Constructor Details

    • NSKeyedArchiver

      public NSKeyedArchiver()
    • NSKeyedArchiver

      protected NSKeyedArchiver​(NSObject.Handle h, long handle)
    • NSKeyedArchiver

      protected NSKeyedArchiver​(NSObject.SkipInit skipInit)
    • NSKeyedArchiver

      public NSKeyedArchiver​(boolean requiresSecureCoding)
      Since:
      Available in iOS 11.0 and later.
    • NSKeyedArchiver

      @Deprecated public NSKeyedArchiver​(NSMutableData data)
      Deprecated.
      Deprecated in iOS 12.0. Use -initRequiringSecureCoding: instead
  • Method Details

    • getDelegate

      public NSKeyedArchiverDelegate getDelegate()
    • setDelegate

      public void setDelegate​(NSKeyedArchiverDelegate v)
    • getOutputFormat

      public NSPropertyListFormat getOutputFormat()
    • setOutputFormat

      public void setOutputFormat​(NSPropertyListFormat v)
    • getEncodedData

      public NSData getEncodedData()
      Since:
      Available in iOS 10.0 and later.
    • requiresSecureCoding

      public boolean requiresSecureCoding()
      Overrides:
      requiresSecureCoding in class NSCoder
    • setRequiresSecureCoding

      public void setRequiresSecureCoding​(boolean v)
    • archive

      public boolean archive​(NSObject rootObject, File file)
    • ArchiveRootObjectKey

      public static String ArchiveRootObjectKey()
    • init

      protected long init​(boolean requiresSecureCoding)
      Since:
      Available in iOS 11.0 and later.
    • init

      @Deprecated protected long init​(NSMutableData data)
      Deprecated.
      Deprecated in iOS 12.0. Use -initRequiringSecureCoding: instead
    • finishEncoding

      public void finishEncoding()
    • setClassNameForClass

      public void setClassNameForClass​(String codedName, Class<? extends NSObject> cls)
    • getClassNameForClass

      public String getClassNameForClass​(Class<? extends NSObject> cls)
    • archivedDataWithRootObject

      public static NSData archivedDataWithRootObject​(NSObject object, boolean requiresSecureCoding, NSError.NSErrorPtr error)
      Since:
      Available in iOS 11.0 and later.
    • archive

      @Deprecated public static NSData archive​(NSObject rootObject)
      Deprecated.
      Deprecated in iOS 12.0. Use +archivedDataWithRootObject:requiringSecureCoding:error: instead
    • setDefaultClassNameForClass

      public static void setDefaultClassNameForClass​(String codedName, Class<? extends NSObject> cls)
    • getDefaultClassNameForClass

      public static String getDefaultClassNameForClass​(Class<? extends NSObject> cls)