flutter-moum/flutter_screenshot_callback

Failed in Build in IOS

Closed this issue · 1 comments

/../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/screenshot_callback-1.1.5/ios/Classes/SwiftScreenshotCallbackPlugin.swift:27:40: 'UIApplicationUserDidTakeScreenshot' has been renamed to 'UIApplication.userDidTakeScreenshotNotification'

/../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/screenshot_callback-1.1.5/ios/Classes/SwiftScreenshotCallbackPlugin.swift:27:40: 'UIApplicationUserDidTakeScreenshot' was obsoleted in Swift 4.2 (UIKit.NSNotification.Name)

i used Swift 5 ,

when I try to rename
'UIApplicationUserDidTakeScreenshot' to 'UIApplication.userDidTakeScreenshotNotification'
It's failed and I get
Type 'NSNotification.Name' has no member 'UIApplication' .

Remove NSNotification.Name
it should be like:
forName: UIApplication.userDidTakeScreenshotNotification