MaikuB / flutter_local_notifications

A Flutter plugin for displaying local notifications on Android, iOS, macOS and Linux
2.46k stars 1.4k forks source link

Any guide on macos setup? #2018

Closed johnareid54 closed 1 year ago

johnareid54 commented 1 year ago

This is not a bug, but simply I am stuck on getting the app on work with macos. What changes do I need to make to the setting files?

johnareid54 commented 1 year ago

Sorry disregard - I will look through the example main.dart

yichaosun commented 1 year ago

hi dear, did your notification run on MacOS success? I got build failed,

flutter_local_notifications-14.1.1/macos/Classes/FlutterLocalNotificationsPlugin.swift:426:45: error: 'withFractionalSeconds' is only available in macOS 10.13 or newer
            dateFormatter.formatOptions = [.withFractionalSeconds, .withInternetDateTime]
                                            ^
            dateFormatter.formatOptions = [.withFractionalSeconds, .withInternetDateTime]
                                            ^
    func zonedSchedule(_ call: FlutterMethodCall, _ result: @escaping FlutterResult) {
         ^
public class FlutterLocalNotificationsPlugin: NSObject, FlutterPlugin, UNUserNotificationCenterDelegate, NSUserNotificationCenterDelegate {
             ^
** BUILD FAILED **

Exception: Build process failed
johnareid54 commented 1 year ago

Can't remember what I did to get it working, but here's a link to my working version:

https://1drv.ms/u/s!AjRD0Lu7uy5bozfoAJT-UmeyprqH?e=HDNSvs

yichaosun commented 1 year ago

Can't remember what I did to get it working, but here's a link to my working version:

https://1drv.ms/u/s!AjRD0Lu7uy5bozfoAJT-UmeyprqH?e=HDNSvs

thx, I will check it, your are so sweet

yichaosun commented 1 year ago

not the using problem, I finally found that the podfile of macOS, should config the platform :osx, '10.14', at least 10.13