gpt4 book ai didi

iphone - iOS 是否已弃用 exit(0)?

转载 作者:可可西里 更新时间:2023-11-01 03:38:16 26 4
gpt4 key购买 nike

有谁知道 exit(0) 在 iOS 应用程序中是否被弃用?我知道手动终止应用程序不是一个好的决定,但是如果我们在代码中使用它,Apple 会禁止该应用程序吗?

最佳答案

我有一个应用因为退出方式(通过 UIAlertView)而被拒绝,当用户点击正确的按钮时执行 exit(5)

我收到了:

We found that your app includes a UI control for quitting the app. This is not in compliance with the iOS Human Interface Guidelines, as required by the App Store Review Guidelines.

Please refer to the attached screenshot/s for reference.

The iOS Human Interface Guidelines specify,

"Always Be Prepared to Stop iOS applications stop when people press the Home button to open a different application or use a device feature, such as the phone. In particular, people don’t tap an application close button or select Quit from a menu. To provide a good stopping experience, an iOS application should:

  • Save user data as soon as possible and as often as reasonable because an exit or terminate notification can arrive at any time.

  • Save the current state when stopping, at the finest level of detail possible so that people don’t lose their context when they start the application again. For example, if your app displays scrolling data, save the current scroll position."

It would be appropriate to remove any mechanisms for quitting your app.

“隐藏”退出可以理解为用户崩溃,不是吗?

关于iphone - iOS 是否已弃用 exit(0)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13843774/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com