最近,我正在尝试使用CocoaPods将集成的sharedSDK上传到私有库。
我不确定我是不是做了些蠢事。当我运行“pod lib lint”时,一切似乎都很好但是当我运行“pod spec lint”时,我得到:
ld:警告:忽略TencentOpenAPI.framework文件
** BUILD FAILED **
The following build commands failed:
Ld /Users/melody/Library/Developer/Xcode/DerivedData/App-fcbstzvalzvjwfgtkwkycnyvprjk
/Build/Intermediates/App.build/Release-iphonesimulator/App.build/Objects-normal/i386/App normal i386
(1 failure)
-> SLShareSDK (0.1.0)
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
- NOTE | [iOS] xcodebuild: ld: warning: ignoring file /Users/melody/GItLab/SLShareSDK/SLShareSDK/Assets/TencentOpenAPI.framework/TencentOpenAPI,
missing required architecture i386 in file /Users/melody/GItLab/SLShareSDK/SLShareSDK/Assets/TencentOpenAPI.framework/TencentOpenAPI (3 slices)
- NOTE | [iOS] xcodebuild: clang: error: linker command failed with exit code 1 (use -v to see invocation)
[!] SLShareSDK did not pass validation, due to 1 error.
我的SLShareSDK.Sperepo文件的内容是
Pod::Spec.new do |s|
s.name = 'SLShareSDK'
s.version = '0.1.0'
s.summary = 'Intergation'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
TODO: SLShare...
DESC
s.homepage = 'http://gitlaBalaBala...'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Melody' => 'BalaBala.com' }
s.source = { :git => 'http://gitlab.balabala...../SLShareSDK.git', :tag => s.version.to_s }
s.ios.deployment_target = '7.0'
s.source_files = 'SLShareSDK/Classes/**/*'
s.ios.vendored_libraries = 'SLShareSDK/Assets/*.a'
s.ios.vendored_frameworks = 'SLShareSDK/Assets/TencentOpenAPI.framework'
s.resource_bundles = {
'SLShareSDK' => ['SLShareSDK/Assets/*.bundle']
}
s.frameworks = 'UIKit', 'SystemConfiguration','Security','CoreTelephony','ImageIO'
s.libraries = 'sqlite3','z.1.2.8','c++.1'
s.dependency 'AFNetworking', '~> 2.6.3'
end
这是目录结构:
├── SLShareSDK
│ ├── Assets
│ │ ├── TencentOpenAPI.framework
│ │ │ ├── Headers
│ │ │ ├── Resources
│ │ │ └── TencentOpenAPI
│ │ ├── libWeChatSDK.a
│ │ └── libWeiboSDK.a
│ └── Classes
│ └── SLShareSDK
│ ├── AFHTTPRequestOperationManager+JXExtentsion.h
│ ├── AFHTTPRequestOperationManager+JXExtentsion.m
│ ├── SLShare.h
│ ├── SLShare.m
│ ├── SLShareAuthorizeObject.h
│ ├── SLShareAuthorizeObject.m
│ ├── SLShareConfiguration.plist
│ ├── SLShareConstant.h
│ ├── SLShareConstant.m
│ ├── SLShareContentObject.h
│ ├── SLShareContentObject.m
│ ├── SLShareContentObjectTranslater.h
│ ├── SLShareContentObjectTranslater.m
│ ├── SLShareQQ.h
│ ├── SLShareQQ.m
│ ├── SLShareSina.h
│ ├── SLShareSina.m
│ ├── SLShareWeChat.h
│ ├── SLShareWeChat.m
│ ├── WBHttpRequest+WeiboGame.h
│ ├── WBHttpRequest+WeiboShare.h
│ ├── WBHttpRequest+WeiboToken.h
│ ├── WBHttpRequest+WeiboUser.h
│ ├── WBHttpRequest.h
│ ├── WBSDKBasicButton.h
│ ├── WBSDKCommentButton.h
│ ├── WBSDKRelationshipButton.h
│ ├── WXApi.h
│ ├── WXApiObject.h
│ ├── WechatAuthSDK.h
│ ├── WeiboSDK+Statistics.h
│ ├── WeiboSDK.h
│ └── WeiboUser.h
├── SLShareSDK.podspec
Q1:
在我的意见中,
程序使用TencentOpenAPI.framework和我设置s.ios.vendored_frameworks = 'SLShareSDK/Assets/TencentOpenAPI.framework'
确保代码路径已经完成。
我使用pod lib lint --use-libraries --verbose
查看Specrepo
但它显示错误让我疯狂。但是,相同的代码我使用xcode运行没有问题。
所以,这是我的情况,谢谢你的关注和帮助,如果你有什么建议请帮帮我!
答案 0 :(得分:0)
当我尝试再次链接它的第三方框架时,我也遇到了这个错误,我发现没有解决方案但是必须单独取出头文件让lib构建而不连接,之后它工作,想知道更好的解决方案,请参阅this了解详情,也可以通过更改validator.rb
答案 1 :(得分:0)
我想我已经发现了问题,因为最新的TencentOpenAPI.framework中提到的错误不支持i836CPU,所以我尝试使用旧的API来运行,它正在运行!!!但我不知道如何更改pod lib lint不运行i836编译器...