Send intent to create an alarm in default app - ios

In android we can do an Intent to add an alarm to the default alarm app installed on the device example.
I wonder if it's possible to achieve something similar on iOS?

Regarding to Alarm App, Here you have answer from Apple support and it's related with iOS sandbox.
As far as I know the rationale for this has never been publicly documented. However, the iOS sandbox does not, in general, allow app A to make changes that affect app B or the system as a whole.
In Apple docs you can find description how to set up calendar alarms.

Related

How to programmatically turn on/off WiFi in iOS? [Swift]

NOTE: I am aware that such a thing violates user's privacy and would be rejected by Apple. However, this specific component is purely for automated testing of buffering behavior when the user's connection is poor/nonexistent. It will NOT be publicly released.
With that said, does anyone know of a way to programmatically turn on/off WiFi in iOS?
I have not been able to find anything up-to-date. Pretty much every answer has to do with this being a violation of privacy and cautioning that they shouldn't do it. Doesn't apply in my case.
Closest I could find was using something like DeviceFarm to simulate it https://docs.aws.amazon.com/devicefarm/latest/developerguide/how-to-simulate-network-connections-and-conditions.html
However, in my case I want these tests to run entirely within the app (private test build). Setting up DeviceFarm for this purpose alone isn't worth it imo.
There is no provision provided by apple to change automate changing its settings because of apple's privacy rule. So you can't achieve by any way.
You can’t. Apple does not allow 3rd party apps to change global system settings like that.
There is no API available to control cellular data,wi-fi,bluetooth within in an app , User have to go to settings to enable or disable cellular data,wi-fi and bluetooth.
This is not possible in iOS unless you jailbroke your device. Apple is not allowing any apps developer to access wifi/bluetooth. You can only check wifi/tooth is connected or not.
You can’t do that using the iOS application. Apple not allowing it.
Legally there is no way to do it. Even somehow if you are manage to do it, Apple will reject your app while submitting to AppStore.

disable internet on other ios apps

I'd like to create a very simple app to block internet access for certain app's between 7PM and 7AM on my iPhone.
However the mobile phone & imessage should stay usable, so it's no airplane modus.
This is to have some "no notification time" and don't see for example new e-mails coming in.
Would this be possible to archieve? Can an app control this behaviour for other app's?
Thanks a lot in advance for your answers!
Best regards,
Koen
No, you cannot do that. Apple "sandboxes" apps so that they have no ability to change the behavior of other apps.
If you did find a way to do that, Apple would reject your app, and probably quickly update the OS to prevent whatever method you used to do it.
EDIT:
You might be able to find a way to do this for jailbroken devices, but obviously those can't be released to the App store.
First thing, Such Apps are not allowed to be published on App Store.
I have worked with private-apis, and i know that this is not possible with only private apis. This may be possible once after you jailbreak your phone + using private libs, and may be you can create tweaks for jailbreak to achieve this functionality.

watchOS Show App When Message Received [duplicate]

I know that an apple watch app can launch its parent application in the background to pass data back and forth but can it work the other way around? Can my iOS app launch the related watchOS app?
For a bit more insight, I'm trying to accomplish this so that I can monitor data periodically for the sake of notifications. The 70 seconds apple gives me to keep an app active and pulling data from healthKit isn't conducive to an app that provides alerts to users based on changes in behavior.
I apologize if this is a basic question. I'm new to watchOS development and haven't been able to find the answer to this anywhere. =/
No it cannot happen.
At the moment communication between the Watch and the Device is limited to the Watch App initialising communication with the iOS app and not the other way around.
This might help:
https://developer.apple.com/library//ios/documentation/General/Conceptual/WatchKitProgrammingGuide/SharingData.html#//apple_ref/doc/uid/TP40014969-CH29-SW1
Yes, you can. Try the startWatchApp(with:completion:) func in HealthStore. However, it can only be used in a workout app that enable the background mode of "workout processing".
Unfortunately I think I found the answer here How to programmatically open Apple Watch companion app from iOS app.
It doesn't look like it can be done. If anyone finds otherwise, let me know!

Auto restart iOS app for enterprise, not jailbroken

I'm currently developing an app using enterprise account for internal purposes only.
I heard something about daemon for jailbroken devices in order to make my app just like an android service.
Is there anything I can do when not jailbroken?
Maybe 3rd party framework or piece of codes? Maybe private framework?
Something like this maybe: Make the application restart by itself on a jailbroken device
But for non-jailbroken.
P.S. - The app of course is not for app store and could not be on app store.
I agree with Tander. But we have achieved almost similar effect using combination of SLC (Significant Location Change), Background fetch and Silent push notifications. Whole point is that app periodically trigger call to API to let know it is alive.
If this fails, we sent normal Push Notification. I was looking into this for fair amount of time and didn't come up with nothing better. But note that you get very limited process time to execute code using this options.
Unless the device is jail broken the short answer is no.

What's solution to make task background in iOS same service in Android?

I'm newbie iOS. I have been develop Phonegap for Android and iOS. My App is update data from server every 1hour. In Android, i use service to do that. My app in Android working very good. Now, i want to develop version for iOS, and i have problem when update data from server every 1hour. I was research but not find anyway for my app.I don't know what's solution to replace for service in Android. Can you help me, what's solution. This have been kill me. Thank you so much.
Short answer is NO as Apple has restriction on background task running especially cases like yours.
But if you are downloading small amount of content, you do have some other options. From IOS 4.0 or above, you can declare your app to run in background when you fall under the following categories:
Audio
Location updates
Voice over IP
Newsstand downloads
External accessory communication
Bluetooth networking
Bluetooth data sharing
Background fetch (IOS 7)
Remote notifications (IOS 7)
In order to do so, you need to flag your app in the info.plist for Required Background Modes option. Apple will review your app specific in this area once you declared the option.
For your case to download the data, the possible option is to use the new feature in IOS 7 that's the background fetch or remote notification above. The suggestion from DOM was not asking you to download the content through push notification. But instead to use push notification to wake up your application and start downloading new content.
If you don't want to use push notification, the only way to go is register for background fetch. However, no matter which option you want to use, each download will only last for 30 seconds. And after that, your app will put into suspension mode again.
you can have a look on the link here:
Declaring Your App’s Supported Background Tasks
I think your best bet would be to use the push services instead of having your app go get data. Making your app do it is unreliable with phonegap apps because you cant create a service interface and you can not guarantee that your app will be running. With push service though, if your app isn't running, it will be woken up in a manner of speaking.
Take a look at this great how-to article that also discusses what push provides you.

Resources