flutter_local_notifications icon indicating copy to clipboard operation
flutter_local_notifications copied to clipboard

Proposal to change the iOS general setup document

Open SungHyun22 opened this issue 2 years ago • 2 comments

The documentation says to put the following code(IOS general setup) in didFinishLaunchingWithOptions method

if #available(iOS 10.0, *) {
  UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}

But in reality, that code is in the application method.

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    if #available(iOS 10.0, *) {
      UNUserNotificationCenter.current().delegate = self as UNUserNotificationCenterDelegate
    }

    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}

I think this may confuse the readers of the document. How about explicitly mentioning where to put the iOS general setup code in the documentation?

this part.

image

By the way, thanks for the good library 😁😁

SungHyun22 avatar Aug 27 '22 07:08 SungHyun22

Thanks for picking up on that. Could you please submit a PR?

MaikuB avatar Sep 03 '22 10:09 MaikuB

Okay!!

SungHyun22 avatar Sep 05 '22 02:09 SungHyun22

Forgot to close this since PR had been merged. Thanks again for the submission

MaikuB avatar Sep 23 '22 12:09 MaikuB