[NSClassFromString(...) alloc] is analog of Activator.CreateInstanceFrom(...) in C#
Introspection is like reflection in C#... isKindOfClass:, respondsToSelector:, conformsToProtocol:
Regular Expression Metacharacters
encoding and archiving
is like DeAndSerialization in C#... encodeWithCoder: NSCoder declares an extensive interface for taking the information stored in an object and putting it into another format suitable for writing to a file, transmitting between processes or across a network... Only objects whose class conforms to the NSCoding protocol can be written to an archive.
The “keyed” archiver class (NSKeyedArchiver and NSKeyedUnarchiver) associate an encoded value with a string key and use that same key when decoding that value; thus instance variables can be encoded and decoded in any sequence. With the other type of coder (NSArchiver and NSUnarchiver) you encode instance variables in a certain sequence, and you must decode them in the same sequence. The sequential coders should be used only with legacy code; new subclasses should use keyed archive coders.
- Archiving is the process of converting a group of related objects to a form that can be stored or transferred between applications. The end result of archiving—an archive—is a stream of bytes
- archiveRootObject:toFile: class method of NSKeyedArchiver. Starting with this root object, each object in the graph that conforms to the NSCoding protocol is given an opportunity to encode itself into the archive.
Swift’s JSON support
- Codable protocol in Swift#4, which allows you to encode and decode your model types to data types such as JSON and property lists, and can be used instead of the NSCoding protocol... the magic of the Codable protocol is that it has the power to automatically generate both of its required methods (encode and init) and the CodingKeys enum
This category has the following 4 subcategories, out of 4 total.