Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

SPM (Swift Package Manager) support #67

Merged
merged 4 commits into from
Jul 6, 2023

Conversation

nylki
Copy link
Contributor

@nylki nylki commented Jul 5, 2023

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).

@nylki nylki mentioned this pull request Jul 5, 2023
@jpsim
Copy link
Owner

jpsim commented Jul 6, 2023

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

@jpsim jpsim merged commit f060614 into jpsim:master Jul 6, 2023
@nylki
Copy link
Contributor Author

nylki commented Jul 6, 2023

@jpsim thank you for looking into the PR so quickly! 🙂
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:

  • When the system volume is 0 before calling start(), the isAdjustingInitialVolume guard is not working as robust as it might have been in the past: there is still one single unwanted call to the up/down block in that case, but works flawless afterwards.

  • not sure if the exactJumpsOnly works properly, did not fire the callbacks reliably when I set it (I ended up not setting it)

  • setting the up/down blocks after initializing an instance of the handler did not work for me (they weren't called), but I did not look into it further.

cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants