How to create a pod with cocoapods for local library
Just pass the local path to s.source
, like s.source = { :git => "/Users/user/Dropbox/Library/UIView+Helper", :tag => "1.0.0" }
The dependencies must use version control like "git".
Podfile: Path of local pod relative to Projectpath possible?
Yes there is a way to do that, I have a project that use cocoapods and have custom pods in it, in the folder where you have your PodFile put your libraries folder and then modify your podFile to
pod 'ObjCPod', :path => 'libraries/LocalPod/'
Should work,
Hope this helps
Using local copy of a framework in podfile if exists
Since a Podfile is actually Ruby code, let's check if the file exists:
if File.exist?("complete-path-to-a-library-file")
pod 'MyLibraryName', :path => "my-local-library-path"
else
pod 'MyLibraryName', git: 'https://github.com/mygithuburl', tag: '0.0.1'
end
CocoaPods use locally modified Pods
Oh. It was right in the documentation here.
pod 'YourCustomPod', :path => 'relative/path/...'
Cocoa Pods: Local Pod install issue
By the Cocoapods Documentation, it seems that .zip files are only unarchivable via http resources:
Using HTTP to download a compressed file of the code. It supports zip, tgz, bz2, txz and tar.
So this would work:
s.source = { :http => 'https://example.com/MI_SDK_DEVELOPMENT.framework.zip' }
This would not:
s.source = { :path => './LocalPods/MI_SDK_DEVELOPMENT.framework.zip' }
How to use CocoaPods with multiple Framework subprojects
I think you can also get around this by just making FrameworkA
and FrameworkB
into local (static library) pods and it will de-duplicate everything for you and integrate it into the host app properly.
Examples: https://github.com/rob-keepsafe/PodFrameworksIssue
master
branch shows duplicate classes and umbrella frameworks like you havededuped
branch makes the internal dynamic frameworks into local pods (as static libs) to de-dupe and still link in the dependencies
How does CocoaPods work
CocoaPods does a whole lot behind the scenes to make everything you're talking about work. On a relatively high level the actual 'Pods' are managed in a repo that lives on Github here. This is where 3rd party library vendors submit their 'Pods' to work with CocoaPods. You'll notice that if you search for a Pod using the command line tool with pod search AFNetworking
you will see all the available Pods matching your search term.
As far as Github vs other sites goes even though the repository full of CocoaPods specifications lives on Github, CocoaPods itself uses just plain old Git to pull down the source from the given repository. Because of this you could make specs from any git repo hosted on any site. We also support svn, mercurial and just plain old http(s). If you're interested in how the specs work overall you can look at some in the specs repo you can open them from ~/.cocoapods/repos/master
on your local machine or edit one directly with pod spec edit AFNetworking
from the command line.
Related Topics
How to Set Cornerradius for Only Bottom-Left,Bottom-Right and Top-Left Corner of a Uiview
How to Check If a Static Library Is Built for 64-Bit
How to Use Local-Only Project via Cocoapods
iOS Name of This Way of Building and Returning an Object in Objective-C
How to Use Uicolorfromrgb in Swift
Timestamp Function That Has Been Working Reliably Just Caused Exc_Bad_Instruction
Jerky Scrolling After Updating Uitableviewcell in Place with Uitableviewautomaticdimension
Strange Constraints Behaviour on iPad
Avplayer Shows Black Screen When Playing Multiple Videos in Swift3 iOS
Xcode 10B5 - Duplicate Symbol Linker Error, Can't Compile with Crashlytics
Issue with Uitableview: Action Only Works Every Second Time
Xcode: Could Not Locate Device Support Files
Distanceinmeters Problems with Arrays and Sort
Overlay an Image Over Another Image in iOS
Switching Between Text Fields on Pressing Return Key in Swift