I'm facing an issue with the universal framework in iOS (closed source).
When creating the universal framework it shows * Generated by Apple Swift version 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9) * and it works fine if add the framework to project
But after uploading it to git and using pod to install I'm getting an error Module compiled with Swift 5.0.1 cannot be imported by the Swift 5.1.2 compiler
When I checked the header file I saw // Generated by Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)
The issue I understood is while uploading my compiler is Swift version 5.1.2, which is correct but after pod install somehow it's getting changed to Swift version 5.0.1
Why is this getting changed? and how can I make sure that it won't change?
podspec
Pod::Spec.new do |s|
s.platform = :ios, '11.0'
s.name = "xyz"
s.version = '1.0.5'
s.summary = 'xyz - Binaries'
s.description = 'Framework for xyz'
s.homepage = 'https://github.com/xyz/xyz'
s.license = { :type => 'MIT' }
s.author = 'https://github.com/Albinzr'
s.requires_arc = true
s.swift_version = '5.1'
s.source = { :http => 'https://github.com/xyz/SDK/blob/master/xyz.framework.zip?raw=true' }
s.ios.deployment_target = '11.0'
s.ios.vendored_frameworks = 'xyz.framework'
end