SecretSquirrel: A Demonstration of releasing Closed Source libraries privately via SPM.
A demo repository that showcases how to properly vend a closed-source framework.
- Check out The Basic Demo to get the basic idea of how this is done
- Check out The Dependancy Demo to see how you can easily satisfy external dependancies for an opaque binary framework using a wrapper package.
- First, you must run
./generateFatBinary.shto generate the closed-source binary that the app project consumes.
- Open the app project and run the app.
SecretSquirrelFrameworkrepresents the "hidden" source that the client does not have access to.
generateFatBinary.shscript represents your library publishing process. Run
./generateFatBinary.shin the project root directory to generate a "Release" of the
Productsdirectory represents the deliverable. After generating the release, The entire directory would be zipped up and given to the client.
SecretSquirrelApprepresents the client app that uses the black-box framework. It consumes the library's package.swift as part of the local swift package deliverable that would be ordinarily recieved as a zip, decompressed, and then bundled into the client project.
SecretSquirrelSPMpackage is an empty wrapper type that allows us to wrap
SecretSquirrelin a second framework that allows us to define and satisfy all
SecretSquirreldependancies for the client without betraying any source. The only reason the swift file exists is because SPM refuses to generate a target package that contains no source at all.