Is it possible to make a push notification that doesn't open the app - ios

I want a push notification where you could tap yes or no.If yes is tapped it would NOT open the app.

AFAIK it is not possible on iOS 6 unless you have a "Newsstand" app.
I've heard many of the newsstand-only features will be available to all apps in iOS 7 but I haven't had time to look into it yet. Maybe someone who knows more will answer.

iOS 6 can't do this - all Push notifications need to be treated as if they'll display to the user, and if they get a push when the app isn't open, it will take them to the app if they tap "Yes".
As #eran pointed out, you could modify the push notification bundle to make it only display 1 button.
iOS 7 is currently NDA so can't be discussed here. That said, if you have Xcode 5, you should have the developer doc site basically downloaded. Look at the Multitasking Guide and the Release notes.

If you have two buttons and none of them opens the app, why do you need two buttons?
If you pass null to the action-loc-key parameter, you'll get a single button that dismisses the alert without opening the app.

Related

How can I programmatically disable iphone home button in swift 4?

I am going to develop an application for kids. That I needed is I have to lock the home button permanently for this particular application but I didn't get any solution for this.
For kids, there is a feature in the iPhone setting called "Guided Access" this setting lock the phone with one app. This could be helpful for you. You can mention this in your app.
You can use this API to do programmatically. It was introduced in WWDC 2017. For more information how to use API and lock in a specific way. Please check this video. For doing programmatically without any device management it has been explained at 15:40th minute.

How to check for keyboard notification outside of my ios apps?

I am trying to check for keyboard notification show/hide outside of my ios apps. I tried to run keyboard notification in the background, did not work.
I expected to switch to a different app or homescreen and my ios app should detect whether keyboard is shown or hide when i'm outside my ios apps.
it is not possible since app do not communicate with each others by default. just like in the previous answer, it's because of sandboxing. If you could tell what you want to achieve, we might be able to help

Show several Local Notifications without creating new one

My scenario that I need to show the first Local Notification using Swift and then using the same identifier add another Local Notification, but without showing it as a popup in iOS device. So basically the flow would be like this:
Starting upload... <-- Show on the screen and adds to the Tray bar
Uploading photos... <-- Does not shows on the screen, but clears all the notifications and add another one in Tray bar silently (or changes previous one)
Uploading data... <-- Same as Uploading photos...
Finished uploading... <-- Same as Uploading photos...
Tried different ways, on Android it is not hard to do that, but iOS makes everything hard to do, is it even possible? :)
Thanks!
The reason it works on Android is because the "state showing" notifications are very Android thing. iOS is not designed for this kind of stuff because you almost never do something in the background of an app that also needs to be reflected to the user while user is outside of an app. So the real answer to your question is no. In iOS environment it is not possible to simulate Android way of showing status changes in a notification.

Actionable push notification isn't appearing on device with iOS 8+, when user force quit app by swiping-up

I am using ONE SIGNAL for push notification
ONE SIGNAL is providing functionality of actionable push by adding "actionButtons" key including in payload.
{"actionButtons" = {"id":"1","text":"Confirm","icon":""},{"id":"2","text":"Cancel","icon":""}, "actionSelected" = "1"}
So whenever push notification will appear on device, it will appear with two buttons "Confirm" and "Cancel" and based on user's selection 'id' of the button will be stored in "actionSelected" key.
Everything above is working perfectly whenever app is in either in foreground or in background in iOS 8+
But when user force quit application (swipe-up) notification isn't appearing on device.
I have also added "Remote Notifications" in background modes, all certificate is also set perfect. I don't know what am i missing.
If anyone got any idea about this issue then kindly help.
All suggestions are welcomed. Thanks in advance.
This is a limitation related to how OneSignal handles action buttons. OneSignal uses the content-available flag as part of a technique to support custom text on action buttons and this flag is ignored in cases where the application has been force-closed.
When force quitting any iOS app, that device becomes ineligible for notifications for that specific app until that app is ran again. So if you're testing open the app, and then close it (put in background).

IOS 5 show custom Items on Lockscreen

APP Advice presented two apps, "Slide To Buy" and "Slide To Do", that show interactive items on lockscreen.
What API is used to display that items?
There's no direct control over the lock screen, so I suspect that they're just push (or perhaps local) notifications.
Notifications allow you to open the app they came from, so the "swipe to check off" functionality is basically just launching the app. Quite clever but it's not using any fancy or unknown APIs.

Resources