Hello, thanks for this tutorial https://www.raywenderlich.com/5823-how-to-create-a-cocoapod-in-swift however after downloading sample project I can’t find podspecs in xcode project… I don’t know the contents of that file I would like to preview it in xcode. How can I achieve something like that?
@keeganrush Can you please help with this when you get a chance? Thank you - much appreciated! :]
Hi @wellbranding, I’m glad you enjoyed it.
In the Setting Up Podspec section of the post, there is an instruction to open the Podspec in Xode: open -a Xcode RWPickFlavor.podspec
Alternatively, as an example, you could just add your Podspec to the Xcode project by using File -> Add Files to..
menu item in Xcode, so that the file is always available in your Project navigator.
I hope this helps!
yes I am moving towards publishing library
thanks for your tutorials and books
@keeganrush @shogunkaramazov now I have a question: Why I need to add Podspec to a private specs repo? I would like to keep podspec in bitbucket, is that fine?
Hi @wellbranding,
Sure, as mentioned in the Using CocoaPods and Git section, you can keep your specs repo in Bitbucket, GitHub, or any other Git host of your choice :] the tutorial uses GitHub, but any host will be fine.
It worked… however I need a public library, which could be easily accessed without providing podspecs github url. How should I make that?
@keeganrush
So If I want to create public library without providing source of github I should run
pod trunk push NAME.podspec instead of pod repo push [repo] NAME.podspec , correct?
@shogunkaramazov
how to commit specific class instead of all classes ? s.source_files = “RWPickFlavor/**/*.{swift}” I tried to specify partocular Class like RWPickFlavor/Models/Flavor.swift but I get an error no files there found
@wellbranding, if you want to push it to the public Specs repo, then pod trunk push
would be the right command. Take a look at the CocoaPods Guide, it has all the answers you need. Good luck!
Yes I understood Now the last thing remains: how can I publish my library to cocoaPods without pushing source code and all files of library into github… I saw some companies did that, so it should be possible…
Put your code in a private (not public) repository on the Git host of your choice. Publish your spec with pod trunk push
. The Cocoapods Guide will have more information if you should need it.
@keeganrush yes it worked… no I am pushing my specs of a real project and I always get this error:
[!] The Test.podspec
specification does not validate.
[!] Unable to read the license file LICENSE
for the spec TestSDK (0.1.3)
[!] Unable to read the license file LICENSE
for the spec TestSDK (0.1.3)
i also get lots of warnings, and this one is bugging me:
TestSDK (0.1.3)
- WARN | [iOS] license: Unable to find a license file
- NOTE | xcodebuild: note: Using new build system
- NOTE | [iOS] xcodebuild: note: Planning build
- NOTE | [iOS] xcodebuild: note: Constructing build description
- NOTE | [iOS] xcodebuild: warning: Skipping code signing because the target does not have an Info.plist file. (in target ‘App’)
It looks like your project doesn’t have a file name LICENSE
, or you’re pointing to the wrong location.
I have solved it!!! I writted licence inline, directly into podspecs… I don’t get a warning, but still I get an error specifications does not validate… does the warnings in code cause this issue? I don’t get any other errors, just warnings
@keeganrush wow it is up and running Really thank you! Now I want to make source private and not dispose bitbucket link in my podspec… How to do that? The behavior I want to achieve is the following: Specs/Onfido.podspec.json at master · CocoaPods/Specs · GitHub
“source”: {
“http”: “https://s3-eu-west-1.amazonaws.com/onfido-sdks/ios/Onfido-Debug-v10.1.0.zip”
},
it is private git path and not disclosed
@wellbranding Do you still have issues or have you managed to solve them in the meantime?
This topic was automatically closed after 166 days. New replies are no longer allowed.