Display EULA when the application starts and shuts down if the user does not accept it

I have to show EULA on first start. I want to close the application if the user does not accept it. What is the right way to do this so that the app is accepted in the app store? I read that using exit(0) and [[UIApplication sharedApplication] terminate] not suitable.

+4
source share
2 answers

Apple doesn't want you to quit the app because it seems like a crash. That's why they did -[UIApplication terminate] private and will reject your application if you use it. They do not seem to reject applications that use exit , and I have seen applications lose their temper, but I agree with Apple that this is not very good user interface behavior in iOS, it’s really strange if you drop it on Home screen without pressing the home button. Therefore, I recommend that you simply show the screen with a message in the form of the line "You cannot use the application without accepting EULA. Either accept EULA, or click the" Home "button.

+9
source

You can pause the application, and this gives the appearance of closing the application.

 UIApplication *app = [UIApplication sharedApplication]; [app performSelector:@selector(suspend)]; 
0
source

All Articles