AI prompts
base on 基于cocoapods扩展依赖库编译插件,生成预编译静态库,提高编译速度的插件。支持编译使用静态库提高速度,调试直接使用源码,方便调试 # cocoapods-xlbuild
利用cocoapods,生成预编译静态库,提高编译速度的插件。支持编译使用静态库提高速度,调试直接使用源码,方便调试
## 背景
随着项目的不断迭代,项目代码及依赖三方库和内部库越来越多,导致项目编译时间越来越长,浪费大量开发时间。
cocoapods-xlbuild插件将三方库打包为静态库,从而提高项目编译时间
## 安装插件
````shell
$ gem install cocoapods-xlbuild
````
## 使用
修改 podfile 文件,加入以下代码
#### 1. 使用静态库编译(推荐):
````ruby
plugin 'cocoapods-xlbuild'
use_frameworks! :linkage => :static
use_static_binary!
````
使用动态库编译(动态库会拖累app使用时间,推荐使用静态库):
````ruby
plugin 'cocoapods-xlbuild'
use_frameworks!
use_dynamic_binary!
````
#### 2. 如果某个库不想使用预编译加参数 :binary => false
````ruby
pod 'AFNetworking', :binary => false
````
注意:
如果对某个库使用 `:binary => false` 则它的依赖库也不会预编译。
如果只想让当前库不参加预编译,依赖库参加预编译,可以将依赖库写在Podfile文件中
举个🌰:
YTKNetwork、AFNetworking 都不参加预编译
````ruby
pod 'YTKNetwork', :binary => false
````
YTKNetwork不参加预编译,AFNetworking参与预编译
````ruby
pod 'YTKNetwork', :binary => false
pod 'AFNetworking'
````
#### 3. 可以设置编译参数,默认不设置 例如:
````ruby
set_custom_xcodebuild_options_for_prebuilt_frameworks :simulator => "ARCHS=$(ARCHS_STANDARD)"
````
#### 4. 设置编译完成后移除源码,默认保存
````ruby
remove_source_code_for_prebuilt_frameworks!
````
#### 5. 设置Frameworks缓存仓库 install加速 例如:
````ruby
set_local_frameworks_cache_path '/Users/xxx/Desktop/CacheFrameworks'
````
## 源码调试
不要设置 `remove_source_code_for_prebuilt_frameworks!` 选项,保留源码
源码将会放入pod工程 `SourceCode` 文件夹下,可以直接进行源码调试功能
## 注意
目前是直接将静态库引入至Pods中,注意将Pods添加到gitignore中,否则将会提交至git仓库中
如果工程里面一开始配置的是打包成动态库,后面再改成静态库需要将Pod目录删掉再重新执行pod install,否则就会导致某个pod版本更新了却未重新构建
## 参考
https://github.com/leavez/cocoapods-binary
https://github.com/pdcodeunder/cocoapods-ppbuild
## License
MIT
如果喜欢,给个 星星⭐️ 鼓励一下
", Assign "at most 3 tags" to the expected json: {"id":"3379","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"