Hi,
I'm using XCode 8 and now I get this error when I open my application. The application include different libraries using cocoapod. It also includes phoneid.
The error is:
“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
I solved the problem setting the Build Setting parameter
"Generate Legacy Test Coverage Files" to YES
and in the pod file I have included the following lines to set the Swift version of each dependency:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '2.3'
end
end
end
Now the Legacy error is solved but I have the following errors in the source code of the phoneid library:
/phoneid_iOS/Pod/Classes/ui/views/controls/NumberInputControl.swift
/phoneid_iOS/Pod/Classes/ui/views/controls/NumberInputControl.swift:109:69: 'Baseline' is unavailable in Swift: Use 'lastBaseline' instead
/phoneid_iOS/Pod/Classes/ui/views/fullscreen/PanZoomImageView.swift
/phoneid_iOS/Pod/Classes/ui/views/fullscreen/PanZoomImageView.swift:117:31: Value of optional type 'CGContext?' not unwrapped; did you mean to use '!' or '?'?
/phoneid_iOS/Pod/Classes/ui/views/fullscreen/PanZoomImageView.swift:125:16: Value of optional type 'UIImage?' not unwrapped; did you mean to use '!' or '?'?
/phoneid_iOS/Pod/Classes/ui/views/PhoneIdBaseView.swift
/phoneid_iOS/Pod/Classes/ui/views/PhoneIdBaseView.swift:143:68: 'Baseline' is unavailable in Swift: Use 'lastBaseline' instead
/phoneid_iOS/Pod/Classes/utils/Reachability.swift
/phoneid_iOS/Pod/Classes/utils/Reachability.swift:124:12: Initializer for conditional binding must have Optional type, not 'dispatch_source_t' (aka 'OS_dispatch_source')
/phoneid_iOS/Pod/Classes/ui/views/fullscreen/UserNameView.swift
/phoneid_iOS/Pod/Classes/ui/views/fullscreen/UserNameView.swift:132:70: 'Baseline' is unavailable in Swift: Use 'lastBaseline' instead
Right now I'm fixing the above errors locally on my mac in order to keep working.
Can you fix these new errors please?
Hi, I'm using XCode 8 and now I get this error when I open my application. The application include different libraries using cocoapod. It also includes phoneid. The error is: “Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
I solved the problem setting the Build Setting parameter
and in the pod file I have included the following lines to set the Swift version of each dependency:
Now the Legacy error is solved but I have the following errors in the source code of the phoneid library:
Right now I'm fixing the above errors locally on my mac in order to keep working. Can you fix these new errors please?
Thanks