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

generated podspec failing validation #591

Open
pellet opened this issue Jan 22, 2016 · 5 comments
Open

generated podspec failing validation #591

pellet opened this issue Jan 22, 2016 · 5 comments

Comments

@pellet
Copy link

pellet commented Jan 22, 2016

The generated pod will not install into xcode via pod install on version .38 with the gradle .6-alpha version.
I am forced to integrate the java files myself.
a run of the command pod spec lint --verbose gives
-> Installing j2objc-shared-debug (1.0)
-> j2objc-shared-debug (1.0)
- ERROR | Missing required attribute authors.
- WARN | Missing required attribute license.
- ERROR | Missing required attribute homepage.
- ERROR | Missing required attribute source.
- WARN | Missing license type.
- ERROR | [iOS] Encountered an unknown error (Requires params) during validation.

Analyzed 1 podspec.

@brunobowden
Copy link
Contributor

Hi @pellet, I tried the lint test on my local build and it showed the same error that you saw (copied below). At the same time, I was able to successfully install it with v0.39.0. I'd suggest first trying the upgrade to v0.39.0 and seeing if that makes any difference.

The podspec files have been stable for quite a long time. Many people have used it without reporting any issues, so I'm curious why it's different for you. Are you manually running the pod install and not through the plugin? Certainly it would be nice to fix validation but really what's more important is if prevent the j2objcXcode task from doing the pod install command.

If you're game to improve this, then it would be relatively simple to modify the generated podspec in the PodspecTask.groovy file:

https://github.com/j2objc-contrib/j2objc-gradle/blob/master/src/main/groovy/com/github/j2objccontrib/j2objcgradle/tasks/PodspecTask.groovy

For publicly shared pods, I think it's fair to demand those attributes. For a local project, it's a bit of a nuisance to require setting all that up just for a local build. It would be better to make it easy to use for the initial version.

Lint Failure:

...
-> Installing j2objc-base-debug (1.0)
 -> j2objc-base-debug (1.0)
    - ERROR | attributes: Missing required attribute `authors`.
    - WARN  | attributes: Missing required attribute `license`.
    - ERROR | attributes: Missing required attribute `homepage`.
    - ERROR | attributes: Missing required attribute `source`.
    - WARN  | license: Missing license type.
    - ERROR | [iOS] unknown: Encountered an unknown error (Requires params) during validation.

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 4 errors and 2 warnings.

/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command/spec/lint.rb:77:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command.rb:47:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/bin/pod:44:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

Working pod install for my local build using Cocoapods v0.39.0 and plugin 0.6.0-alpha

$ (cd ios && pod install)
Updating local specs repositories

CocoaPods 1.0.0.beta.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Analyzing dependencies
Fetching podspec for `j2objc-base-debug` from `../base/build/j2objcOutputs`
Fetching podspec for `j2objc-base-release` from `../base/build/j2objcOutputs`
Downloading dependencies
Using j2objc-base-debug (1.0)
Using j2objc-base-release (1.0)
Generating Pods project
Integrating client project
Sending stats
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.

@pellet
Copy link
Author

pellet commented Jan 28, 2016

I upgraded to .39 but still the same problem.
The plugin does not run pod install automatically, so I need to run it myself, and when I do I get the same result as on .38.2.
It looks as if it installs the j2objc pods fine, but in reality it only installs the other 2 pods into the workspace and not the j2objc pods.
When I open the workspace the j2objc pods are missing.
Below is the output of my manual 'pod install'.

pod install
Updating local specs repositories

CocoaPods 1.0.0.beta.2 is available.
To update use: sudo gem install cocoapods --pre
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Analyzing dependencies
Fetching podspec for j2objc-shared-debug from ../../../android-apps/OLAndroidDevApp/shared/build/j2objcOutputs
Fetching podspec for j2objc-shared-release from ../../../android-apps/OLAndroidDevApp/shared/build/j2objcOutputs
Downloading dependencies
Installing FMDB (2.6)
Installing OCMock (3.1.5)
Installing j2objc-shared-debug (1.0)
Installing j2objc-shared-release (1.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 4 dependencies from the Podfile and 4 total pods installed.

@arteme
Copy link

arteme commented Mar 18, 2016

I am having the same issue as @pellet using cocoapods version 0.39.0. It looks as if it installs the j2objc pods fine, but in reality it only installs the other pods. No lockfiles have any mentions of my j2objc-created pods.

@eiennohito
Copy link

Version 0.39 for me works, however 1.0 that was installed by default do not.
After downgrading everything started to work.

@charlieCollins
Copy link

I had the same problem with 0.6.1-alpha and Cocoapods 1.0.1. Downgrade of Cocoapods resolved it. I will try updating PodSpecTask.groovy, and if I can get that to fly submit PR back.

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

5 participants