I tried to implement the new iOS14 PHPhotoLibrary "Select Photo" feature.
My code is this simple:
And the problem is, it never triggered the call back 'func1' on line 3 when I select the PHAuthorizationStatusLimited, which is "select Photo";
And what's weird is, when I select "PHAuthorizationStatusAuthorized" which grant all photo access, it goes into line 3 without any problem!!!
Please help!!!!
[PHPhotoLibrary requestAuthorizationForAccessLevel:PHAccessLevelReadWrite handler:^(PHAuthorizationStatus status) {
if (status == PHAuthorizationStatusLimited || status == PHAuthorizationStatusAuthorized) {
//Func1;
} else {
//func2;
}
}];
}
Post
Replies
Boosts
Views
Activity
Run my iOS App on a simulator, or real device
Open the Console.app in MAC
Force quit and relaunch the app
Check the logs
I see this logs appearing as a "Fault", but I have no idea where it comes from, and I could NOT find any information from Apple as well. Could you provide more information on this error? Where should I start to debug it? What does it even mean? Is it a security thread to the app?
We have a huge enterprise app, there is no way that I would locate the issue with just these description, without any stacktrace. Could you please help?
FYI: There is NO crash or unexpected user behavior.
-[NSKeyedUnarchiver _warnAboutNSObjectInAllowedClasses]: NSSecureCoding allowed classes list contains [NSObject class], which bypasses security by allowing any Objective-C class to be implicitly decoded. Consider reducing the scope of allowed classes during decoding by listing only the classes you expect to decode, or a more specific base class than NSObject. This will be disallowed in the future.
My app is NOT using CoreData.
But I'm seeing this fault error in Console.app from mac when I build my iOS app:
CoreData: One or more models in this application are using transformable properties with transformer names that are either unset, or set to NSKeyedUnarchiveFromDataTransformerName. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead. At some point, Core Data will default to using "NSSecureUnarchiveFromData" when nil is specified, and transformable properties containing classes that do not support NSSecureCoding will become unreadable.
What could be the cause of it?
What's the potential security issue it will cause to the app?