Re:Extracting Data from an Old iOS App Broken by iOS 14.5
by ChrisMarshallNY on Friday May 28, 2021 @11:48AM
(#27316835)
Hey, thanks for that! I can probably require Codable (even though it has been around for a while, I've only been using Codable a few months).
I'll probably do that. I started it years ago, so it has a lot of legacy. I will probably do a refactor, when I come up for air. A couple of my libs could use a facelift.
more fun facts: user defaults has a limit to how big it can be. And I also think that your library would benefit from using actual types instead of Any, you can actually define this so long as the value is Codable, generics would make the library nicer to work with instead of requiring the dev to cast the type themselves. You basically just switch out Any for a generic and have the Generic conform to Codable. If targeting an iOS version that is 14+ I would just recommend using the AppStorage or SceneStorage property wrappers.