UILocalNotification in background mode - ios

I had implemented the code regarding UILocalNotification in my app and so far it is working very well for every case except one case.The problem i am facing is when the user receives local notification and the app is in background, then user open the app by pressing app icon,in this case i am not getting any method to provide me notification data.
All other cases i had managed in DidReceiveLocalNotification and DidFinishLaunchingWithOptions.
Please someone tell me the proper way to sort this problem out.

please check this Link :
getting local notification while the app is in background

Related

How to run code at a certain time using LocalNotification iOS?

I am building an app that sends a notification at a certain time and I need it to run some code at that time when the app is closed. Currently I have no problem showing the notification even when the app is closed with UILocalNotification. How am I able to make the notification run a function when it fires (not when the user taps on the notification) even when the app is closed?
I'm using Xamarin.iOS if that helps, but even non-xamarin answers are welcome.
UNUserNotificationCenterDelegate doesn't offer a way for the backgrounded app to be told when a user received a notification. It only calls your backgrounded app if the user interacts with the notification (including if they simply dismiss it).
Now there may be other ways to achieve what you want. Check out PushKit_SilentPushNotification and let us know if it worked out for you. It claims to even work when your app is killed. (I found this via a quick search today, so there are likely other solutions out there too - no idea if Apple would approve or not but I'd certainly be concerned).

Get Text From All Push Notifications Sent to App

Hey guys I did some searching online and didn't come up with much but I am looking to get all of the active notifications sent to my app since the last time I opened it. I found a lot of code with getting information from the notification the user opens the app with but that won't work since I want to be able to access all three notifications my app has instead of just the one I use to open it.
Now I was wondering if this was stored in a variable I can access from AppDelegate or if there is a delegate method I can add to AppDelegate that will be ran anytime a push notification is sent to my app even if my app has been killed and is not in the background.
Thanks for any help!

HandleAction issue when App Killed - Xamarin iOS

I have an interesting issue. I am implementing Quick reply on my app. Basically, when the user gets a notification, he can answer from the notification (like iMessage or whatsapp)When the app is running or background, it works like a charm. But as soon as the app is being killed, the response will never be sent and the app won't be able to get any further notification. So to sum up, after the app killed, if the user receive one notification and answer to it, he will not be able to receive anymore notification until he lunches the app.
Any idea?
Thank you very much
EDIT: I found that when calling Handle Action the fonction RegisteredForRemoteNotifications was called. The problem was that the phone wasn't able to register the phone but It was succeeded when calling UnregisterAllAsync... So my phone wasn't registered anymore. Hope it helps! Cheers

how to start my App in a particular time of the Day in Swift iOS

I have an App built on Swift, I want this App to start every day at some particular time. Logically its like Calendar notification, which gives notification in that particular window whatever we set.
Does is the same scenario is possible with an App in iOS Swift.
What you can probably do is to create a local notification, but this is not opening your app. A local notification is just a way to show a notification on your iPhone and then, if the user taps, it's opening your app.
See more here: https://www.codebeaulieu.com/49/How-to-add-local-notifications-to-your-app
I am not sure what you want to do, you cannot force your application upon the user without the user's consent. What you can do is schedule a local notification so the user knows when to open your app like jomafer proposed already. Also possible is to wake up the app to do stuff in the background:
https://developer.apple.com/library/prerelease/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html
For example a silent push notification that will trigger some code, or a scheduled background download.
NONE OF THESE METHODS ARE 100% RELIABLE THOUGH!

VoIP push notification that opens app automatically even if app is not running in background is it possible in iOS?

I want to know that if my app is not running in background and push notification arrives then my app will automatically start.
It is kind of emergency message that arrive and open my app even if app is not running in background.
Please refer this link, it is working for me
Implement PushKit and test in development behavior
This link contains all steps to create VoIP notification and please note that this will work on ios 8 and above.
:)
If the app is NOT RUNNING, this is not possible without user intervention.
As i understand a question.
If you want to handle when notification reaches your app insert this method to appdelegate
- (void)application:(UIApplication *)application didReceiveRemoteNotification: (NSDictionary *)userInfo {
//notification reached. open app or do something
}
Yes It is possible. You should use PushKit Voip Push notification and CallKit together. When notification came to device, you can show the IOS default call screen. Then when user answer the call, open your uicontrollerview.
I also want to implement same thing and I searched for this question and I got to know that this kind of facility is available in ios8 and allow us to use pushkit.frame work to do this. Below link is I found some what useful plz refer it and I also referring the same but I m not sure about the result ;)
https://zeropush.com/?_e_pi_=7%2CPAGE_ID10%2C9006801538
more links to refer
http://pierremarcairoldi.com/ios-8-voip-notifications/
https://googleweblight.com/?lite_url=https://developer.apple.com/library/prerelease/ios/documentation/Performance/Conceptual/EnergyGuide-iOS/OptimizeVoIP.html&ei=hhTcg8du&lc=en-IN&s=1&m=559&ts=1445159916&sig=APONPFkLqEFK7BggDD1Yz9etBXBkWFLVew

Resources