gpt4 book ai didi

ios - Podspec 链接二进制库

转载 作者:技术小花猫 更新时间:2023-10-29 10:36:01 26 4
gpt4 key购买 nike

我正在尝试为以下项目创建 Podspec:https://github.com/sincerely/shiplib-ios-framework

Pod Lint 通过并正在将文件添加到项目中,但它不会链接二进制“Sincerely”文件。由于导入时缺少文件,示例项目构建失败:<Sincerely/filename.h>

 Pod::Spec.new do |s|
s.name = 'ShipLib'
s.version = '1.4'
...
s.source = {
:git => 'https://github.com/sincerely/shiplib-ios-framework.git',
:tag => 's.version.to_s'
}
s.library = 'Sincerely'
s.source_files = 'Sincerely.framework','Sincerely.framework/Headers/*.h'
s.resources = 'Sincerely.framework/Resources/*.{png,nib}'
s.frameworks = 'AddressBook', 'AddressBookUI', 'SystemConfiguration', 'CoreTelephony'
s.xcconfig = { 'LIBRARY_SEARCH_PATHS' => '$(PODS_ROOT)/ShipLib/' }
end

编辑:

Pod::Spec.new do |s|
s.name = 'ShipLib'
s.version = '1.4'
s.platform = :ios
s.summary = 'Allow users to send printed photos from your app.'
s.author = { 'Sincerely' => 'dev@sincerely.com' }
s.homepage = 'https://github.com/sincerely/shiplib-ios-framework'
s.license = { :file => 'LICENSE', :type => 'Commercial' }
s.source = {
:git => 'https://github.com/sincerely/shiplib-ios-framework.git',
:tag => 's.version.to_s'
}
s.frameworks = 'AddressBook', 'AddressBookUI', 'SystemConfiguration', 'CoreTelephony'
s.ios.vendored_frameworks = 'Sincerely.framework'
end

最佳答案

不会为框架复制 header ,并且不应将其指定为源文件。如果您只想将框架添加为 vendored_framework。这是 CP 0.23.0 中的新功能.

来自Documentation

  spec.ios.vendored_frameworks = 'Frameworks/MyFramework.framework'

编辑:
s.source_files 中删除关于 .framework 的所有内容。源文件就是文件,而不是框架。

关于ios - Podspec 链接二进制库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18219286/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com