My Pod requires Swift 5 to compile and I set it in the Podspec:
However, the generated Xcode project still sets the version to 4.0:
smuthu in ~/Sandbox/ios-video-player on branch master >grep 'SWIFT_VERSION = 4.0' ./ -r --color=auto -n
...
.//GeneratedWorkspace/Workspace/Pods/Pods.xcodeproj/project.pbxproj:9874: SWIFT_VERSION = 4.0;
.//GeneratedWorkspace/Workspace/Pods/Pods.xcodeproj/project.pbxproj:9916: SWIFT_VERSION = 4.0;
...
.//GeneratedWorkspace/Workspace/Workspace.xcodeproj/project.pbxproj:287: SWIFT_VERSION = 4.0;
.//GeneratedWorkspace/Workspace/Workspace.xcodeproj/project.pbxproj:374: SWIFT_VERSION = 4.0;
I was able to run
find . -name '*.pbxproj' -print0 | xargs -0 sed -i "" "s/SWIFT_VERSION\ =\ 4.0/SWIFT_VERSION\ =\ 5.0/g"
and confirmed that my targets build correctly.
cocoapods-generate should respect the swift_version flag and reflect it in the generated Xcode projects.
My Pod requires Swift 5 to compile and I set it in the Podspec:
However, the generated Xcode project still sets the version to
4.0:I was able to run
and confirmed that my targets build correctly.
cocoapods-generateshould respect theswift_versionflag and reflect it in the generated Xcode projects.