iOS notification with large icon using Unity Mobile Notifications Package

Hello!

I want to add large icon (a small picture on the right side of the notification) to local notifications using the Unity Mobile Notifications Package. It is quite clear how to do this on android, but I can’t figure out how to do this for iOS using the package?

I think I have to add it as iOSNotificationAttachment, but I have no idea what kind of string should I feed it or where should I place the image in the project.

Any help please? :slight_smile:

I figured it out!

So the picture that you want in the notification has to be in the folder StreamingAssets in the Unity project. Then you add it as attachment to the iOS notification using the package as the string url like this:

"file://" + Path.Combine(Application.streamingAssetsPath, "pictureName.png")
1 Like

I just found out we can do it using that prettier way:

string url = new Uri(Path.Combine(Application.persistentDataPath, "pictureName.png")).AbsoluteUri;
1 Like