If the primary issue is NSCoding, I've done this with the @objc() attribute before the class declaration like this:
@objc(MyCodedClass) class MyCodedClass: NSObject, NSCoding {
...
}
This causes NSCoder to use just the name of your class without the module name attached (the way that it would do it if the class were implemented in Objective-C)
Also - here is something I just learned that totally fixed a problem I was facing. I had a couple versions of my app ship before I did the above @objc() fix on my encoded classes, so there are basically encoded versions of Module1.MyCodedClass
floating around (stored in a database) and I needed to be able to decode those as simply MyCodedClass
objects now. You can do this in NSKeyedUnarchiver
like this:
[NSKeyedUnarchiver setClass:[MyCodedClass class] forClassName:@"Module1.MyCodedClass"];
So far, in my testing it works perfectly...as long as you set the class for the old classname prior to ever attempting to decode an object, you should be set. Whenever you attempt to decode Module1.MyCodedClass
objects, it will decode them as MyCodedClass
objects.