Let your own static framework support the use of Cocoapods to add
git clone https://xxx
s.vendored_frameworksofThe folder where the static library is located, this folder name is also the folder name where the static library is located after pods are localized;s.resource_bundleofFolder where Bundle is located git add .
git commit -m 'sdk&bundle&spec add'
git push
// Add a tag, which is also the version available in the Podfile when pod install
// tag is the same as s.version in the spec file
git tag '0.0.1'
git push --tags
spec Documentarys.version, update the tag at the same time, and then push to the remote repository~/.cocoapods/repos/master/Specs In the middle, a folder will be created for the static library, and each tag in the folder will correspond to a folder, there is only one folder.Static library name .podspec.json filepod spec lint --allow-warnings
pod trunk register [email protected] 'xxx' --description='xxx' --verbose
// View registration information
pod trunk me
pod trunk push xxx.podspec --allow-warnings
pod search 'xxx' View the uploaded static library;~/Library/Caches/CocoaPods, deletesearch_index.jsonRetryNo other problems here, static libraries can be imported using pods
use_frameworks!
platform :ios, '8.0'
# Use 'version number' to specify the version of the SDK
# Use '~> version number' to specify a later version including this version
target 'project name' do
Pod 'just uploaded SDK name', '~> 0.0.1'
end
Pod::Spec.new do |s|
S.name = "static library name"
s.version = "0.0.1"
# , otherwise local verification error
s.summary = "xxx"
# can not write
s.description = "xxx"
s.homepage = "https://xxx.com/"
s.license = { :type => "MIT" }
s.author = { "ChingHan" => "[email protected]" }
s.source = { :git => "https://gitee.com/chinghan/xxx.git", :tag => s.version }
s.platform = :ios, '8.0'
s.requires_arc = true
#Dependent system library
s.frameworks = [
'AVFoundation',
'Accelerate',
'Security',
'SystemConfiguration',
'CoreMedia',
'AudioToolbox',
'CoreTelephony',
'ImageIO',
'MobileCoreServices'
]
s.libraries = 'c++', 'z'
#All Pod contains all static library files
s.vendored_frameworks = [
'folder name/xxx.framework',
'folder name/frameworks/*'
]
# resource
# Officially recommended to use s.resource_bundle; two ways to read the resources in the bundle is different
s.resources = [
'folder name/xxx.bundle',
'folder name/resources/*'
]
#Dependent Tripartite SDK
s.dependency 'AFNetworking', '~> 3.0.0'
# s.vendored_frameworks = [
# ' folder name / xxx.framework',
# 'Folder name/frameworks/xxx.framework',
# 'Folder name/frameworks/xxx.framework',
# 'Folder name/frameworks/xxx.framework',
# ]
# s.resources = [
# ' folder name / xxx.bundle',
# 'folder name/resources/xxx.bundle',
# 'folder name/resources/xxx.bundle',
# ]
end
specDetailed documentation:https://guides.cocoapods.org/syntax/podspec.html
CocoaPods private library creation Reference link Why use private libraries and private library indexes For individuals, code accumulation is possible. We are creating new projects, many of the basic ...
1. First, simply understand the mechanism of cocoapods cocoapods has a remote index library. The description information of the frame is placed under the index library: the name of the frame, the vers...
Build a CocoaPods private library based on git 1. Create and set up a private Spec Repo. 2. Create the project project files required by the Pod, and have an accessible project version control address...
First, establish a dependent library Dependency library is a library that stores third-party code, and cocoapods is essentially a convenient tool for third-party library maintenance and import. Depend...
2019 Unicorn Enterprise Heavy Recruitment Python Engineer Standard >>> #### Why use Cocoapods to manage third-party libraries? Traditional use of third party banks Using a third-party SDK, yo...
Recap The company's project has been using CocoaPods to manage third-party packages, and it also wants to pull out the common modules in the project out of separate packages. So I studied it. Ready to...
cocoapodsBelieve in everyoneiOSDevelopers have been exposed and used. In our project, we are usingcocoapodsTo manage public libraries such as some common components, tools, and so on. I also practiced...
ready Create a private library on github or other third-party server: eg heiyuTEST Start Clone to local Add the necessary README.md, LICENSE, .podspecs files and the code and resource files you want t...
First, create a private pods Create a private Spec Repo (that is, a repository of all private pods) spec repo YespodsAn index of all publicpods ofpodspecA repository of files is actually a Git reposit...
Foreword CocoapodsIt is a dependency management tool that can be used to easily manage and update third-party libraries used in projects. It can also manage its own private libraries to make the proje...