应用启动时显示 EULA,如果用户不接受则退出
我必须在第一次启动时出示 EULA。如果用户不接受我想关闭该应用程序。使应用程序被应用程序商店接受的正确方法是什么? 我读到使用 exit(0)
和 [[UIApplication shareApplication] Terminate]
不是正确的方法。
I must show EULA on the first launch. I want to close the app if user doesn't accept it. What is the proper way to do it so that the app will be accepted to app store?
I read that using exit(0)
and [[UIApplication sharedApplication] terminate]
is not the way to go.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Apple 不希望您退出该应用,因为它看起来像是崩溃了。这就是为什么他们将
-[UIApplication Terminate]
设为私有,并且如果您使用它就会拒绝您的应用程序。他们似乎并没有拒绝使用exit
的应用程序,而且我见过应用程序自行退出,但我同意 Apple 的观点,即这在 iOS 上不是良好的 UI 行为,如果你被拒绝,确实会感觉很奇怪无需按主页按钮即可进入主屏幕。因此,我建议您只需显示一个屏幕,其中显示一条消息,内容大致为“如果不接受 EULA,则无法使用该应用程序。要么接受 EULA,要么按主页按钮”。Apple doesn't want you to exit the app because it looks like a crash. That is why they made
-[UIApplication terminate]
private and will reject your app if you use it. They don't seem to reject apps that useexit
and I've seen apps exit themselves but I agree with Apple that it's not good UI behavior on iOS, it does indeed feel strange if you get thrown back to the home screen without having pressed the home button. So I recommend you simply show a screen with a message along the lines of "You cannot use the app without accepting the EULA. Either accept the EULA or press the Home button".您可以暂停该应用程序,它会显示该应用程序正在关闭。
You can suspend the app and it gives the appearance that the app is closing.