SwiftR icon indicating copy to clipboard operation
SwiftR copied to clipboard

Xcode 10 can't run in swift 4

Open zhangli4659507 opened this issue 5 years ago • 5 comments

Xcode 10 can't run in swift 4

zhangli4659507 avatar Apr 17 '19 01:04 zhangli4659507

Have anybody found a working signalr (not core) client for swift 5?

dkornev avatar Apr 22 '19 21:04 dkornev

I am using it as a pod so I do this, which works in Xcode 10.2.1.

swift4_targets = ['foo4', 'SwiftR']
swift4_2_targets = ['foo4_2']

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if swift4_targets.include? target.name
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '4.0'
            end
            else
            if swift4_2_targets.include? target.name
                target.build_configurations.each do |config|
                    config.build_settings['SWIFT_VERSION'] = '4.2'
                end
                
                else
                target.build_configurations.each do |config|
                    config.build_settings['SWIFT_VERSION'] = '5.0'
                end
            end
        end
        
    end
end

buffsldr avatar May 07 '19 23:05 buffsldr

@dkornev ^

buffsldr avatar May 07 '19 23:05 buffsldr

@buffsldr Thanks!

dkornev avatar May 07 '19 23:05 dkornev

Hi @buffsldr, I assume you implemented this in your Podfile right? Can you share an example of the entire Podfile, unless I am unsure where to place it exactly? Thanks!

iDevo avatar May 09 '19 13:05 iDevo