To create a method to persist and re-instantiate Mantle MTLModel objects to NSUbiquitousKeyValueStore (iCloud key-value store).
NSUbiquitousKeyValueStore can only store values of class NSNumber, NSString, NSDate, NSData, NSArray, and NSDictionary ("plist types"). The MTLNSUbiquitousKeyValueStore category on MTLModel has been designed to create an NSDictionary representation of a model object in a deeply recursive way, making it suitable for storage in an NSUbiquitousKeyValueStore.
Likewise a model can be instantiated from such a dictionary representation.
Objects that have properties of types that are not either a "plist type" nor a MTLModel subclass will fail to persist in this way (e.g. a property that is an NSSet cannot (as of yet) be successfully stored in an NSUbiquitousKeyValueStore).
Keep in mind that the per-app quota is 1MB, so root objects that represent a large object graph may not be suitable to store this way, but for smaller state object graphs this may be sufficient.
I am proposing the following files as such an implementation. I am interested in community comment or feedback on this approach (or whether I have overlooked something drastically simpler and have overcomplicated things).