How do I force-quit an individual app on an actual Apple Watch (not in the simulators)? - apple-watch

When developing an app, it is sometimes useful to force-quit an application without having to re-start the entire device.
On my iPhone, I can force-quit the active app by double-clicking the home button and swiping the app to the top.
For the actual Apple Watch (not the simulators), force-quitting an app is particularly useful since there are sometimes connection problems between Xcode and the watch app. Also, sometimes I would like to force-quit my Apple Watch app when it is not connected to Xcode.
So, how can I force-quit / terminate the active app on the Apple Watch without restarting the entire device?

When the app that you would like to terminate is open:
Press and hold the side button and wait until the shut down screen appear. Then let go of the side button.
Press and hold the side button again until the home screen appears.
Your formerly active app has now been terminated.
PS: The side button is the button below the Digital Crown.

Related

How to wake an app when screensaver is displayed

I have an application that gets hidden (but is still running in the background) when the screen saver starts on the 4th Generation Apple TV.
How can I bring the app to the foreground (hide screen saver) when an event (update to an endpoint which I am long polling) happens in my app which is running in the background?
I don't think there's any way to do this. When the screen saver is running, your app can still be the foreground app, but it will be in an inactive state. This is similar to what happens on iOS when the user locks the screen while using an app. Like the iOS lock screen, the user might be actively using the system when it's in this state. For example, you can use Siri without dismissing the screen saver.

Is it possible to pause my flash app on iphone by pressing home button?

I'm quite new to Flash. So here's my problem: I've created my app and it works great. But when I press home button on my iphone, my app minimizes and when I open it from multitasking apps, it simply restarts. Is it possible to freeze or pause the game instead of stop? Thanks!
By default the application should be eligible for the 'freeze-drying' iOS4+ functionality that resumes an app from the last place it left off. That may require a setting to be adjusted in your app descriptor (UIApplicationExitsOnSuspend should be false).
If you simply need to save data when the application is quitting, you can listen for Event.EXITING on the NativeApplication:
NativeApplication.nativeApplication.addEventListener(Event.EXITING, onExit);

iphone lock button and the running app

this may be a simple one, but I don't know the answer.....
For testing whether my location-based app receives updates in background, I usually run the app and then press the Home button to put the app in background. However, I am curious whether pressing the Lock button (at the top) will put the app in background or not.
Regards.
Yes. Hitting the lock button does background the application. However when you unlock it, the application is then brought back to the foreground. Should be able to test this within your App Delegate and simple log statements.

iphone ios application home button press/applicationDidEnterBackground crash

hallo, i am newbie in developing iphne/ios application and i have
encountered some problem
generrraly my app (which is iphone camera image processing app) has no
visible errors at today stage except the one
when i press the home button to send my app off screen (putting to the
background), and then press the app icon to 'wake it up' again
it crashes
what would it be...? what the reason of it would be?
what is done to my app (seen from the view of programmer
- i mean internal game state) by this home buton operation?
- what i should take care of before "applicationDidEnterBackground"
eventually?
thanx for answer
Is this happening when you are running it from Xcode? Xcode does not like it if you hit the home button and start it again from within the device/simulator. Is it crashing if you launch it from the device (or simulator) without Xcode running? If not, then there probably isn't a problem.

Home button doesn't exit app in iPhone simulator 4.0

I noticed that when building then running viewDidLoad only gets called once. If you press the home button and re-enter the application, viewDidLoad does not execute again.
Another thing I noticed is that when you re-enter an application it starts off right where you left off.
Is this the same behavior as in older SDKs? Does this mean that when the home button is pressed the application did not really exit?
When you press the home button, debugging is terminated and therefore you will not see anything from NSLog in the debugger console on any version of the SDK. You can try this by putting an NSLog in viewDidAppear:, which should get called even if the app is still running in the background in iOS 4, but doesn't
One difference with iOS4.0 is that if you press the home button your app might not necessarily terminate. The default setting is that they that will still be loaded in memory. This is the new 'multi-tasking' feature of iOS4.0. Turn it off and your app should be loaded every time.
UIApplicationExitsOnSuspend is the key for your plist to enable/disable background running.
With new iOS 4, multitasking arrived on iPhone and iPod Touch...
For this, when you are debugging or developing an application with the iPhone Simulator, if you press the home button, your app go in background or multitasking. Than Xcode believe that your app is still in use.
For recalling viewDidLoad method, you must completely exit from your app by pressing twice home button then hold down your app in the multitasking bar and tapping on the X.