iOS: Control the native Clock App from Another App - ios

Is it possible to control the native Clock app from my app?
Is it for instance possible to start its timer, or disable and enable an alarm? I want my app to start up, do a modification, and then die.
If it's possible, where do I find more info about this?
This will be my first app. Thanks in advance!

Im pretty sure it isn't doable within public APIs, and i would be very surprised if it was doable at all. What are you trying to do?

Related

Making auto-start apps in Xamarin.Forms

I'm trying to make kind of a reminder app and for that to work I'll need it to auto start when the phone comes on in order to track the time. Was thinking of using Messaging Center but that would only work when the app is active and running already. I'm using Xamarin.forms so would appreciate if someone could point me in the right direction.
Android has an AlarmManager that can start a service at specific times.
iOS has no such feature, and hence it can't be done on iOS due to security restrictions.
The only think I could think of, is to schedule a LocalNotification on iOS that the user would then have to press to open the app, but at least it would be a reminder of sorts. Not sure if that will suffice.

Track usage time of all apps and power button pressing with iOS

I need to write an app that should monitor the usage time of all apps that are currently running on iOS(1).
The app should also be able to track how often the user uses the on / off button at a specific time frame (2).
Can you help me how to do this with iOS. Are there already existing open source solutions?
Thank you very much for your help.
Same as sandbox, I don't think you can do it. Apple doesn't allow monitoring other apps. If u want to do, prob have to jailbreak.

How to create an alarm clock app with swift?

I'm trying to create a kind of alarm clock app with the swift but I could not figure out how to set an alarm model. I've tried UILocalnotification but I don't want my users to be involved the flow of alarm app other than setting the alarm. Then tried NSTimer and NSRunloop etc. but that didn't work either since those don't work when app gets background. So is there any alternative ways to do that? Any help and suggestion would be appreciated, thanks.
I have been doing research on this for quite some time now. But didn't find any concrete way to do it. You have to use one of the following from the list and make a logic to awake the app from the background.
For the alarm you can go through the blog here. It's having the details, which you can use to make a logic with UIApplicationExitsOnSuspend in info.plist file.
As already suggested, since iOS 7 the only way to have an App running in background is allowing one of the Background Modes.
Background modes
You can find them in the Capabilities section in your project settings. As long as your App does not fall under one of these, you are out of luck :(...
I once tried to write a similar App to yours, and there is really no way to do that right now.
Cheers,
TK

Accessing settings in an IOS app

I am trying to create an IOS app in which you assess the settings of the phone and in my case I need to access the mute setting in settings. Can someone please help me figure this out? Mainly i just want to know if you can and how to access the setting of an IOS deviceI do not have any source code yet but I will try to get some up once I get an answer or some help. Thank you
Pretty sure that is not allowed due to sandboxing restrictions.
You cannot accessing the Settings App from your own App, you can however adjust the system volume from an App if that is all you want to do.
Check out MPVolumeView.
https://developer.apple.com/LIBRARY/ios/documentation/MediaPlayer/Reference/MPVolumeView_Class/index.html#//apple_ref/occ/cl/MPVolumeView
What you are specifically writing about is not possible but you will probably find something that answers your use case in this SO question:
How to programmatically sense the iPhone mute switch?
No way to do this easily. If you want to do what you want in a one line way, take a look at this class : http://hoishing.wordpress.com/2014/05/08/mute-checking-in-ios7/

Can an iphone app shut itself down programmatically

I want the user to start the app and leave it running. At one point, the app will finish what it is doing and will shut itself down.
How can I do that in Objective-C?
This is possible by using method:
exit(0);
However, be warned that Human Interface Guideliness discourage the use of this function, as it looks as if the application had crashed. The good solution for such a usecase is to prompt user that the application has finished working, and that he may close it now.
Hope this helps,
Paul
Thanks Paul. I found another thread at Proper way to exit iPhone application?
Perhaps Apple doesnt like applications committing suicide ;)

Resources