jpsim / JPSVolumeButtonHandler

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

SPM (Swift Package Manager) support #67

Closed nylki closed 1 year ago

nylki commented 1 year ago

This PR adds support for installation via SPM (Swift Package Manager) by adding a Package.swift and a required include directory with a symlink to the header file.

I set the minimum swift tools version to 5.4 and minimum iOS target to version 11.0. But feel free change either of those (though iOS 11 is the minimum possible AFAIK).

jpsim commented 1 year ago

Thanks for your contribution! I haven't verified that the approach taken by this library still works in recent iOS versions however.

nylki commented 1 year ago

@jpsim thank you for looking into the PR so quickly! :slightly_smiling_face: For what it's worth, I started using it in iOS 16 in a SwiftUI context and atleast for my use-case, it generally works quite well!


Just in case you wanna test it yourself on newer iOS version, here are some things I noticed that may not work as intended anymore, but I was able to work around:

cheers!