It seems not an issue since you meant to quit the app. It only happens because you using Xcode to debug. In other words, it just quit as you expect. Check this: here