cocoapods.org icon indicating copy to clipboard operation
cocoapods.org copied to clipboard

Pod installable but not visible on cocoapods.org

Open gammelby opened this issue 6 years ago β€’ 16 comments

We published a new pod (NabtoAPI) about a month ago, it installs fine and you can find it when using the searchbar on www.cocoapods.org. But when clicking the search result or just entering the pod's URL as listed on www.cocoapods.org, the browser is just redirected to the pod's homepage as defined in the podspec.

Pod URL that erroneously redirects to our homepage: https://cocoapods.org/pods/NabtoAPI

Pod repo: https://github.com/nabto/nabto-api-pod

Working example using the pod: https://github.com/nabto/nabto-ios-client

gammelby avatar Nov 26 '18 09:11 gammelby

I do not know from the top of my head but I think by specifying s.homepage = 'https://www.nabto.com' it will automatically use that instead but uncertain 100%

dnkoutso avatar Nov 26 '18 09:11 dnkoutso

That same construct works fine for another pod (https://github.com/nabto/nabto-ios-client / https://cocoapods.org/pods/NabtoClient) - but I will check it out, thanks for the suggestion!

gammelby avatar Nov 26 '18 09:11 gammelby

If omitting the homepage attribute, lint fails:

$ pod spec lint --verbose 
Ignoring json-2.1.0 because its extensions are not built.  Try: gem pristine json --version 2.1.0
Ignoring json-1.8.3 because its extensions are not built.  Try: gem pristine json --version 1.8.3
Ignoring unf_ext-0.0.7.5 because its extensions are not built.  Try: gem pristine unf_ext --version 0.0.7.5

    NabtoAPI (1.0.1) - Analyzing on iOS 11.0 platform.
  Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-App`: (``)

Fetching external sources
-> Fetching podspec for `NabtoAPI` from `/Users/ug/git/nabto-api-pod/NabtoAPI.podspec`
 -> NabtoAPI (1.0.1)
    - ERROR | attributes: Missing required attribute `homepage`.
    - ERROR | [iOS] unknown: Encountered an unknown error (The `NabtoAPI` pod failed to validate due to 1 error:
    - ERROR | attributes: Missing required attribute `homepage`.

gammelby avatar Nov 26 '18 12:11 gammelby

This looks like this issue: https://github.com/CocoaPods/cocoapods-metadata-service/issues/1

orta avatar Nov 26 '18 12:11 orta

My relatively new pod also doesn't show up in searches on Cocoapods. SMLinkPreview. You can go to it directly (https://cocoapods.org/pods/SMLinkPreview), but cannot seem to find it in a search.

crspybits avatar Jun 16 '19 23:06 crspybits

When I search PBPopupController, version 1.0.5 is shown but the version is 1.0.6:

https://cocoapods.org/pods/PBPopupController

iDevelopper avatar Jun 17 '19 04:06 iDevelopper

The above pod still has the same issue that the pod's page is not shown when clicking it in search results or entering the direct pod URL. The same happens for a few other pods we have added in the meantime such as https://cocoapods.org/pods/NabtoEdgeClientApi and https://cocoapods.org/pods/NabtoEdgeClientSwift. Is there anything I can do to help debug?

The specs in question are derived from the same base with some slight changes, so there might be some common issue (that I can't spot):

Pod::Spec.new do |s|
  s.name         = 'NabtoEdgeClientSwift'
  s.version      = "0.9.0"
  s.summary      = "Nabto Edge Client for Swift"
  s.description  = <<-DESC
This pod installs [...]
DESC
  s.homepage         = 'https://docs.nabto.com'
  s.license      = { :type => 'Commercial', :file => 'NabtoEdgeClient.xcframework/LICENSE' }
  s.source           = { :http => "https://downloads.nabto.com/assets/edge/ios/nabto-client-swift/#{s.version}/NabtoEdgeClient.xcframework.zip"}
  s.author           = { 'nabto' => '[email protected]' }
  s.vendored_frameworks = 'NabtoEdgeClient.xcframework'
  s.platform = :ios
  s.ios.preserve_paths = 'NabtoEdgeClient.xcframework'
  s.ios.libraries = 'c++', 'stdc++'
  s.ios.deployment_target = '12.0'
  s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
  s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }

end

gammelby avatar Jan 10 '21 20:01 gammelby

@gammelby Have you fixed this issue? If so, how did you manage to fix it?

mohamedgalalcs avatar Jan 30 '21 15:01 mohamedgalalcs

@mohamedgalalcs No, the problem is still thereπŸ™.

gammelby avatar Jan 30 '21 16:01 gammelby

@gammelby I just found the solution for my case, as in my case, I am providing a binary not source code and as mentioned here: https://guides.cocoapods.org/making/quality-indexes.html

Strange as it sounds, if you are providing a binary CocoaPod, it is worth embedding your README.md inside the zip. This means CocoaPods can use it to generate your Pod page. We look for a README{,.md,.markdown} for two directories from the root of your project.

So, I just embedded the README file within the zip file, and I'm waiting now to see if this will fix the issue or not.

mohamedgalalcs avatar Jan 30 '21 17:01 mohamedgalalcs

@mohamedgalalcs Ah, fantastic! Our pods are also binary, so I just tried to push such updated zip as well - crossing fingers. It usually may take some time for the pod to be available for search - did you have any luck in the meantime? If this is really the cause, we should leave the issue open as documentation and/or the lint tool should be improved given apparently several people have run into the problem.

gammelby avatar Jan 31 '21 20:01 gammelby

@mohamedgalalcs The search on cocoapods.org now lists the updated version of our pod (the one with a readme embedded in the binary distribution) - but it is the same problem, still a redirect to the pod's external homepage πŸ™. The structure of the zip is as follows:

.
└── NabtoEdgeClient.xcframework
    β”œβ”€β”€ Info.plist
    β”œβ”€β”€ LICENSE
    β”œβ”€β”€ README.md
    β”œβ”€β”€ ios-arm64
    β”‚Β Β  └── NabtoEdgeClient.framework
    β”‚Β Β      β”œβ”€β”€ Headers
    β”‚Β Β      β”‚Β Β  └── NabtoEdgeClient-Swift.h
    β”‚Β Β      β”œβ”€β”€ Info.plist
    β”‚Β Β      β”œβ”€β”€ Modules
    β”‚Β Β      β”‚Β Β  β”œβ”€β”€ NabtoEdgeClient.swiftmodule

It seems to match the requirements as per above documentation. Did you have any luck? Oh! Could it be something related to the xcframework? I will give it another attempt, embedding the README in the sub-frameworks as well.

gammelby avatar Feb 01 '21 09:02 gammelby

@gammelby unfortunately it didn't work with me also

mohamedgalalcs avatar Feb 01 '21 14:02 mohamedgalalcs

@gammelby I checked multiple pods that start with version number 0.x.x and I found all of them open the website added in the homepage, unlike those started with 1.x.x, so may be that's my issue since my version is 0.x.x, I will try to update it to be 1.x.x and I will tell you if I succeeded to solve the issue.

What is your version number?

mohamedgalalcs avatar Feb 01 '21 16:02 mohamedgalalcs

@mohamedgalalcs We have seen the issue with both versions 5.x and 0.9.x - however, with the readme fix you suggested, we have only tried with 0.9.x! Interesting (and a tad odd) if the combination fixes it!

gammelby avatar Feb 01 '21 16:02 gammelby

This issue is still exsist for now? πŸ€”

icungse avatar Jul 09 '23 00:07 icungse