This is a special fork of Auth0.swift that (theoretically) supports Swift Package Manager 🎉😬
I say "theoretically" because so far I've only tested the iOS version in a real project (I was able to log in and get tokens etc, but definitely need to test everything else properly)
Because Auth0 is that dependency that is stopping us from moving to the Swift Package Manager
Have a look at
Auth0toSPM.rb - it's a script that performs the necessary modifications required to convert the Auth0.swift source to a Swift Package.
This is so (theoretically) when there is a new version of Auth0 we don't need to worry about manually making all the changes again
#if os(...)instead of target-to-platform source file management. Use the same rules as in the original Podspec.
import Foundationlines where necessary as SPM is happily strict about this
WEB_AUTH_PLATFORMpreprocessor macro with
#if osusing the same rules as the Podspec
>in Objective-C imports anymore. Guess where this Objective-C module needs to be imported and add
importlines for it in the Swift source files
plistValues(bundle:)function as including the
Auth0.plistin the bundle won't be supported until Swift 5.3 - however this breaks the real source so.. it's commented out in
Auth0toSPM.rbfor now - you can make the change manually if you want to run the tests.
You can see what was changed by the script by searching for
// Added by Auth0toSPM in the source files or looking at 9the diff](https://github.com/maxchuquimia/Auth0.swift/blob/master/changes.diff)
Note: generating the package and listing dependencies was done manually. Tests are commented out.
watchOSwon't work... maybe because we shouldn't be adding
SimpleKeychainto it? It does compile... It's 11:30pm now now, I can't remember my thoughts from this morning.
.mtest files in the
Auth0.swifttests that I haven't figured out the best way to copy across.. maybe all tests will be working when that's done. Feel free to make suggestions on how to achieve this. Also tests only run under iOS and you need to update the lowest supported platform from
v9(in the Podspec) to
.v10(in the Package.swift) in order to get tests running.
Things are only impossible until they are not
|Last commit: 4 weeks ago|