Lint Error for Swift 4 Xcode 9 Module Library

I am creating a pod for my quick 4 for a library.

I run pod lib create IntentedLibraryName , which creates a workspace. Then I made the necessary changes to the IntentedLibraryName.podspec files and moved my library files to the IntentLibraryName / Classes / path.

To check if pod works, I built pod install from the Example project and everything works as intended.

Now I ran pod lib lint IntentedLibraryName.podspec --verbose , after which I got

(1 crash) === BUILD TARGET IntentLibraryName OF PROJECT Pods WITH CONFIGURATION Release ===

Check dependencies. The Swift Language Version assembly line (SWIFT_VERSION) must be set to a supported value for targets that use Swift. This parameter can be set in the assembly settings editor. The Swift Language Version assembly parameter (SWIFT_VERSION) must be set to a supported value for targets that use Swift. This parameter can be set in the assembly settings editor.

I did the following, hoping this fixes:

In the Pod project , From Build Settings > Swift Compiler- Language > Swift Language Version by Swift is not specified in Swift 4.0.

I added and committed all changes to the tag ( git tag 0.0.1 ) and pushed it all out with -tags. (i.e. git push -u origin dev --tags )

I run the linting command again, and the same problem .

I even try echo 4.0 > .swift-version to save all commit and push it again. Nada

Also tried s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' } NADA

 ## CocoaPods Environment ℹ Please replace this with the output of `pod env`. eg via `pod env | pbcopy` ### Stack ``` 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 ``` ### Installation Source ``` Executable Path: /Users/lamour/.rvm/gems/ruby-2.3.0/bin/pod ``` ### Plugins ``` 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 ``` 

Project showing a problem

Please link to a project that we can download that reproduces the problem. You can delete this section if your problem is not related to build problems, that is, it is only a problem with the CocoaPods tool.

I really think this is a problem with Xcode 9.0 because I created an empty project, it happened anyway.

Thanks for the help:)

Problem Fixed

The problem had nothing to do with Xcode 9 , but it was with cocoapods . I did remove cocoapods from my machine and install it again. After completion, make sure you have echo 4.0 > .swift-version . Voila :)

+7
cocoapods xcode9
source share
1 answer
 echo 4.0 > swift-version 

it should be

 echo 4.0 > .swift-version 

to the right (NB is the leading point)?

I had the same problem and for whatever reason there wasn’t a weird version in my .swift file

 2.4 => 

in it (sic).

After I changed it to

 4.0 

everything worked.

An example project is here:

https://github.com/karstengresch/CleanroomLogger (this is actually the dumb CleanRoomLogger plug I want to use with Cocoapods).

+1
source share

All Articles