gpt4 book ai didi

ios - Cocoapods:pod lint 有效,但由于缺少 versioned_frameworks,pod repo push 无法验证

转载 作者:行者123 更新时间:2023-12-05 06:19:45 24 4
gpt4 key购买 nike

我有一个 iOS 和 tvOS 框架,我正试图将其发布为私有(private)的、仅限二进制的 CocoaPod。 Podspec lint 没有错误,但将其推送到 repo 验证失败。推送时与 linting 时的验证步骤是否不同?

Foo.podspec

仅相关部分:

  spec.name                = 'Foo'
spec.version = '0.0.4'
spec.source = { :git => 'git@github.com:private-repo/Foo.git', :tag => spec.version.to_s }
spec.static_framework = true
spec.swift_version = '5.0'
spec.cocoapods_version = '>= 1.7.0'

# Deployment Targets
spec.platforms = { :ios => "11.0", :tvos => "11.0" }
spec.ios.deployment_target = 11.0
spec.tvos.deployment_target = 11.0

spec.source = { :http => "<repo-url>/Foo-#{spec.version}.zip" }
spec.vendored_frameworks = 'Build/Products/Debug-iphonesimulator/FooiOS.framework', 'Build/Products/Debug-appletvsimulator/FootvOS.framework'

# Third-Party Dependencies

spec.ios.dependency 'GoogleAds-IMA-iOS-SDK', '~> 3.11'
spec.tvos.dependency 'GoogleAds-IMA-tvOS-SDK', '~> 4.2'

请注意,我将工作区的构建输出目录更改为本地项目根目录,而不是默认的~/Library/Developer/Xcode/Derived Data 文件夹。

pod lib lint

$ bundle exec pod lib lint Foo.podspec --private --allow-warnings --sources=private-repo,master

-> Foo (0.0.4)
- WARN | url: The URL (https://github.com/private-repo/Foo) is not reachable.
- NOTE | xcodebuild: note: Using new build system
- NOTE | xcodebuild: note: Planning build
- NOTE | xcodebuild: note: Constructing build description
- NOTE | xcodebuild: warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')
- NOTE | [iOS] xcodebuild: ld: warning: building for iOS Simulator, but linking in dylib file (/Users/tibbettsj/Developer/arc-video-sdk-ios/Build/Products/Debug-appletvsimulator/ArcMediaPlayertvOS.framework/ArcMediaPlayertvOS) built for tvOS Simulator
- NOTE | [tvOS] xcodebuild: ld: warning: building for tvOS Simulator, but linking in dylib file (/Users/tibbettsj/Developer/arc-video-sdk-ios/Build/Products/Debug-iphonesimulator/ArcMediaPlayeriOS.framework/ArcMediaPlayeriOS) built for iOS Simulator

Foo passed validation.

(我不确定为什么 CocoaPods 生成的 App 目标链接到错误的框架,但这看起来像是一个不同的问题。)

pod repo 推送

$ bundle exec pod repo push private-repo Foo.podspec --private --allow-warnings --sources=private-repo,master

Validating spec
-> Foo (0.0.4)
- WARN | url: The URL (https://github.com/private-repo/Foo) is not reachable.
- ERROR | file patterns: The `vendored_frameworks` pattern did not match any file.
- NOTE | xcodebuild: note: Using new build system
- NOTE | xcodebuild: note: Planning build
- NOTE | xcodebuild: note: Constructing build description
- NOTE | xcodebuild: warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')

供应框架就是我所说的:

$ ls Build/Products/Debug-iphonesimulator/FooiOS.framework
ViewController.storyboardc/ Assets.car Info.plist _CodeSignature/
FooiOS* Headers/ Modules/
$ ls Build/Products/Debug-appletvsimulator/FootvOS.framework
ViewController.storyboardc/ Headers/ Modules/
FootvOS* Info.plist _CodeSignature/

最佳答案

使用 pod spec lint 代替 pod lib lint 进行发布前测试。

只有 pod spec lint 会捕获的典型错误是忘记更新 repo 标签。

关于ios - Cocoapods:pod lint 有效,但由于缺少 versioned_frameworks,pod repo push 无法验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60729103/

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