If it is an app published on the App Store, it is recommended not to do this. The document clearly states that if it is discovered by the reviewer, it will basically be rejected:
Always Be Prepared to Stop
An iOS app never displays a Close or Quit option. People stop using an app when they switch to another app, return to the Home screen, or put their devices in sleep mode.
Never quit an iOS app programmatically. People tend to interpret this as a crash. If something prevents your app from functioning as intended, you need to tell users about the situation and explain what they can do about it.
It may be rejected. After all, the exit function is not recommended. It depends on your mood. If your application is not easy to test, it may not be rejected.
Normally I won’t refuse, I did see someone doing this.
Just one line is enough, and this is not a crash, there will be no crash log:
See: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/StartingStopping.html
If it is an app published on the App Store, it is recommended not to do this. The document clearly states that if it is discovered by the reviewer, it will basically be rejected:
It may be rejected. After all, the exit function is not recommended. It depends on your mood. If your application is not easy to test, it may not be rejected.