-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift 4 Cocoapods Issue (How to Fix) #470
Comments
The latest Lock The problem here (I'm guessing you're using Cocoapods as there is no issue with carthage ) is the Cocoapods will force the pods to become the Swift version of your project which is 4.0. You can read about this here CocoaPods/CocoaPods#6791 There is thankfully a workaround, add the # Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'myapp' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for myapp
pod 'Lock', '~>2.4'
pod 'Auth0', '~>1.8'
end
post_install do |installer|
# List of Pods to use as Swift 3.2
myTargets = ['Lock']
installer.pods_project.targets.each do |target|
if myTargets.include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.2'
end
end
end
end I'll leave this ticket open for others to see. |
Awesome! Thank you very much guys! |
I'm going to leave it open just now for visibility, perhaps it's worth adding to the README. |
This fixed the swift 4 errors for me but now I'm getting: " 'shared' is unavailable: Use view controller based solutions where appropriate instead. " in Auth0/ControllerModalPresenter |
@b-d what are you making, it sounds like you are making something that doesn't have a view controller, like an app extension. Please create a new issue and provide sample code. I don't believe this is a Swift 4 related issue. Thx |
v 1.9 gives me
This fix does not seem to solve it. |
Any plans to upgrade the code to Swift 4? |
Yes, along with some other bigger changes so keep an eye out. |
@cocojoe Any update on Swift 4 release timeframe? We are currently blocked from updating our own pod to Swift 4 since you can't lint mixed podspecs and we have Lock as a dependency. |
|
@cocoojoe thank you, I’ll test it out |
Lock Error/warnings on project from scratch and already advanced project..
I had project I was building, since I moved today from swift 3 to swift 4(today I installed xcode 9), Lock framework failed to compile.
I gave it a try on a fresh project(from scratch, whose only has one view controller and the only frameworks that it has is Lock and Auth0) and it failed again, so I have realized it is not something about the project itself but maybe incompatibility with swift 4 and xcode 9. ( I am using Lock 2.4.9, and Auth0 1.8)
The text was updated successfully, but these errors were encountered: