Search code examples
ioscocoapodspodspec

Cocoapods not showing my project as Tested


I have a project that I've added as a Cocoapod. It is covered by tests, yet the Cocoapods project page does not show the tests. Here is the link to my project page:

https://cocoapods.org/pods/SKTableViewDataSource

Note, Tested: X in the right hand column.

This is what my podspec looks like:

Pod::Spec.new do |spec|

spec.name = 'SKTableViewDataSource'
spec.version = '1.0.0'
spec.license = 'MIT'
spec.summary = 'An easy to configure data source for UITableView.'
spec.homepage = 'https://github.com/skladek/SKTableViewDataSource'
spec.authors = { 'Sean Kladek' => 'skladek@gmail.com' }
spec.source = { :git => 'https://github.com/skladek/SKTableViewDataSource.git', :tag => spec.version }
spec.ios.deployment_target = '9.0'
spec.source_files = 'Source/*.swift'
end

Do I need to add something to the podspec or elsewhere to have it recognize my tests?


Solution

  • From a ticket in the cocoadocs.org project:

    Apparently it comes from the © character in the headers added by Xcode when creating a new Swift file, like in the following line:

    //  Copyright © 2017 pirishd. All rights reserved.
    

    Removing this character in all the Swift files of the Test target makes detection work again.

    https://github.com/CocoaPods/cocoadocs.org/issues/523

    Removing the copyright headers from my test files worked for me.