Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS media attachments #55

Open
agrycroko opened this issue Jan 20, 2018 · 9 comments
Open

iOS media attachments #55

agrycroko opened this issue Jan 20, 2018 · 9 comments

Comments

@agrycroko
Copy link

agrycroko commented Jan 20, 2018

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

@jvandijk
Copy link
Collaborator

jvandijk commented Feb 5, 2018

I haven't played with rich media notifications yet. I do know this requires additional processing inside the app upon receiving the data from OneSignal. How exactly.... I can't tell you.

@jkasten2
Copy link

jkasten2 commented Feb 8, 2018

Rich media notifications work on iOS 10+ and requires that a Notification Service Extension target be added to your project in Xcode. There is a guide below on creating one and setting it up with the OneSignal SDK.
https://documentation.onesignal.com/docs/ios-sdk-setup#section-1-add-notification-service-extension

@agrycroko
Copy link
Author

@jkasten2 - thx I was kinda looking along that route but couldn't get it to work. I was building the extension in Xcode and then dropping into my Titanium SDK 7.0.1 Alloy project. I tried adapting this tutorial to use a Notification Service Extension rather than the Siri one they're talking about: https://docs.appcelerator.com/platform/latest/?mobile=/guide/Creating_iOS_Extensions_-_Siri_Intents - anyhow something's missing and not wired up correctly. Any thoughts or successful code you can share? Thanks.

@jkasten2
Copy link

jkasten2 commented Feb 9, 2018

@garycrook I haven't used Titanium before but since the Notification Service Extension is it's own target and ends up in it's own process it shouldn't be effected. If the code you added is compiling and linking correctly it should be working.

To ensure the Notification Service Extension is being triggered however I recommend following this troubleshooting guide.
https://documentation.onesignal.com/docs/troubleshooting-ios#section-debug-the-notification-service-extension

@agrycroko
Copy link
Author

Thank you @jkasten2 I will investigate.

@DharmeshRathod712
Copy link

@garycrook even I am caught up with the same issue. Did you find any solution? Thumbnail image is not visible, only message is visible when notification is received in notification bar. But I am receiving the url of image in notificationOpened and notificationReceived eventListeners. I tried to create native Xcode project and integrated OneSignal module in it as mentioned here https://documentation.onesignal.com/docs/ios-sdk-setup and it is displaying the Thumbnail icon.

@agrycroko
Copy link
Author

agrycroko commented May 4, 2018

@user712 no I didn't 😒

In the end I moved over to using Firebase for push (not rich ones, just standard). I'm using @hansemannn's excellent titanium-firebase modules.

Good luck!

[UPDATE]
P.S. If you can hold on, rich notifications are part of the upcoming Titanium SDK 7.2.0 release 😉

@DharmeshRathod712
Copy link

DharmeshRathod712 commented May 7, 2018

@garycrook actually my app is already live with OneSignal. And every other thing is working fine with OneSignal Module, only problem is media attachment is not visible as a thumbnail.
@williamrijksen I will be very thankful if you can help us with the work around or any temporary solution until it is fixed.

[UPDATE]
After doing little R&D on OneSignal module I found that there is a method
+(UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest*)request withMutableNotificationContent:(UNMutableNotificationContent*)replacementContent; which can be used for iOS Media Attachments and Action buttons, but I don't know how to work with it.

@SilvioLuis
Copy link

Any solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants