I'm creating a pod for my swift 4 for library.
ℹ Please replace this with what you did.
I run pod lib create IntentedLibraryName which generates the workspace. Then I did the necessary modifications to the files IntentedLibraryName.podspec, and moving my library swift files to the path IntentedLibraryName/Classes/.
To test out if the pod works, I've Build and pod install from the Example project and everything works as intended.
Now, I run pod lib lint IntentedLibraryName.podspec --verbose then I got
(1 failure) === BUILD TARGET IntentedLibraryName OF PROJECT Pods WITH CONFIGURATION Release ===
Check dependencies The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor. The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor
I did the following hoping it would fix it:
In the Pod project, From Build Settings > Swift Compiler- Language > Swift Language Version from Swift unspecified to Swift 4.0.
I added and committed all changes along the tag (i.e git tag 0.0.1) and push all it with --tags. (i.e git push -u origin dev --tags)
I run the linting command again, and still the same issue.
I even try toecho 4.0 > swift-version save all commit and push it again. NADA
ℹ Please replace this with the output of pod env.
e.g. via pod env | pbcopy
CocoaPods : 1.4.0.beta.1
Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin16]
RubyGems : 2.5.1
Host : Mac OS X 10.12.6 (16G1023)
Xcode : 9.0 (9A235)
Git : git version 2.8.1
Ruby lib dir : /Users/lamour/.rvm/rubies/ruby-2.3.0/lib
Repositories : bahlo - https://github.com/bahlo/SwiftGif @ d26325392aefe7822dea79a757d4e300c694d010
master - https://github.com/CocoaPods/Specs.git @ f2169476eead8b1a9d898ff73c5eba516504ed78
Executable Path: /Users/lamour/.rvm/gems/ruby-2.3.0/bin/pod
cocoapods-deintegrate : 1.0.1
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.0
cocoapods-try : 1.1.0
ℹ Please link to a project we can download that reproduces the issue.
You can delete this section if your issue is unrelated to build problems,
i.e. it's only an issue with CocoaPods the tool.
I do think its an issue with Xcode 9.0 because I've created empty project, still samething happened.
Thanks for the help :)
Hey there, thanks for the comprehensive issue but this looks like a great example of a question that you should ask on StackOverflow - there is an active tag CocoaPods where people can help out with questions like this. We try to keep the CocoaPods issues focused only on bug reports for the tool, and for upcoming feature requests. Which this doesn't look like.
hey @orta I did post it since yesterday and I didn't get any response so I decided to come here instead lol
IMO, this is a real bug since the pod_target_xcconfig build settings is being ignored by CocoaPods. I tried to set the Swift version that i'm using like this:
s.pod_target_xcconfig = { "SWIFT_VERSION" => "4.0" }
but CocoaPods overrides the xcconfig file and sets the value to Unspecified
Yes I do think so @heyzooi
@LamourBt I submitted this PR https://github.com/CocoaPods/CocoaPods/pull/7109
I hope it will be merged soon
I fixed the issue, I just did clean uninstallation for cocoapods then install it again and it work like a charm :) @heyzooi
@LamourBt which version of CocoaPods are you using now?
Anything works for me :(
s.pod_target_xcconfig = { "SWIFT_VERSION" => "4.0" }I do pod spec lint --verbose --no-clean and I get Pods workspace available at ... for inspection.. When I am opening the project it says that:
This workspace has projects that contain source code developed with Swift 2.x. Xcode 9 does not support building or migrating Swift 2.x targets.
Use Xcode 8.x to migrate the code to Swift 3.
OK. Works. Previously, I haven't fully uninstalled cocoapods.
I uninstalled and installed it one more time today.
My current version is 1.3.1.
Most helpful comment
Anything works for me :(
s.pod_target_xcconfig = { "SWIFT_VERSION" => "4.0" }I do
pod spec lint --verbose --no-cleanand I getPods workspace available at ... for inspection.. When I am opening the project it says that: