Closed helloniklas closed 7 years ago
So I can guess what this is, you are using Cocoapods in a Swift 4 project, when dependencies are added Cocoapods will set the dependency projects Swift version to 4.0 regardless of their actual swift version (Cocoapods bug).
In this case the Auth0.swift lib is Swift 3.2 for compatibility in both Xcode 8 and 9. So the error is thrown on the above is due to the lib being changed from 3.2 to 4.0. The 'Auth0-swift.h' header is missing because it couldn't compile.
There is an easy fix for this if you take a look at https://github.com/auth0/Lock.swift/issues/470
Yes I'm on Swift4. Thanks will follow that post.
Still gives the error
Cannot convert value of type '(_) -> ()' to expected argument type 'SFAuthenticationSession.CompletionHandler' (aka '(Optional<URL>, Optional<Error>) -> ()')
Will revert to 1.8.0 until this is fixed.
I imagine you probably have to deintegrate the pod and reinstall for an existing project vs a new one.
So I just quickly checked this, you can also update setting in the existing Xcode project.
Set to Swift 3.2
Ok thanks. That now works
Well I can recreate your error easily and also easily fix with correcting the swift version. Only other thing I can suggest for you to is clean the project and possibly clear out your derived data and rebuild.
I will also look at a fix in Swift 4
@cocojoe sorry, it did work in the end... it somehow switched back to 4.0... but it now works when set to 3.2. Thanks for swift reply...
So as usual when there is a new release things stop working.
Done a pod update to 1.9
It now complains about
Header 'Auth0-Swift.h' not found
Cannot convert value of type '(_) -> ()' to expected argument type 'SFAuthenticationSession.CompletionHandler' (aka '(Optional, Optional) -> ()')
in SafariAuthenticationSessionCallback.
Any ideas?