iOS 10 local notifications: show notification content on lock screen - ios

I've added local notification with Notification Content Extension.
It shows okay on home screen (with app in background).
The problem lies in displaying notification content on lock screen. When notification arrives on lock screen, it is only displayed with text and swiping left shows "Clear" button.
I need some way to show notification fully from lock screen (as on home screen).
For example I saw "View" button in some of the tutorials/articles, can I even create or control something like it?

So with notifications on iOS 10, Apple changed the way they appear on devices. When the screen is locked, you can see a View and Clear button or just clear button based on whether the device is enabled with 3D touch or not.
Swiping left on a message now offers View and Clear on non-3D Touch devices or just Clear on 3D Touch devices.
On 3D Touch devices, the long press on notification reveals the notification actions menu which can be customized using Category definition in the code.
Hope this answers your query.

Related

IOS locked screen notification

Is it possible to get three options when you swipe to the left on the lock screen as yes no and cancel in iPhone when the screen is locked..
For example as shown in API for swiping to the left on lock screen - iOS 8
Seems that the lock screen can have max 2 button:
In iOS 8 and later, the lock screen, notification banners, and
notification entries in Notification Center can display one or two
custom actions.
If the alert is displayed modally you can use more:
Modal alerts can display up to four. When the user
selects a custom action, iOS notifies your app so that you can perform
the task associated with that action.
But there is no way to fore this.
Read the full spec in Registering Your Actionable Notification Types

want to catch a window change event in iOS

I want to detect when any notification of any app comes in.
I was looking for a sort of "window will open" event, to detect when the notification window pops up, but as far as I can see there is no such thing.
Would it be possible to use the "viewWillStartLiveResize" in some way or another for this purpose ?
Or is there any other way to detect a screen change event?
viewWillTransitionToSize:withTransitionCoordinator: or traitCollectionDidChange: should be enough to detect app screen size change (especially on an ipad split mode). But in your case that's not possible - you have an access to your and only your app views hierarchy. Push notification windows pops up over your app on a springboard view hierarchy. So as notification center, etc. They just don't resize your app's window, they overlap it.

Is there any way to change notification image

i want to show or change present image in notification with latest image icon, the image icon will be provided either in the notification data or saved previously in the app like this one and this one image
i want that if notification came on the IOS device then the image in the notification will show accordingly
this text from iOS Human Interface Guidelines
A banner is a small translucent view that appears onscreen and then disappears after a few seconds. Users can also see a version of the banner on the lock screen and in the Notifications view of Notification Center. In the banner, iOS displays your notification message and the small version of your app icon (to learn more about the small app icon, see App Icon). Users tap the banner to dismiss it and switch to the app that sent the notification.
I believe that you can't change it, but may be if you change some pictures in App icon source, you will achieve the necessary result, but I repeat, hardly everything will correctly work
for example
U can try to change Spotlight images or any else....

Button accesible from lock screen in iOS

I want to develop an iOS app that can have like a panic button when the screen is locked. This button can be enable or disabled within the app, but
I want to know if it is possible to add a very accessible button you can press in case of an emergency even when the screen is locked. When the button is pressed I want to execute some code in the app.
Is there a possible way of accomplishing this in iOS?
Or is there an alternative?, The only think that I required is that the button can be pressed like in maximum three seconds even if the screen is locked and the app closed.
No that is not possible in iOS. You cannot make changes outside of your app.
One suggestion i can give you is to make a extension for today view in notification center. And you can ask the users to touch the button in notification center to invoke your functionality.
Notification center can be accessed in lock screen also.

How to add a view/gesture recognisers to iPhone/iPad home Screen

Until today I believed that it's impossible but there is an app is called Shou from the Emu4iOS Store that record your screen and even if the app is in background there is a view on home screen that on touch redirect you to the app. (please see attached image)
My Question is how can I achieve the same ? How can I add a view to Home screen ?
That's a status bar in a recording state. These are system defined states, such as the green bar you get while taking a call. These appear when an app is recording audio automatically, and there is no way to trigger it manually.
There is no way to add views and gesture recognizers on to the springboard.

Resources