pmusolino / Wormholy

iOS network debugging, like a wizard 🧙‍♂️
MIT License
2.32k stars 184 forks source link

Getting Swift Compiler Errors #34

Closed Pulkit-1mg closed 5 years ago

Pulkit-1mg commented 5 years ago

After Installing pod, getting swift compiler errors in following files :

CodeAttributesString.swift Highlighter.swift RequestModelBeautifier.swift Theme.swift

Error : Method does not override any method from its super class

Swift version 3.3

pmusolino commented 5 years ago

Wormholy is compatible with Swift >= 4, then I do not test Wormholy with Swift 3 projects.

I've not tested this solution, but a workaround is possible. Append this to your Podfile, and add pods that are already Swift 4 to the array swift4Targets, then pod install.

# Workaround Cocoapods to mix Swift 3.3 and 4
# Manually add to swift4Targets, otherwise assume target uses Swift 3.3
swift4Targets = ['MyTarget1', 'MyTarget2']
post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            if swift4Targets.include? target.name
                config.build_settings['SWIFT_VERSION'] = '4'
            else
                config.build_settings['SWIFT_VERSION'] = '3.3'
            end
        end
    end
end
Pulkit-1mg commented 5 years ago

Issue Resolved by compiling the framework with Swift 4.1