> ## Content Index
> Fetch the complete content index at: https://developerinsider.co/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to set UserDefault Key Value from Launch Argument?
- URL: https://developerinsider.co/how-to-set-userdefault-key-value-from-launch-argument/
- Published: 2020-05-31T04:51:47.000Z
- Updated: 2020-12-05T11:10:05.000Z
- Author: Vineet Choudhary
- Tags: Xcode, iOS, UserDefault, Tips

This is the best hidden feature of UserDefaults. If you pass a `UserDefault` key and value as a launch argument this will set new value for that key. You can use this trick to override current value for any key. This will help you a lot in debugging.  
![](https://github.com/developerinsider/developer-insider-content/blob/master/POST/iOS/TipsAndTricks/Best2/UserDefault.png?raw=true)  
Here the screen-shot for above key -

![](https://github.com/developerinsider/developer-insider-content/blob/master/POST/iOS/TipsAndTricks/Best2/UserDefaultDemo.png?raw=true)