cocoapods.org
cocoapods.org copied to clipboard
Pod installable but not visible on cocoapods.org
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
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%
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!
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`.
This looks like this issue: https://github.com/CocoaPods/cocoapods-metadata-service/issues/1
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.
When I search PBPopupController, version 1.0.5 is shown but the version is 1.0.6:
https://cocoapods.org/pods/PBPopupController
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 Have you fixed this issue? If so, how did you manage to fix it?
@mohamedgalalcs No, the problem is still thereπ.
@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 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.
@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 unfortunately it didn't work with me also
@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 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!
This issue is still exsist for now? π€