You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (allowedCodingPropertyNames.count && ![allowedCodingPropertyNames containsObject:property.name]) return;
44
44
if ([ignoredCodingPropertyNames containsObject:property.name]) return;
45
45
46
-
id value = [decoder decodeObjectForKey:property.name];
46
+
// fixed `-[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSNumber'(This will be disallowed in the future.)` warning.
47
+
id value = [decoder decodeObjectOfClasses:[NSSetsetWithObjects:NSNumber.class, property.type.typeClass, nil] forKey:property.name];
47
48
if (value == nil) { // 兼容以前的MJExtension版本
48
49
value = [decoder decodeObjectForKey:[@"_"stringByAppendingString:property.name]];
Copy file name to clipboardExpand all lines: README.md
+54-12Lines changed: 54 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,8 +29,6 @@ MJExtension
29
29
#### ‼️ `@objc` or `objcMembers` attributes should be added to class or property for declaration of Objc accessibility [在 Swift4 之后, 请在属性前加 `@objc` 修饰或在类前增加 `objcMembers`. 以保证 Swift 的属性能够暴露给 Objc 使用. ]‼️
30
30
#### ‼️ Use `NSNumber` instead of `Bool`, which is not bridged to `BOOL`. [请勿使用 `Bool` 类型, 因为在 Swift 中并没有桥接该类型, 不能显式的对应 `BOOL`, 请使用 `NSNumber` 替代] ‼️
0 commit comments