IOS - output (0) is out of date?

Does anyone know if exit(0) deprecated in an iOS app? I know this is not a good solution to close the application manually, but will Apple prohibit the application if we use it in code?

+6
source share
3 answers

I got an application that was rejected due to the exit method (via UIAlertView), doing exit(5) when the user clicks on the correct button.

I got it:

We found that your application includes a user interface control to exit the application. This is not consistent with the iOS Human Interface Guide, as required by the App Store Review Guide.

Refer to attached screenshot / s for reference.

IOS human interface guides indicate

“Always ready to stop iOS applications when people press the Home button to open another application or use device features like a phone. In particular, people don’t press the application’s close button or select“ Exit from the menu. ”Ensure a good end experience The iOS application should:

  • Save your user data as soon as possible and also reasonably, because a notice of exit or completion can be received at any time.

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

It would be appropriate to remove any mechanisms for rejecting your application.

The "hidden" output can be understood as a failure for the user, not?

+5
source

No, Apple will not reject your application to use exit(0) .

You are right, this is not a great design, but sometimes it can be useful.

As Larm mentioned, if it is used incorrectly, it can be perceived as a failure, and an accident will lead to rejection of your application.

However, this can be very useful in applicationDidEnterBackground when (on a conditional basis) you can get the application to start a new one.

+4
source

No, you should not call exit because your application SHOULD be rejected. Apple has repeatedly discouraged Apple and is known to cause serious errors when switching iOS multitasking. You just have to leave the user to use the home button themselves.

http://developer.apple.com/library/ios/#qa/qa1561/_index.html

"In addition, data cannot be saved because -applicationWillTerminate: and similar UIApplicationDelegate methods will not be called if you call exit. If you need to terminate your application during development or testing, the abort or assert macro function is recommended."

2012-04-09
Updated to more strongly discourage exit functions and include better methods for debugging.

2008-08-27
A new document that discusses best practices for completing an iOS application in code.

To the right of the iOS Interface Guide http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/UEBestPractices/UEBestPractices.html#//apple_ref/doc/uid/TP40006556-CH20-SW27

"Do not let go programmatically

Never leave an iOS application programmatically, because people tend to interpret this as a failure. However, if external circumstances do not allow your application to function properly, you should inform your users about the situation and explain what they can do about it. Depending on how serious the malfunction of the application is, you have two options.

Display an attractive screen that describes the problem and suggests a fix. The screen provides feedback that convinces users that there is nothing wrong with your application. This puts users in control, allowing them to decide whether they want to take corrective actions and continue using your application, or click the "Home" button and open another application.

If only some of your application features are not available, display a screen or warning when people use this feature. Only display a warning when people try to access a function that doesn’t work.

If necessary, display a license agreement or disclaimer

If you provide an end user license agreement (or EULA) with your iOS application, the App Store displays it so that people can read it before they accept your application.

If possible, do not allow users to indicate their agreement with your license agreement when you first launch your application. Without the displayed agreement, users can easily receive your application. However, although this is the preferred user interface, it may not be possible in all cases. If you need to display the license agreement in your application, make it so that it harmonizes with your user interface and causes the least inconvenience for users.

If possible, provide a disclaimer in the description of your application or in the EULA. Users can then view the disclaimer on the App Store, and you can balance business requirements with user needs. "

+4
source

All Articles