Problem with opning the page (License agreement page)

Show Details

Solution 1: [1]

YOU CAN Apply the Agreement Page through The Alter View

and

If User Accept the Agreement than You Store The Value of Agreed(Possibly Bollean) in the plist file(possibly from document directory of the app) than each time you can check it

enter image description here

CODE FOR TO NOT TO Display Agreement If it is accepted For once

add one plist file in to resource folder
Add one boolean variable in plist Set Value AS UNCHECKED(REJECTED STATE)

//Copy the plist to document directory

-(void)CopyPlistTODocument
  {

BOOL success;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *error;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *writableDBPath= [documentsDirectory stringByAppendingPathComponent:@"Settings.plist"];
success = [fileManager fileExistsAtPath:writableDBPath];
if (success) return;
// The writable database does not exist, so copy the default to the appropriate location.
NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Settings.plist"];
success = [fileManager copyItemAtPath:defaultDBPath toPath:writableDBPath error:&error];
if (!success) {
    NSAssert1(0, @"Failed to create writable database file with message '%@'.", [error localizedDescription]);
}

}

//NOW Call Another method that  read data form plist of document directory
      -(void)desclaimer
     {
NSArray *paths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectoryPath = [paths objectAtIndex:0]; 
NSString *path =[documentsDirectoryPath stringByAppendingPathComponent:@"setting.plist"]; 
NSMutableDictionary *plist = [NSMutableDictionary dictionaryWithContentsOfFile: path]; 
BOOL *temp=[plist valueForKey:@"Agreement"];
 //if the value of the temp got YES That Agreed earlier so no need to agreed again
if ([temp isEqualToString:@"NO"]) 
{
    //Show Alert View From Here  And call Method  Accept() on the button           pressed event of the accept  button
}
  }
 //Now From  Button Pressed Event Of The Accept Here is the Accept method
  -(void)Accept
    {
   NSArray *paths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectoryPath = [paths objectAtIndex:0]; 
NSString *path =[documentsDirectoryPath stringByAppendingPathComponent:@"Settings.plist"]; 
NSMutableDictionary *plist = [NSMutableDictionary dictionaryWithContentsOfFile: path]; 
[plist setValue:@"YES" forKey:@"Agreement"]; 
    //now every time the value read from here has agreed state so alert view will not get called
[plist writeToFile:path atomically:YES]; 

   }

Solution 2: [2]

The best solution is to put this license agreement when you are sending your app to iTunes Connect , it have a place specially for that.

so if the user disagree he will not install the app in the first place

Check "EULA" part of "iTunesConnect DeveloperGuide" page 52

hope it helped you.



Credits

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Credit
Solution 1 NIKHIL
Solution 2 Rany Ishak