Settings, preferences and defaults

Most apps save settings in their preferences file managed by cfprefsd as the UserDefaults server. Here’s how to avoid problems that can cause, and how to use the defaults command.

The Eclectic Light Company

Why does πΆπ‘œπ‘‘π‘Žπ‘π‘™π‘’ work for π‘ˆπ‘ π‘’π‘Ÿπ·π‘’π‘“π‘Žπ‘’π‘™π‘‘π‘  initially but break during migrations? This article explains the pitfalls when models change and presents an alternative approach using individual properties.

πŸ”—: https://tanaschita.com/swift-user-defaults-storing-structs by Natascha Fadeeva (@tanaschita)

#Swift #UserDefaults #iOSDev

πŸ‘‹πŸΎ I’m seeking recommendations for other libraries similar to Zephyr (https://github.com/ArtSabintsev/Zephyr) that simplify syncing UserDefaults across iCloud.

#SwiftUI #UserDefaults #SwiftLang #iOSDev

GitHub - ArtSabintsev/Zephyr: Effortlessly synchronize UserDefaults over iCloud.

Effortlessly synchronize UserDefaults over iCloud. - ArtSabintsev/Zephyr

GitHub
#UserDefaults on #iOS18 in #simulator vs iOS 18 on device... Some keys seems device-specific and are not filtered .... πŸ˜•
And I have to get rid of this new key `shouldShowRSVPDataDetectors` (new in iOS 18).
#iOSDev #Swift

There are a few folks talking about the same issue:

An older Apple dev forum thread about prewarming (is this still relevant?)
https://forums.developer.apple.com/forums/thread/667959?page=2

StackOverflow post where folks blame a missing privacy manifest, but that doesn’t make sense does it?
https://stackoverflow.com/questions/77301047/ios-17-userdefaults-getting-cleared-on-relaunching-the-app

#iosdev #userdefaults

Lost data in UserDefaults | Apple Developer Forums

Has anyone else been getting reports of their iOS app’s data just… vanishing? Specifically, it sounds like UserDefaults is being reset. This doesn’t seem to be hitting a lot of my users, but the ones it hits are seeing it over and over.
#iosdev #userdefaults

The problem with lots of progress over the weekend.. is lots of write up too! So many typos... but Lines now has a button that acts just like the paste button but uses an AppGroup and UserDefaults behind the scenes instead of the Pasteboard.

https://www.whynotestflight.com/excuses/okay-but-how-about-all-the-way-up-to-the-view/

#SwiftLang, #WebExtension, #SafariWebExtension, #NativeApp, #JavaScript, #AppGroup #UserDefaults

Okay, but how about all the way up to the View?

A list of distractions

Do you use #EnviormentObjects ? I recently have been preferring #userdefaults any thoughts?

Recent #iOS development journal on data #persistency

1. Implemented everything with #UserDefaults and raw file system
2. Feeling in need of a higher level abstraction
3. #SQLite is too much for now, and I don't want to bother with schema migration on a client device
4. Core Data looks what I need, but friends warned me to avoid it
5. #GRDB seems to hold a good reputation comparing to Core Data
6. Let me try Core Data, it seems to improved a lot recently

#Apple #iOS #swift #CoreData #devjournal

#wwdc2023 on #ios and weβ€˜re raving about getting one basic (but sluggish) button tap for β€žinteractiveβ€œ widgets while the age-old #userdefaults key-value-store needs permission description - phew #innovation #scurve