-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
macOS notification crash #1507
Comments
Thanks for spotting this. The issue is the parameters should've defaulted to true and also had been non-nullable on macOS but is nullable (note: they're non-nullable on macOS). I would suggest you explicitly specify the permissions you need on macOS as attempt to make some changes to the method signature etc is a breaking change so will be part of the 10.0.0 (pre)release that's currently being worked on |
Actually what I could do is put some coalescing code on the macOS/Swift side for a 9.3.3 release then in 10.0.0 is where there'll be a breaking change in the API signature but functionally it should behave the same |
你好,flutter_local_notifications在oppoandroid 11上没有效果,通道绑定自定义铃声失败 ,能帮忙看看什么原因吗? |
用英文开一个新的issue 这个issue已经close了 作者也看不懂中文 |
Describe the bug
application crashed when requesting macOS notification permission with error
Could not cast value of type 'NSNull' (0x7ff84f13f710) to 'NSNumber' (0x7ff84f13ed78).
I also could not get the macOS notification permission request to work with the sample code, I understand that there are some additional setup, but all I found are for other platforms but not macOS, so I assume that macOS don't need any additional setup like changing things in
info.plist
or adding some initialisation code inAppDelegate.swift
. After comparing the sample code macOS folder with my own, the only difference I can tell is that I don't have SandBox enabled. Is there anything additional I should do to get macOS notification working?To Reproduce
use the example project in this repository, but remove the optional parameters when calling
requestPermissions
, the application will crash with error:Could not cast value of type 'NSNull' (0x7ff84f13f710) to 'NSNumber' (0x7ff84f13ed78).
Expected behavior
should not crash
Sample code to reproduce the problem
The text was updated successfully, but these errors were encountered: