Onesignal-ios-sdk: iOS 10 Rich notifications - Without content-available requirement

Created on 25 Oct 2016  路  16Comments  路  Source: OneSignal/OneSignal-iOS-SDK

Hi guys,

I've a little problem with rich notifications on iOS 10.

I've implemented them in my application, and when I test it on my iPhone when it is connected to my PC, they works, and the rich notifications arrives.
When I send a notification with a content, and the phone isn't connected to my PC, the notification doesn't arrive. But if I send a notification without contents, it arrives.
I've tested this with other iPhones. If I reinstall the app from the App Store, the notification arrives, but only the first time.

Is there a workaround?

Thanks in advance,

Gianpiero


UPDATE: if the app is open, the notification with the content arrives, but if I close it, the notification doesn't arrive, but the only-text notification arrives...

Enhancement / Feature

Most helpful comment

mutable-content is now used instead of content-available in the 2.4.0 SDK. Make sure to follow the new setup guide to add a Notification Service Extension target to your project. Otherwise notifications will be shown without attachments or buttons.
https://documentation.onesignal.com/docs/ios-sdk-setup

All 16 comments

I'm relieved that I'm not the only one, and it is not one of my error :)

Similar kind of Issue, when the app is used for the first time, we are able to get rich notifications with media content like gifs, images or video

However, once the app is killed, no rich notification is received whereas normal Push Notification are still getting fetched properly

@gianpispi @mehulShah19 The app must not be force closed for this feature to work. See the full list of requirements for this feature below.
iOS notifications with action buttons or media set not displaying

Thanks.

Thank you @jkasten2 . So if a user installs the app, once he opened it, he cannot close it? And if he turn off the device? So no one will receive rich notifications, because all people close apps...

It's fine if the application was closed normally. iOS treats applications that have been force-closed by users swiping up on the application from the task switcher differently than those that were closed normally by the user clicking the home button or restarting their device.

@gdeglin Ok, but all users close the app by swiping up o the the app in the background. I don't know anyone that doesn't close the app in the background...

@gdeglin I checked the troubleshooting link and did verify all the steps which were mentioned, but still I am facing this issue. The strangest thing is normal push notification are still getting received

@gianpispi It is a limitation of content-available notifications with iOS. We are looking into updating this to use mutable-content and a service extension in the future.

@mehulShah19 You didn't see Low Priority Push: com.onesignal.example - App killed in your Xcode device log? Note that if you press stop or disconnect your device after deploying with XCode you need to reopen your app and background it again.
If you are still seeing an issue please make sure you have version 2.1.16 of our SDK. Send your notification id to OneSignal support if this was already updated.

Thanks.

I hope you'll update your framework soon, with the support of mutable-content, because I really need rich notifications in my app. Thank you!

Waiting for an update to workaround this. :/

Any updates? Will be implemented showing image in push notification if app was force closed?

@mikestalker I'll be starting work on this task later this week.

@jkasten2 thanks and good luck with fix (=

Ho guys! Any news about that? Thank you very much! :)

@gianpispi I just finished fixing a few higher priority bugs and improvements in versions 2.3.6 and 2.3.7 of our SDK. I coming back to this issue this week.

mutable-content is now used instead of content-available in the 2.4.0 SDK. Make sure to follow the new setup guide to add a Notification Service Extension target to your project. Otherwise notifications will be shown without attachments or buttons.
https://documentation.onesignal.com/docs/ios-sdk-setup

Was this page helpful?
0 / 5 - 0 ratings