You can use a flag on your NSUserDefaults
. On your applicationDidFinishLaunch
you would check for the flag, and if not present, show the disclaimer AND update the flag.
The code would be similar to this:
BOOL disclaimerAccepted = [[NSUserDefaults standardUserDefaults] boolForKey:@"disclaimerAccepted"];
if (!disclaimerAccepted) {
[window addSubview:disclaimerView];
[[NSUserDefaults standardUserDefaults] synchronize];
}
When the user clicks the accept button, you can update the setting as follows:
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"disclaimerAccepted"];
As @mvds suggests in the comments, it may be a good idea to store a number or string instead of a bool value, containing your app's version number. That way, you can force users to re-accept the terms and conditions when you update your app.