flutter-moum / flutter_hardware_buttons

Flutter plugin for detecting all hardware buttons
MIT License
37 stars 46 forks source link

Installation Problem #32

Closed nexussmart closed 4 years ago

nexussmart commented 4 years ago

Hi,

When i run my project, I get the following errors

    /....../flutter/.pub-cache/hosted/pub.dartlang.org/hardware_buttons-0.2.1/ios/Classes/VolumeButtenStreamHandler.swift:43:61: error: 'UIApplicationDidBecomeActive' has been renamed to 'UIApplication.didBecomeActiveNotification'
            notificationCenter.removeObserver(Notification.Name.UIApplicationDidBecomeActive)
                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                UIApplication.didBecomeActiveNotification
    UIKit.NSNotification.Name:11:23: note: 'UIApplicationDidBecomeActive' was obsoleted in Swift 4.2
        public static let UIApplicationDidBecomeActive: NSNotification.Name
                          ^
    /....../flutter/.pub-cache/hosted/pub.dartlang.org/hardware_buttons-0.2.1/ios/Classes/VolumeButtenStreamHandler.swift:49:42: error: 'AVAudioSessionCategoryAmbient' has been renamed to 'AVAudioSession.Category.ambient'
                try audioSession.setCategory(AVAudioSessionCategoryAmbient)
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                             AVAudioSession.Category.ambient
    AVFoundation.AVAudioSessionCategoryAmbient:3:12: note: 'AVAudioSessionCategoryAmbient' was obsoleted in Swift 3
    public let AVAudioSessionCategoryAmbient: AVAudioSession.Category

Do you have an idea ?

Thanks

eojine commented 4 years ago

Thanks. I fixed this problem Try again!

nexussmart commented 4 years ago

Thanks