Group Group Group Group Group Group Group Group Group

Cant publish framework to cocoapods


#1

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?


#2

@keeganrush Can you please help with this when you get a chance? Thank you - much appreciated! :]


#3

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!


#4

yes :slight_smile: I am moving towards publishing library :slight_smile: thanks for your tutorials and books :slight_smile:


#5

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


#6

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.


#7

It worked… however I need a public library, which could be easily accessed without providing podspecs github url. How should I make that?


#8

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


#9

@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


#10

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


#11

Yes I understood :slight_smile: 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…


#12

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.


#13

@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’)


#14

It looks like your project doesn’t have a file name LICENSE, or you’re pointing to the wrong location.


#16

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


#19

@keeganrush wow it is up and running :slight_smile: 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: https://github.com/CocoaPods/Specs/blob/master/Specs/c/9/3/Onfido/10.1.0/Onfido.podspec.json
“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


#20

@wellbranding Do you still have issues or have you managed to solve them in the meantime?