Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Swift 5 Where are NSUserDefault.standard value stored on macOS

I have a macOS project Swift 5. I need to store userDefault values. Based on the values users will be granted access to premium features of my app. I like to know if a user is able to view files on their macOS operating system to retrieve the userDefault.standard values.

Basically trying to prevent users from hacking the app. Will users have access and able to change the userDefault values from there file system on there macOS

Example

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

UserDefaults.standard(true, forKey: "premium")

can a user edit a file on system to change this value.
"where/the/path/to/user/defaults"

>Solution :

A user will be able to view them with appropriate tools and alter them. For sensitive information, Id recommends using Keychain.
Even better have this logic implemented on the server side to give you full control over this feature.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading