I really don't think this can be done, but still my boss wants me to provide a link where it says so. What he wants is to add an 'are you sure you want to exit?' warning when the user presses the home button, and if the user says 'no' the app won't go inactive. It can't be done, can it?
Triple-click the side button or Home button With Accessibility Shortcut, you can quickly turn on or off accessibility features by triple-clicking the side button (on an iPhone with Face ID) or triple-clicking the Home button (on other iPhone models).
The screen is bigger and can show more information. And the gestures that replaced the home button have turned out to be much better for actually using Apple's software, letting users fly around the OS and between apps in a way that the punctuated pauses of the button presses never allowed.
Go to Settings > Accessibility > Touch, then select AssistiveTouch to turn it off.
No, you cannot do this - the application has no say in this. Ask your boss whether he has ever seen a single example of an iOS application that would do this. There isn't ... not one I would bet.
The application can continue to execute some functionality in the background - streaming music, getting location information for example, but no application can block the home button. If you could do this, you could block an application from ever closing.
A) You couldn't technically do this and
B) Apple wouldn't allow it to be released on the App Store if that was the distribution route you were taking
If you look at the methods stubs created by XCode when you create an application delegate
-(void)applicationWillResignActive:(UIApplication *)application
-(void)applicationWillTerminate:(UIApplication *)application
That are filled will comments about how you can use this method to pause tasks, disable timers, throttle down frame rates, save data - there is nothing about being able to delay, query the user with an "Are you sure" message.
This whole idea is rather counter to the user-experience of the iPhone/Pad/Pod-Touch.
From the App Store guidelines (slightly abbreviated):
Apps that alter the behavior of switches on the device will be rejected
This is a proposed change the behavior of the home button - so would be rejected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With