You can not overwrite default behavior of the home button, which is handled by the OS, so it’s outside of the app.
You can try to send a notification on applicationWillResignActive (Docs - (https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622950-applicationwillresignactive) which might help you to achieve desired behavior (notify user, that button works fine), but overall you can’t keep home button from working as expected and put your app into background on press.