0

I have finished my iPhone application and I need help with how to add Terms and Conditions.

I want it to launch one time only, when the application is first downloaded and run. If the user clicks on the "accept" button, the application should load the original home screen. I dont want a "decline" button, just the "accept" button. Also, is it necessary to save the user's response in the code after accepting the conditions?

jscs
  • 63,694
  • 13
  • 151
  • 195
user3043382
  • 21
  • 1
  • 3

2 Answers2

0

You just need to use NSUserDefaults.

In your appDelegate class, in applicationDidFinishLaunchWithOptions method, try adding this.

if(![[NSUserDefaults standardUserDefaults] stringFoKey:@"iSFirstRun"]) {
   // show your one time viewController here

   // then update userDefaults
    [[NSUserDefaults standardUserDefaults] setValue:@"yes" forKey:@"iSFirstRun"];
    [[NSUserDefaults standardUserDefaults] synchronize ]; 
} else{
    // show usual viewcontroller
}
Balram Tiwari
  • 5,657
  • 2
  • 23
  • 41
0

You need to have a persistent way the user can read the Terms & Conditions at any time they want; a UIWebView would be the best solution, that way you can update the Terms & Conditions remotely as well. It would also avoid any potential legal issues.

klcjr89
  • 5,862
  • 10
  • 58
  • 91