d7laungani / DLLocalNotifications

:speech_balloon: Easily create Local Notifications in swift - Wrapper of UserNotifications Framework
MIT License
214 stars 38 forks source link

firstNotification.launchImageName not working #26

Closed fabien79 closed 4 years ago

fabien79 commented 5 years ago

Hi,

I would like to add an image on the localnotification but i've got this error: 'launchImageName' is inaccessible due to 'internal' protection level

Can you help me to fix it please ?

Thanks in advance

d7laungani commented 4 years ago

I have not been able to reproduce your issue but I created a test to prove it works

https://github.com/d7laungani/DLLocalNotifications/blob/4b2c3a20c8d38a889a920ad0e1f6e9cf57d80a9e/DLLocalNotificationsTests/DLLocalNotificationsTests.swift#L151

SasLuca commented 1 year ago

I have the same issue, not sure if it's related to me using Swift 5.0 but reading the code the error seems to make sense, default visibility in Swift is internal and the member launchImageName is declared without a visibility modifier.

Are you sure that launchImageName shouldn't be declared as public var launchImageName: String? ?

Not sure how this isn't encountered by more people.