Skip to content

Commit bc058c4

Browse files
committed
add cocoapods-plugins集合
1 parent 41aec6a commit bc058c4

File tree

2 files changed

+142
-1
lines changed

2 files changed

+142
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
|:----|:----|
5858
|iOS技能图谱/技术栈|[iOS技能图谱-byStuQ](./iOSNote/map-MobileDev-iOSDev.md) <br>[JSPatch作者博客中的技能栈-图](./images/iOS/iOSDev-bang.png)|
5959
|iOSDevNote|[**Dark Mode适配组件及Demo**](https://github.com/DevDragonLi/LFLDarkModeKit)<br>[**ProtocolService业务组件化Demo**](https://github.com/DevDragonLi/ProtocolServiceManger)<br>[**iOS开发架构分享文稿**](./iOSNote/iOS_architecture.pdf)<br>[**掘金客户端体积瘦身**](./iOSNote/iOSAppThin.md)<br>[**iOSDevCodeRepo**](https://github.com/DevDragonLi/iOSDevDemo)<br>[Core Animation框架结构及性能调优11张大图详解](https://github.com/DevDragonLi/Core-AnimationPerformanceOptimization)<br>[iOS_StaticLibrary](./iOSNote/iOS_StaticLibrary.md)<br>[iOS经典Crash分析与总结- QQ`MelonTeam`](https://github.com/DevDragonLi/iOSDevDemo)<br>[iOS核心动画高级技巧阅读笔记(**性能调优**,**高效绘制**,**图像IO**,**图层性能**)](./iOSNote/iOSCoreAnimationNote.md)<br>[单元测试概述](./iOSNote/UnitTesting.md)<br>[iOS_Article_List](./iOSNote/iOS_Collection_article_List.md)|
60-
|CocoaPods 相关 |[提交个人开源框架之流程](./iOSNote/CocoaPods/cocoapods-podspec.md)<br>[管理库的使用技巧](./iOSNote/CocoaPods/CocoaPodsManageTips.md)<br>[提交私有的框架之流程](./iOSNote/CocoaPods/Pod&&spec.md)<br>[私有库参考Demo](https://github.com/DevDragonLi/iOSDevDemo/tree/master/1-DevDemo/PodPrivate_demo)|
60+
|CocoaPods 相关 |<br>[**cocoapods-plugins集合**](./iOSNote/CocoaPods/cocoapods-plugins.md)<br>[提交开源框架之流程](./iOSNote/CocoaPods/cocoapods-podspec.md)<br>[管理库的使用技巧](./iOSNote/CocoaPods/CocoaPodsManageTips.md)<br>[提交私有的框架之流程](./iOSNote/CocoaPods/Pod&&spec.md)<br>[私有库参考Demo](https://github.com/DevDragonLi/iOSDevDemo/tree/master/1-DevDemo/PodPrivate_demo)|
6161
|开源框架|**[WiFi显示图片高清图;蜂窝显示图片缩略图解析](./iOSNote/Analyze/SDWebImage/网络网络状态不同加载图片.md)**<br>**[MJRefresh源码解析](./iOSNote/Analyze/MJRefresh/MJRefresh.md)**|
6262

6363
## 欢迎提交 PR / issue
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
## cocoapods plugins
2+
3+
4+
> sudo gem update --system
5+
6+
> podfile : plugin 'plugin name'
7+
8+
> install:`$ sudo gem plugin name`
9+
10+
- binary
11+
- dependencies
12+
- cocoapods-user-defined-build-types
13+
- cocoapods-static-swift-framework
14+
15+
### [cocoapods-binary ](https://github.com/leavez/cocoapods-binary/)
16+
17+
- remote pod transfer to framework
18+
19+
- sudo gem install cocoapods-binary
20+
21+
### [cocoapods-pod-merge](https://github.com/grab/cocoapods-pod-merge)
22+
23+
- group 业务拆分组合划分层
24+
25+
<details>
26+
<summary> 点击展开 </summary>
27+
28+
> pod install 源码OK,二进制需要对应remote自身再桥接。
29+
30+
- sudo gem install cocoapods-dependencies
31+
32+
- This plugin requires a file called `MergeFile`. This is how it looks:
33+
- touch Gemfile
34+
- gem 'cocoapods-pod-merge'
35+
- bundle install
36+
- bundle exec pod install
37+
38+
```
39+
40+
group 'Networking'
41+
pod 'AFNetworking'
42+
pod 'SDWebImage'
43+
end
44+
45+
plugin 'cocoapods-pod-merge'
46+
47+
target 'MyApp'
48+
pod 'Networking', :path => 'MergedPods/Networking'
49+
pod 'UI', :path => 'MergedPods/UI'
50+
end
51+
52+
```
53+
</details>
54+
55+
56+
### [pod-dependencies](https://github.com/segiddins/cocoapods-dependencies)
57+
58+
> dependencies
59+
60+
- sudo gem install cocoapods-dependencies
61+
62+
63+
### [cocoapods-static-swift-framework](https://github.com/leavez/cocoapods-static-swift-framework)
64+
65+
- sudo gem install cocoapods-static-swift-framework
66+
67+
### [cocoapods-packager](https://github.com/CocoaPods/cocoapods-packager)
68+
69+
> 只适用于远端库(本质从远端clone再处理)
70+
71+
- sudo gem install cocoapods-packager
72+
73+
- your Gemfile:gem "cocoapods-packager" && bundle install
74+
75+
- pod package name.podspec
76+
77+
```
78+
如果需要排除源码中依赖的第三方库,可以在打包命令中添加 --exclude-deps 选项。
79+
//静态framework
80+
pod package name.podspec --force --no-mangle --embedded
81+
//静态.a
82+
pod package name.podspec --library --force
83+
// .a 调整
84+
s.vendored_libraries = "Path/to/xxx.a"
85+
s.source_files = "xxx/**/*.h"
86+
87+
/强制覆盖之前已经生成过的二进制库
88+
--force
89+
90+
//生成静态.framework
91+
--embedded
92+
93+
//生成静态.a
94+
--library
95+
96+
//生成动态.framework
97+
--dynamic
98+
99+
//动态.framework是需要签名的,所以只有生成动态库的时候需要这个BundleId
100+
--bundle-identifier
101+
102+
//不包含依赖的符号表,生成动态库的时候不能包含这个命令,动态库一定需要包含依赖的符号表。
103+
--exclude-deps
104+
105+
//表示生成的库是debug还是release,默认是release。--configuration=Debug
106+
--configuration
107+
108+
--no-mangle
109+
//表示不使用name mangling技术,pod package默认是使用这个技术的。我们能在用pod package生成二进制库的时候会看到终端有输出Mangling symbols和Building mangled framework。表示使用了这个技术。
110+
//如果你的pod库没有其他依赖的话,那么不使用这个命令也不会报错。但是如果有其他依赖,不使用--no-mangle这个命令的话,那么你在工程里使用生成的二进制库的时候就会报错:Undefined symbols for architecture x86_64。
111+
112+
--subspecs
113+
114+
//如果你的pod库有subspec,那么加上这个命名表示只给某个或几个subspec生成二进制库,--subspecs=subspec1,subspec2。生成的库的名字就是你podspec的名字,如果你想生成的库的名字跟subspec的名字一样,那么就需要修改podspec的名字。
115+
这个脚本就是批量生成subspec的二进制库,每一个subspec的库名就是podspecName+subspecName。
116+
117+
--spec-sources
118+
119+
//一些依赖的source,如果你有依赖是来自于私有库的,那就需要加上那个私有库的source,默认是cocoapods的Specs仓库。--spec-sources=private,https://github.com/CocoaPods/Specs.git。
120+
121+
```
122+
123+
### [cocoapods-user-defined-build-types](https://github.com/joncardasis/cocoapods-user-defined-build-types)
124+
125+
- sudo gem install cocoapods-user-defined-build-types
126+
127+
```
128+
plugin 'cocoapods-user-defined-build-types'
129+
130+
enable_user_defined_build_types!
131+
132+
target "CoffeeApp" do
133+
pod 'Alamofire'
134+
pod "SwiftyJSON", :build_type => :dynamic_framework
135+
136+
dynamic_library
137+
dynamic_framework
138+
static_library
139+
static_framework
140+
141+
```

0 commit comments

Comments
 (0)