Foros de discusión

Liferay Screens and Swift 3.0

thumbnail
Salva Tejero, modificado hace 7 años.

Liferay Screens and Swift 3.0

Junior Member Mensajes: 77 Fecha de incorporación: 13/06/11 Mensajes recientes
Hello, I made the mistake of updating my phone and now, i need to use Xcode 8.X and Xcode wants to upgrade to Swift 3.0

Will be there an upgrade to Swift 3.0?
thumbnail
Jose M. Navarro, modificado hace 7 años.

RE: Liferay Screens and Swift 3.0

Regular Member Mensajes: 138 Fecha de incorporación: 24/01/14 Mensajes recientes
Not yet, the Swift 3 migration is not so easy.

Meanwhile you can have several versions of Xcode installed: 7.3.x for Swift 2.2 and 8.x for Swift 2.3 and 3
thumbnail
Salva Tejero, modificado hace 7 años.

RE: Liferay Screens and Swift 3.0

Junior Member Mensajes: 77 Fecha de incorporación: 13/06/11 Mensajes recientes
Ok,

A possible workaround

In Xcode 7.X Pod file

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


Target -> build Setting -> USER-SEttings -> SWIFT_VERSION = '2.3'

In Xcode 8.X

pod install

All Pods SWIFTs targets -> User Legacy Swift Language Version -> yes

Then in some classes add ! in NSURL.absoluteString