Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Programmer

macrumors member
Original poster
Jun 16, 2009
79
0
In my application i need register my NSUserDefault it had been working fine until now, Could someone please help i don't know what is wrong with this:

[[NSUserDefaults standardUserDefaults] registerDefaults:mad:"Friend1"];
 
It will help if you learn to use the documentation. If you look up that method in Xcode > Help > Documentation, you'll see that its argument is an NSDictionary, not an NSString. So construct a dictionary of default objects for each preference you have, and then pass it to that method.
 
Would you mind posting your solution(s)? It might help other developers facing similar issues (although kainjow explained it pretty well).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.