Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pod installable but not visible on cocoapods.org #390

Open
gammelby opened this issue Nov 26, 2018 · 16 comments
Open

Pod installable but not visible on cocoapods.org #390

gammelby opened this issue Nov 26, 2018 · 16 comments

Comments

@gammelby
Copy link

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

@dnkoutso
Copy link

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%

@gammelby
Copy link
Author

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
Copy link
Author

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`.

@orta
Copy link
Member

orta commented Nov 26, 2018

This looks like this issue:
CocoaPods/cocoapods-metadata-service#1

@crspybits
Copy link

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.

@iDevelopper
Copy link

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

https://cocoapods.org/pods/PBPopupController

@gammelby
Copy link
Author

gammelby commented Jan 10, 2021

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

@mohamedgalalcs
Copy link

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

@gammelby
Copy link
Author

@mohamedgalalcs No, the problem is still there🙁.

@mohamedgalalcs
Copy link

@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.

@gammelby
Copy link
Author

@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
Copy link
Author

gammelby commented Feb 1, 2021

@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.

@mohamedgalalcs
Copy link

@gammelby unfortunately it didn't work with me also

@mohamedgalalcs
Copy link

mohamedgalalcs commented Feb 1, 2021

@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?

@gammelby
Copy link
Author

gammelby commented Feb 1, 2021

@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!

@icungse
Copy link

icungse commented Jul 9, 2023

This issue is still exsist for now? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants