jpsim / JPSVolumeButtonHandler

JPSVolumeButtonHandler provides an easy block interface to hardware volume buttons on iOS devices. Perfect for camera apps!
MIT License
336 stars 91 forks source link

Does not work in flutter project #61

Open matthias-glatthorn opened 4 years ago

matthias-glatthorn commented 4 years ago

I try to use JPSVolumeButtonHandler in a flutter project, but the volume buttons are not detected. This is how I used it:

AppDelegate.swift:

var volumeButtonHandler: JPSVolumeButtonHandler?
volumeButtonHandler = JPSVolumeButtonHandler(up: {self.doSomething()}, downBlock: {self.doSomething()})
volumeButtonHandler?.start(true)
...  
func doSomething() -> Void {  
...  
}