How to create custom sticky notification without jailbreak in iOS? - ios

According to my app requirement i have create custom notification using Notification Content Extention and Interface now i just want to make it sticky,Like it does not removable from the notification center till i remove it through my code.
Here is the reference image of sticky notification :
So can you please help me to find some alternate solution of it to make custom notification without jailbreak ?
Thanks in advance.

Related

Notification should stay

I have my application developed on iOS 8 . I have implemented push notification in my application. In iOS 8 clicking on notification automatically clears that particular notification. But my requirement is notification should stay until clear manually. Please give suggestion how to achieve this.
This is a system behavior. You can not prevent this to happen.
If you need something to be always visible from the notification center, consider to create a Notification Center Widget.

iOS push/local notifications with image like in iMessage

I want to display an image (custom view) in Notification Center when app receives push/local notification. e.g -
or
How could I achieve the same? Can anyone help me?
No you can't. The notification payload contains up to 256 bytes long. You can't send an image with it however you can send image URL with payload and show it in your application.
The official documentation does not provide information about this. Currently, it is possible but I guess this feature is Apple exclusive.
Adding to that what you have shown in the images is called Widget, you can create it using this link.

Questions about Local notifications in iOS

I'm working on a project on iOS 7, 8 that use a lot of notifications (Remote, Local). I have some questions about Local Notification.
I'm using Local Notification to schedule an alarm or a count-down. As I know, the use of NSTimer is not really a good choice since it has only up to 10' in background & if the app process is killed it doesn't work anymore. Local Notification is managed by iOS but I have to accept its alert when the app is not in foreground. There's nothing like silent local notification (local notification without alert, sound or badge and app still knows about it although it's in background). Am I right ?
Let's assume that there're some simple local notifications in Notification Center, scheduled by our app. Normally when I touch on a notification to see it in my app, the others remain present until we interact with them. In some cases that I haven't figured out, all other notifications are removed from the Notification Center. Does anyone encounter this & understand why ?
I find the interactive notification feature in iOS very limited. I want to change the title of a defined UIMutableUserNotificationAction button & add an image for it, like I can do with UIButton. So the question is : Is it possible to customize the UI of an action button ?
Thanks for your help !
Unfortunately there is no correspondence in silent notification using local notifications.
The number of the visible notification in the notification center is a user decision, the user in Settings can decide to set a different number or decide to do not show them in notification center as well. As for the first point no. The third point is not clear, you can set the image you want for a remote just put in the payload the right name, local notifications use the app icon.
There is no silent notification for Local Notification. The user has to click to the notification to open your App.
I suppose that the associated application has deleted those notifications programmatically. Else, those notifications must stay in the notification center.
You cannot add image to action buttons but just the titles.
I tried more than two weeks to do the same. I had to show notification after 2 hrs even if the use doesn't click the notification. But the repetition facility is well handled in objective C. I could have created multiple local notification but it will also violates the total number of 64 notifications. Apple needs to improved the same.

Change Style of Apple Push Notification Programmatically

I have implemented and configured an application with Apple Push Notification. The default alert Style of APN is "Banners", but I need to change it to "Alerts" programmatically.
I checked the UIKit.framework and did not find any options, Is it any solution to set notification style?
You can't. That's up to the user. Your app must obey the user's decisions for Notifications - THEY own the device, not you!

Custom notification when app in background or close

Is it possible to create an notification when my app in background all close.
What I mean:
If my app goes to background at some point at time I want to get notification with alert view on main screen in iPhone.
Alert view have to contain my custom description text.
Is it possible? and if this is possible that wich verion iOS should provide this option.
Thanks!
Yes, you can use a local notification.
https://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html
Local notifications were introduced in iOS 4.0

Resources