Use Etags, capture and handle NSError events, view the Error Archive, and use logging and tracing for application debugging when designing and testing your application.
See Supportability for your platform for detailed information about logging and tracing.