-
-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add SecureEncoder support to PFFileObject #1768
base: master
Are you sure you want to change the base?
Conversation
Thanks for opening this pull request!
|
I will reformat the title to use the proper commit message syntax. |
Would you want to add a test so we can merge this? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1768 +/- ##
===========================================
+ Coverage 64.24% 82.76% +18.52%
===========================================
Files 201 282 +81
Lines 23233 30741 +7508
===========================================
+ Hits 14926 25443 +10517
+ Misses 8307 5298 -3009 ☔ View full report in Codecov by Sentry. |
New Pull Request Checklist
Issue Description
PFFileObjects can be used outside of a PFObject subclass. When archiving them and other objects using the NSSecureEncoder, the encoder now fails with an error that PFFileObjects are not secure coding compliant.
Fine - in Objective-C, I create a class extension to add it. Works fine. However, when I go to change that extension to Swift, the compilation fails with the error that NSSecureCoding cannot be added in a class extension (but must be done by the original class).
Closes: #1736
Approach
Add NSSecureCoding to PFFileObject:
supportsSecureCoding
PFEncoder objectEncoder
PFDecoder objectDecoder
TODOs before merging