williamrijksen / com.williamrijksen.onesignal

Titanium Appcelerator Library for OneSignal Push Notifications Service
Other
51 stars 43 forks source link

iOS 10 Rich Push notifications #13

Open aurusapps opened 7 years ago

aurusapps commented 7 years ago

Are iOS 10 Rich Push notifications ie. with buttons and media supported in the current version of the module?

jkasten2 commented 7 years ago

@aurusapps Yes, this supported by this SDK. Make sure you have the latest version in your app. Also make sure your media links don't contain any redirects and are HTTPS. HTTP URLs can be used but require a plist entry to override the HTTPS requirement.

Also you may have to enable "Remote notifications" under Background Modes in Xcode if titanium isn't doing it for you. https://documentation.onesignal.com/docs/ios-sdk-setup#section-2-add-required-capabilities

aurusapps commented 7 years ago

@jkasten2 My question was whether it is implemented in this module rather than the native iOS SDK itself. Would you know if it is? I feel the SDK in use is older and maybe we need to recompile this module with the latest version of the SDK.

jkasten2 commented 7 years ago

@aurusapps Although it isn't documented in this repo I see it is using 2.1.16 of the OneSignal iOS native SDK. Support for iOS 10 media attachments was added back in version 2.1.1 of the native SDK so this plugin will support it was well.

The requirement of the 2.1.16 native SDK is that you must have "Remote notifications" under Background Modes enabled from our native instructions (also noted above.) If you do not do this then the notification will not show at all if you add action buttons or an attachment to it.

There are a few more requirements on the iOS device itself but that is the only requirement for your app. I recommend following troubleshooting the guide below to check this on the device end. https://documentation.onesignal.com/docs/troubleshooting-ios#section-notification-display-issues

If you are stuck let us know if you are not seeing the notification at all when you add an attachment or is the notification displaying but just without the attachment?

aurusapps commented 7 years ago

my bad, this seems to have worked on another app we tried it with. Will update with the exact steps we used so others can also use rich notifications in iOS.

chmiiller commented 7 years ago

Not sure, but I think latest commit also provides a way to use Rich Notifications on iOS. Can you confirm this @williamrijksen ? Than you may want to also close this issue =)

jvandijk commented 7 years ago

@chmiiller Theoretically yes. By providing the documented extension in step 5 of the README to your app, you should be able to use rich notifications. We haven't tested this though...

chmiiller commented 7 years ago

hey @jkasten2 do you mind having a look at #38 ? Maybe you can assist us on that? Thanks!

jvandijk commented 6 years ago

In #38 we've update to the latest version of OneSignal 2.5.4

We did not test the rich notifications though, because we haven't been using these ourselves.

agrycroko commented 6 years ago

Hi all, so as of now, January 20th 2018, what's the process for getting media links to show as little thumb images on iOS. I put a media url (https and ending with .png) into the OneSignal push field but only the message is displayed, not the thumb image. iOS 11.2 app in development mode on iPhone X. Ti SDK 7.0.1

hansemannn commented 6 years ago

Btw: This should be possible once this PR is merged. If you want to help getting it merged sooner than later, please try out the PR and provide feedback about possible issues.

hansemannn commented 6 years ago

Looks like this 😇: bildschirmfoto 2018-03-22 um 17 24 08 bildschirmfoto 2018-03-22 um 17 23 59

williamrijksen commented 6 years ago

@hansemannn Did you test this in combination with the onesignal module?

SilvioLuis commented 5 years ago

@williamrijksen Do we have any resolution on this topic? I could not get it to work, even following the steps to enable rich notifications on iOS.