iOS7/iphone 5s home button tap API - ios

So with this new fingerprint thing you only need to tap the home button and hold your finger for a few moments to unlock your phone. I was wondering if there's an API that lets us make use of the "Tap" functionality.
i.e. Let's say in my app, when the user taps the home button, my app does xyz.
Also, would it be possible for my app to read these taps when the screen is locked?
NOTE: By tap I do not mean pressing the button, just a tap, like when we unlock the iPhone 5s with the fingerprint scan.
I'm completely new to iOS development. So referencing libraries with links etc and basic tutorials might make things a bit clearer for me.
Thanks.

Nope. This API does not exist. File a feature request at http://bugreport.apple.com. I can't imagine that this will get implemented though, given the possibility of abuse.

No there is no public API for the Touch ID sensor... yet. And there may never be one.

Related

iOS: Touch ID prevent user from closing app when pressing too strong

is it possible to prevent the app from closing when my app asks for a fingerprint and the user presses the home button instead of only let the finger rest? I know and understand that it shouldn't be possible everywhere else, but it would be nice if the app wouldn't close when asking for the fingerprint.
It is not ever possible to change regular system behaviour, even though some users might press too hard and go back home that is the behaviour that everyone expects, want to go home, press the home button and it always works
This is not possible, what you are trying to do is getting out of the scope of your application and change the behavior of the device. Apple won't allow it, ever.
They might change the behavior if they think it's better to handle it like that, you can send them a message. But they'll probably never do that as they are killing Touch ID for the sake of Face ID.

Objective C - Detect if finger is held on screen at app startup

I'd like to perform an action when the user has their finger held on the screen when my app startups.
To give an example: When the App launches and the launch screen is showing up, the user has a finger on the screen as long as the first ViewController appears. When the first ViewController gets into the viewDidAppear() function, I want to detect, that the users finger is on the screen and perform an action, like f.ex. jumping straight into the lastest received email. Basically this is supposed to be a kind of shortcut to an main action.
Is there any method to detect an already laying finger on the screen? To be exactly I'd like to check for the tap in viewDidAppear()
Unless the nature of Time has changed since the last time I checked, your app cannot detect what the user was doing before the app launched. The app, ex hypothesi, was not running at that time. And the mere presence of a finger on the screen during app launch will not generate a touch event that the app can detect.
The system can detect it, however, since is running before your app launches. That is why Apple added force-touch Shortcuts (for appropriate hardware). The only way you can do what you're asking is to rely on that API. Hardware that lacks this feature will simply have to do without this feature.
(After all, this is how Apple makes money: by trying to make users jealous of hardware they don't have, so that they buy new hardware. You would want to rob Apple of its income by reading this feature backwards onto old hardware, even if you could, now would you?)

App controlling home button in iPhone

Just a quick question. Is it by any chance possible, that I can make an app control the users Home-button?
What I want to achieve is, that I want to ask the user if it is OK, that I add a functionality, when they click the Home-button 4 times. Is that even possible - even if the user accepts?

Detect Home button long press event in background

How can I detect Home button long press like 4 second or more event in my app which is already running in background? Is it possible to so because app is already running in background and if user long press home button of the device for 4 second or more can i detect the event in my background running app and if possible than will Apple approve this for app store?
No that is not possible. As you should know, a long press on the home button brings up Siri. Your app would interfere with that. Also, I don't believe Apple allows access to the home button event like that.
Lastly; while your app is in the background, it goes into a suspend state after a short while and no events run. The only thing the app can do is receive push notifications - unless you have been given special access to audio / gps functions from Apple themselves.
Short answer : Not possible. not at least with public method and want your app to be on Appstore.
For the Research purpose, you might want to try use private method and do your R&D with it. it might be possible.

Bring previous app back to the front when user is done with my iOS app

My iOS 4/5/6 app is meant to be used briefly. I want the user to click a "Done, now go away" button which takes them back to the app they were using before mine came to the front.
Is there a way for my iOS to put itself in the background while returning the previous app to the front?
On an iPad, the user can get that effect by doing a four-finger swipe horizontally across the screen. But that gesture is not a complete solution because (a) that gesture does not work on a handheld device, and (2) not many users know of that gesture. I want to programmatically return the previous app to the front.
I want the user to click a "Done, now go away" button
That button is the Home button.
I want to programmatically return the previous app to the front.
There's no public API for switching to another app. Users have a number of options for switching between apps, though. In addition to the swipe gesture you mentioned, they can do a four-finger upward swipe to get to the list of recent apps, or double-tap the home button for the same effect, or hit the home button once to go back to Springboard. Users, not apps, are supposed to be in control of which app is in the foreground. And the way they do that should be standard from one app to another. I can understand wanting to make life easier for the user, but what you're trying to do just isn't possible with the available API.
I Don't think you can do that if the previous application is not your property or if you are not aware if a URL Scheme has been incorporated in the previous application that you know of.
Launch App Via URL Scheme!

Resources