How to set a custom icon to an IOS push notification? - ios

I'm currently adding notifications to my Flutter app for IOS, I wanted to add something similar to a largeIcon on Android, so far I didn't find a way to do that, only adding an image which is not a solution since I only want an icon at the right even if the user expands the notification (the image will expand too in this case which is undesirable for my use case).
As an alternative, I was wondering if I could change the notification app icon. As far as I looked around, this is not possible either, but at the same time I saw this image of notifications (the first one and the last one) that have a custom image and the app icon is smaller.
How can I do this in my app? I couldn't find any way in the documentation on how to do it.

You can do this with communication notifications. From HIG:
The system automatically displays a large version of your app icon at
the leading edge of each notification; in a communication
notification, the system displays the sender’s contact image — or
avatar — badged with a small version of your icon.
Here is the documentation on how to implement communication notifications in your app.

Related

How can I use ARKit while using Slide Over/Split Screen on iPadOS?

I have an app that uses ARKit to detect faces and send over the network the coordinates of interest, which works well. I would like this app to run in background, still sending the data over the network, while I would be using another app (almost) fullscreen.
The option 'Enable multiple windows' is activated in info.plist, but as soon as I launch my other app, the ARKit app stops sending information (the app actually probably stops).
Is there a simple way to do this, and at least is this feasible? Thanks!
This is not possible at this point. Camera and AR stuff is disabled at a system level in apps when they are displayed in Slide Over or Split View.
I'd recommend displaying a warning message when Slide Over/Split Screen is being used saying that you should use the app in full screen mode. See this answer under a different question for details.

iOS Push Notification with Rich Content - Can I prevent a notification from being tappable?

I have a push notification with rich content.
Can I make it in such way that it is not tappable, i.e., a single tap will not open the application. It must be dragged down to rich content or 3D touched, or deleted from the notification center by swiping.
How should I indicate to the user to drag down (3D touch) in order to reveal rich content on notification?
No, a tap on a push notification will always open the notification in the app, and as far as I know there is no way in public API to override this behavior. It does appear there is a private API to get the behavior you’re looking for, as some iOS-generated (local, not push) notifications appear to do exactly what you’re asking. If you can manage to uncover that, use at your own risk should Apple find out.
Now, as for possible solutions: I would consider implementing code on your app’s delegate to respond appropriately when the notification is opened. For example, send the user to an appropriate location in the app when the app is launched from a notification…perhaps a view controller that shows the same content that would be shown as the rich notification content. I don’t know the exact use case, but the wording implies to me that if the app launches to its main interface, it could be confusing to a user.
It’s impossible for me to tell you how exactly you wish to respond to notifications, so for more on responding appropriately when the app was launched from a push notification, see the following documentation from Apple:
Determine Why Your App Was Launched
UIApplicationDelegate.application(_:willFinishLaunchingWithOptions:)
UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:)
UIApplication.LaunchOptionsKey
UIApplication.LaunchOptionsKey.remoteNotification
Hopefully from that you can find a suitable solution. But if that isn’t an option, consider directly telling the user at some point to press firmly (or tap and hold, as many devices do not support 3D Touch) to view the content. You could do this during some onboarding process or, as an absolute last resort, in the notification itself.
Before proceeding down that route, though, understand that not all users know 3D Touch and/or this rich-content functionality even exists — even fewer use it regularly — and if they become confused, they may decide to clear the notification or outright disable your app’s notifications. In general, it’s also a bad idea to “teach” your user unfamiliar ways of using their device. If a user is used to tapping on notifications, as many are, they will most likely tap on your notifications. It can be tough to break that muscle memory.

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.

Is it possible to display progress on App icon

Is there a way to display progress on Ios App icon on the launcher/ main screen like they have default when installing or downloading an app from App store?
I have content that is being downloaded/uploaded in the background. I want to display continuous progress on app icon.
A circular progress bar is not important. I am just looking if there is any provision for such situations.
This is not possible.
Apple does expose any API methods for adding a layer to the app icon on the springboard.
Also changing your apps icon to include the progress will not work, since the app icon is in your apps main bundle which is readonly.
i don't know if it is still possible to use these red numbers like for whatsapp when you receive a message.
Maybe that would be an idea. You could Show the "%" of the upload/download that way.

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....

Resources