@eskimo Is it possible to download the older/fixed version of instruments somewhere? And would it work with newer versions of Xcode?
Post
Replies
Boosts
Views
Activity
Thanks. The relevant piece that I was missing is that it's not just the literal topLevelClasses that need to be registered with the NSSecureUnarchiveFromDataTransformer, but also any classes contained in the transformable if it's a collection. Therefore, if my NSDictionary has a custom class inside it, I need to register a subclass of NSSecureUnarchiveFromDataTransformer to allow that class.
@objc
class DataTransformer: NSSecureUnarchiveFromDataTransformer {
static let name = NSValueTransformerName(rawValue: String(describing: DataTransformer.self))
@objc(registerValueTransformer)
public static func register() {
let transformer = DataTransformer()
print(DataTransformer.allowedTopLevelClasses)
ValueTransformer.setValueTransformer(transformer, forName: name)
}
override class var allowedTopLevelClasses: [AnyClass] {
var topLevelClasses = super.allowedTopLevelClasses
let myClasses = [MyClass.self, MyOtherClass.self]
topLevelClasses.append(contentsOf: myClasses)
return topLevelClasses
}
}
FIXED *
Though I had setup up the correct profile for the "Release" build, the "Debug" build needed it's own profile, which I had neglected to generate.