Skip to content

v0.6.0

Compare
Choose a tag to compare
@github-actions github-actions released this 29 Apr 23:02
· 44 commits to main since this release

What's Changed

  • Ios asking notification permission optioanal at start and exposing permissonUtil by @mirzemehdi in #27
  • Fixing android payload data is always empty onNotificationClicked by @mirzemehdi in #26

New Things

By default in IOS, notification permission will be asked when application starts. But if you want to handle permission yourself whenever you want, then when initializing library you can pass askNotificationPermissionOnStart value as false in IOS configuration.

Ios initalization

NotifierManager.initialize(
  configuration = NotificationPlatformConfiguration.Ios(
    askNotificationPermissionOnStart = false, //Default value is true
  )
)

Also, PermissionUtil class is exposed in commonMain, that you can use as an utility class for asking permission or checking notification permission for ios. You can get it using

val permissionUtil = NotifierManager.getPermissionUtil()
permissionUtil.askNotificationPermission()

However, In Android this function is just a mock. You need to ask permission in Android activity using like below:

val permissionUtil by permissionUtil()
permissionUtil.askNotificationPermission()

⚠️Warning: PermissionUtil is exposed as an experimental as this library doesn't focus around permissions!. It is there just for making things easier if needed

Full Changelog: v0.5.0...v0.6.0