Launch app using shake gesture - ios

Is there a way to launch an app by shaking the iPhone?
I want my app to launch when the user shakes their iPhone (a certain number of shakes).

I believe thats not possible.
Apple can deal with this on its own end by OS.
What if the device gets shaken by accident? You've then got false alarms to deal with.

Related

iOS - Show View when phone is locked

I'm building an ios app with an alarm feature. I would like to show a view when phone is locked. I want to look exactly like on iOS alarm. If you're an iPhone user try to alarm and locked your phone you will get what i'm talking about. Is it possible? If possible how?
Thanks in advance.
iOS doesn't provide apps that kind of access to the lock screen (or any screen not in your app), so it's impossible to make it exactly like the iOS native alarm. The closest you can get is sending notifications to simulate an alarm, which are visible on the lock screen

How to determine number of locks and unlocks of iPhone programmatically

is it possible to determine how many times my iPhone has been locked and unlocked programmatically when app is foreground and background as well. Code snippet will help a lot...
There's no way to get this information from your App.
You can only know when your app goes to foreground/background via your App Delegate, but not what the user does outside of your App.

What happens to a WatchKit app when iPhone is turned off?

Let's say I want to create a WatchKit app that shows the seconds for the current time.
What happens if iPhone gets turned off (e.g. battery drained), then user starts the app on the Watch device?
As far as I know, every (!) code runs on the iPhone (extension app), so my method that "fetches" seconds probably won't respond either. It is hard to imagine, but seems that I cannot get / display the current time on the Apple Watch if iPhone is turned off.
Any experiences on this?
Firstly, you can't do watch faces in the current developer kit.
All current WatchKit apps are extensions of iPhone or iPad apps. As you suggest, if the iOS device is not contactable, nothing will happen.
Apple say that native Watch apps will be coming later.
Your app will be killed immediately.
As you mentioned before, WatchKit Extension runs on iPhone, and you're absolutely right. There is only storyboard on Apple Watch.
So, the answer is very simple - "No code - no App"

Xamarin - iOS backgrounding with BT low Energy and TTS

I'm working on a proof of concept app. I'm using Xamarin for iOS. The iPhone app runs in the background and watches for particular BTLE devices and speaks using TTS when the signal is at a certain strength. I have TTS working and I can recognize the BTLE devices when the app is in the foreground.
However, I'm having trouble getting either working when the iPhone screen is off. In Android, I'd just use a wake lock, but that appears to not be available in iOS. I tried setting the background modes in the info.plist file for BTLE and sound, but I don't see any processing happen while the unit is suspended. Can anyone point me in the right direction?
This is just a proof of concept, so I'm only looking at the latest iOS version and I'm interested in even hacky answers.
Thanks!
You will need to create at least one background task UIApplication.SharedApplication.BeginBackgroundTask and end it with EndBackgroundTask when you finish transferring your data.
Note that you will have approximately 10 minutes in background. If user switch back to the app the time will be reset.
You might also want to disable application idle timer to prevent the screen to go black when the user doesnt touch it.

Access application while in lock screen in iOS

Is there any way to detect the shake when the application is in back ground in iOS ? Actually in my application i need access my application when the device is in lock screen to call some web services. Is there any way to do this to aces my application while the device is in lock screen in iOS?
Simple answer NO there is no way of detecting shake in background mode sorry.
Unfortunately this isn't possible in iOS 7 are lower.

Resources