Cocoapods: Podspec - source as required section in file

Created on 25 Jan 2016  路  12Comments  路  Source: CocoaPods/CocoaPods

I cannot find when section source in cocoapods became required. I'm using https://github.com/grpc/grpc/blob/master/src/objective-c/examples/RemoteTestClient/RemoteTest.podspec, and it works well with 0.39. On 1.0.0.beta.2:

Updating local specs repositories
Analyzing dependencies
Fetching podspec for `BoringSSL` from `../..`
Fetching podspec for `Protobuf` from `../../../../third_party/protobuf`
[!] The `Protobuf` pod failed to validate due to 1 error:
    - ERROR | attributes: Missing required attribute `source`.

Is there any workaround or method to work with local src?

Most helpful comment

It will ignore the source directive when using it locally like you are

All 12 comments

Just put a bogus source in there if you never intend to push it to a spec repo.

That will work, but what about support local files? I haven't found when was the change of podspec file format.

It will ignore the source directive when using it locally like you are

Cocoapods documentation is misleading then because It describes 1.0.0.beta.2, not stable version (0.39).

Where?

https://guides.cocoapods.org/syntax/podspec.html#group_root_specification
There are no information about the version - on some works on some not.

Yeah the guides references are on 1.0.0 betas, the guides doesn't support versioning I'm afraid.

Are there any plans to support source from dir?

I'm not really sure what you mean there?

However :source should never be a path, it's the canonical source representation as an external resource. The Podfile by using :path determines that it should be used locally and overrides the :source directive on the Podspec.

As you said about override :path
https://github.com/grpc/grpc/blob/master/src/objective-c/examples/Sample/Podfile
Using with this podfile it does not work as you suggest - :source is still required

What @orta said is 100% spot on.

you need to add a source property to this podspec: "Fetching podspec for Protobuf from ../../../../third_party/protobuf."

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pronebird picture pronebird  路  3Comments

5SMNOONMS5 picture 5SMNOONMS5  路  3Comments

pallaviMN picture pallaviMN  路  3Comments

gerchicov-bp picture gerchicov-bp  路  3Comments

intelliot picture intelliot  路  3Comments