triplecc / cocoapods-bin Goto Github PK
View Code? Open in Web Editor NEWCocoaPods 组件二进制化辅助插件(双私有源)
License: MIT License
CocoaPods 组件二进制化辅助插件(双私有源)
License: MIT License
测了好几次,use_binaries_with_spec_selector里面只有最后一个有效;
能支持cocoapods-generate-2.0.0 吗
NoMethodError - undefined method `each' for nil:NilClass
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:720:in `block (2 levels) in dependencies_for_specs'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:719:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:719:in `block in dependencies_for_specs'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/set.rb:338:in `each_key'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/set.rb:338:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:718:in `dependencies_for_specs'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:663:in `block in compute_pod_target_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:662:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:662:in `compute_pod_target_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:630:in `generate_pod_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:430:in `generate_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:127:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:234:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:233:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
如果把你这边的这段话,改下的话
用 :podspec 这样的引用方式就能正常切换二进制了。
你这句话是处理 developments 用的吗? developments组件的判断可以换个过滤条件吗?
# developments 组件采用默认输入的 spec (development pods 的 source 为 nil)
unless rspec.spec.respond_to?(:spec_source) && rspec.spec.spec_source
next rspec
end
def compile
defines = "GCC_PREPROCESSOR_DEFINITIONS='$(inherited)'"
defines << ' ' << @spec.consumer(@platform).compiler_flags.join(' ')
options = ios_build_options
xcodebuild(defines, options)
defines
end
defines << ' ' << @spec.consumer(@platform).compiler_flags.join(' ')这一行一直提示Frozen object is modify。我的ruby环境是2.6.3.
我有个关于 podspec 解析动态更换 source 的问题,联系方式已经发送到:[email protected],这个邮箱了,有时间辛苦加下我,感谢。
use_binaries!
use_binaries_with_spec_selector! do |spec|
exclude = ['UITableView+FDTemplateLayoutCell','MLeaksFinder']
(exclude.include?(spec.name) == false) && (spec.name.include?('QTS') == false)
end
我想去掉部分三方库和全部的二方库。
我打印了返回值是false,还是引入了包含QTS的二进制组件,请问这是什么原因?
Generating XXXX in bin-archive/XXXX
Open bin-archive/XXXX/XXXX.xcworkspace
to work on XXXX
Building static framework XXXX (0.1.29)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: no files specified
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
作者你好,自己最近一直在研究项目组件二进制化,其中在研究cocoapods plugins插件开发时,找了好多资料没有发现怎么去配置插件开发debug环境,便于开发调试,目前我用的是vscode,可以开发,就是每次调试的时候都是gem build,然后看日志,不知道作者有没有什么好方式可以debug
您好,非常感谢您的分享,真是受益匪浅!!!
请问一个,如果通过podspec引用的方式
pod 'SDWebImage', :podspec => 'https:///Github-iOS/SDWebImage/raw/dev/SDWebImage.podspec'
二进制私有源就没办法找到了,请问在使用podspec的方式下,有什么办法能切换到二进制源码
A、B两个Pod,A以二进制的方式引入项目,B以源码的方式引入,B依赖A,引用A中文件#import <A/A.h>时会报这个错,找不到A的定义。查了很久,感觉应该是路径问题,在search path里面也都加了路径,一直是这个报错,之前有遇到过吗?
Undefined symbols for architecture x86_64:
"OBJC_CLASS$_A_class1", referenced from:
objc-class-ref in B_class.o
"OBJC_CLASS$_A_class2", referenced from:
objc-class-ref in B_class.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
工程中有几个Pod设置成源码依赖,其他Pod走二进制
use_binaries!
set_use_source_pods ['PFLUtils']
有一个Pod名字叫PFLAppframwork,使用二进制,它依赖PFLUtils这个库。PFLUtils用的是源码
pod install之后,编译报错
include of non-modular header inside framework module 'PFLAppframework.XCListModel': 'Pods/Headers/Private/PFLUtils/PUtils.h'
工程中设置Allow Non-modular Includes In Framework Modules 为 YES无效
报错信息:
file patterns: The source_files
pattern did not match any file
目录下面所有的"Headers"文件夹下面的文件都为空,应该是在拷贝source_file的时候没有找到对应的文件,跟我的工程配置有关。
有很多东西想跟大佬请教下,可以加个微信么:18868825142
我现在一个库里面有2subspec
然后分辨打出两个framework
然而B的内容是包含A的,导致的问题是
如果podspec中依赖的pod属于私有spec源,那么在pod bin archive时会报错:
Unable to find a specification for XXXX
depended upon by YYY
包括pod bin spec lint
和pod bin repo push
等都有这个问题。
能否像cocoapods-packager那样提供 --spec-sources
选项来指定私有源?
如果有subspec
的组件在生成二进制的时候模板改怎么写呢?就拿readme
中的例子,A.binary-template.podspec
应该长啥样子?尝试几次都没有打包成功...
我想把项目中所有依赖github
上的三方组件都打成二进制,比如AFNetworking
、SDWebImage
、RxSwift
这些,理论上最好是放在自己的私有源上对吧,你们团队现在的做法也是这样吗?
pod bin archive打包第三方库WCDB失败,但使用cocoapods-package打包可以成功
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: no files specified
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
- ERROR | [iOS] unknown: Encountered an unknown error ([!] /usr/bin/unzip /var/folders/w5/b4bk0rpx4dx_stj7dw01461c0000gn/T/d20200305-99987-1ym6st5/file.zip -d /var/folders/w5/b4bk0rpx4dx_stj7dw01461c0000gn/T/d20200305-99987-1ym6st5
Archive: /var/folders/w5/b4bk0rpx4dx_stj7dw01461c0000gn/T/d20200305-99987-1ym6st5/file.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /var/folders/w5/b4bk0rpx4dx_stj7dw01461c0000gn/T/d20200305-99987-1ym6st5/file.zip or
/var/folders/w5/b4bk0rpx4dx_stj7dw01461c0000gn/T/d20200305-99987-1ym6st5/file.zip.zip, and cannot find /var/folders/w5/b4bk0rpx4dx_stj7dw01461c0000gn/T/d20200305-99987-1ym6st5/file.zip.ZIP, period.
) during validation.
[!] The flowTestPod.binary.podspec.json
specification does not validate.
本机没啥问题,另一个机子就报错了,这是什么原因;
报错信息如下:(A B C D是组件)
Pod::StandardError - Unable to find the specification A (0.2.5) in the 1-albinaryspecs source
[!] Unable to find a pod with name, author, summary, or description matching `A'
[!] Skipping A
because the podspec contains errors.
[!] Skipping B
because the podspec contains errors.
[!] Skipping C
because the podspec contains errors.
[!] Skipping D
because the podspec contains errors.
您好我想问一下 archive命令是 打包和上传二进制包到服务器
但是我并没有在archive.rb里看到 上传到服务器的代码
可以指点一下吗
CocoaPods : 1.7.5
Ruby : ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]
RubyGems : 2.7.6
Host : Mac OS X 10.14.6 (18G1012)
Xcode : 11.2 (11B52)
Git : git version 2.12.2
Ruby lib dir : /usr/local/Cellar/ruby/2.5.0_2/lib
Repositories : 2dfire-cocoapods-spec - [email protected]:ios/cocoapods-spec.git @ 981d9c305fcbfe1e5248a0fe8d5d5c12a1fe4284
2dfire-cocoapods-spec-binary - [email protected]:ios/cocoapods-spec-binary.git @ 19c01cc74aa92d8760328ce982dc08ac7049d460
2dfire-inc-cocoapods-spec - [email protected]:ios/cocoapods-spec.git @ a6f317408a778b5ef0e2dce8c92dd01750cec0f0
2dfire-ios-cocoapods-spec - http://git.2dfire.net/ios/cocoapods-spec.git @ a1985e3cfd803b597fd4bd61334b05f7de47a2cc
master - https://github.com/CocoaPods/Specs.git @ d1b443a612ec0223bea47e806f64b576d95a0f3d
cocoapods-bin : 0.1.24
cocoapods-deintegrate : 1.0.4
cocoapods-disable-podfile-validations : 0.1.1
cocoapods-generate : 1.6.0
cocoapods-open : 0.0.8
cocoapods-packager-pro : 1.5.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.1.0
cocoapods-tdfire-binary : 2.0.8
cocoapods-trunk : 1.4.1
cocoapods-try : 1.1.0
NoMethodError - undefined method `available_platforms' for nil:NilClass
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.7.5/lib/cocoapods/resolver.rb:414:in `validate_platform'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.7.5/lib/cocoapods/resolver.rb:552:in `add_valid_dependencies_from_node'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.7.5/lib/cocoapods/resolver.rb:555:in `block in add_valid_dependencies_from_node'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.7.5/lib/cocoapods/resolver.rb:553:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.7.5/lib/cocoapods/resolver.rb:553:in
您好:
请问 如果部分pod需要引入二进制的话,podfile里该如何写?
假设有两个pod,分别为A和B,A没有subspec,B有subspec
这时候拉取就会出问题了。
use_binaries_with_spec_selector! do |spec|
spec.name == 'A'
这样是想A拉取二进制,B拉取源码。
但这种情况下,B无法拉取代码,源码没有,二进制也没有,是空的。
反过来可以
use_binaries_with_spec_selector! do |spec|
spec.name == 'B'
这样是没有问题的。
或者A和B都拉取源码 或者都拉取二进制,也是没有问题的
但是A拉二进制,B拉源码,就会出问题
use_binaries!
set_use_source_pods ['YYModel']
yymodel依旧是二进制版本。。而且感觉对应的几个use_binaries_with_spec_selector都无法生效
我现在按照文档进行一步一步的设置,pod install也成功了,pod bin list也能看到二进制的podspec。但是在install的工程中二进制组件只有目录,目录中没有最终的Framework的代码。这个可能是什么问题呢?
您好,我想在您写的基础上 加一些功能上去。
现在使用的vscode可以正常调试,但是vscode调试并不是很理想。
所以我想用rubymine进行调试,但是不知道该怎么配置。
请问您是用什么ide做的开发调试工作?
localhost% pod bin archive XXXNetwork.podspec
[!] Unable to find a specification for AFNetworking (= 3.2.1)
depended upon by ZPMNetwork
You have either:
pod repo update
or with pod install --repo-update
.XXXNetWork里面有两个依赖库,来自两个不同私有源,如何设置才能打zip包成功
podspec有依赖其他组件 pod bin spec lint 不成功啊
pod bin spec lint --sources= 也不成功
这是什么情况
podspec 这样引用本地的
s.vendored_frameworks = 'Libraries/**/*.framework'
def ios_architectures
archs = %w[x86_64 arm64 armv7 armv7s i386]
@vendored_libraries.each do |library|
archs = `lipo -info #{library}`.split & archs
end
archs
end
#{library} 的路径只到了 xxx.framework 这层,正常应该是包含xxx.framework/xxx 吗?
会导致pod bin archive 报错
执行pod install报错,use_binaries_with_spec_selector!
NameError - undefined local variable or method `installation_options' for #Pod::Resolver:0x00007fd52ac64718
1、
问题:按照Usage直接在后面加上生成的podspec,$ pod bin archive [NAME.podspec],执行失败,
原因:源码initialize(argv)方法中没有加上@podspec = argv.shift_argument
2、
问题:archive命令加上--podfile-path=PATH 指定A.binary.podspec.json后报错
原因:gen命令貌似不支持.podspec.json的格式
请问下pod bin 怎么 archive 带subspec的podspec
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.