Argument type 'String' does not conform to expected type 'NSCopying'
Argument type 'String' does not conform to expected type 'NSSecureCoding'
String 是一个 Struct,而 class NSString : NSObject, NSCopying, NSMutableCopying, NSSecureCoding 集成了 NSCopying 和 NSSecureCoding;
所以报错时将 String 替换成 NSString 即可。
网友评论