簡體   English   中英

嵌入式Pods框架上的Xcode Swift CocoaPods pod spec lint失敗

[英]Xcode Swift CocoaPods pod spec lint Fails on Embed Pods Frameworks

我在嘗試運行pod spec lint --verbose時遇到以下錯誤pod spec lint --verbose

sent 1312397 bytes  received 106 bytes  2625006.00 bytes/sec
total size is 1311832  speedup is 1.00
/var/folders/3d/v0m_90ty4mg1opbynpnjjvzh2010gm/T/CocoaPods-Lint-20181015-62030-oljqd-MySwiftPackage/Pods/Target Support Files/Pods-App/Pods-App-frameworks.sh: line 104: EXPANDED_CODE_SIGN_IDENTITY: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code

    ** BUILD FAILED **


    The following build commands failed:
        PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/myuser/Library/Developer/Xcode/DerivedData/App-loplmnuztwibrzfqgadqoxucytrz/Build/Intermediates.noindex/App.build/Release/App.build/Script-09EB8340PON5K18DNW0C63DQ.sh
    (1 failure)
   Testing with `xcodebuild`. 
 -> MySwiftPackage (0.1.0)
    - WARN  | summary: The summary is not meaningful.
    - WARN  | description: The description is shorter than the summary.
    - WARN  | url: The URL (https://github.com/fishcharlie/MySwiftPackage) is not reachable.
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | xcodebuild:  note: Planning build
    - NOTE  | xcodebuild:  note: Constructing build description
    - NOTE  | [iOS] xcodebuild:  warning: Skipping code signing because the target does not have an Info.plist file. (in target 'App')
    - WARN  | xcodebuild:  MySwiftPackage/MySwiftPackage/ViewControllers/Shared/MyFirstViewController.swift:102:37: warning: conditional cast from 'UIViewController' to 'MyViewController' (aka 'UIViewController') always succeeds
    - WARN  | xcodebuild:  MySwiftPackage/MySwiftPackage/ViewControllers/Shared/MySecondViewController.swift:145:37: warning: conditional cast from 'UIViewController' to 'MyViewController' (aka 'UIViewController') always succeeds
    - ERROR | [OSX] xcodebuild: Returned an unsuccessful exit code.

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 1 error and 5 warnings.

我知道我有一些警告我可以清理。 但是我得到的只有一個錯誤,那就是- ERROR | [OSX] xcodebuild: Returned an unsuccessful exit code. - ERROR | [OSX] xcodebuild: Returned an unsuccessful exit code. Embed Pods Frameworks ,它說Embed Pods Frameworks是失敗的原因。

不知道如何調試這個,因為我可以在Xcode中構建和運行示例項目。

下面我也附上了我的Podspec。

Pod::Spec.new do |s|
  s.name             = 'MySwiftPackage'
  s.version          = '0.1.0'
  s.summary          = 'A short description of MySwiftPackage.'

  s.description      = <<-DESC
TODO: Add long description of the pod here.
                       DESC

  s.homepage         = 'https://github.com/fishcharlie/MySwiftPackage'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'fishcharlie' => 'fishcharlie.code@gmail.com' }
  s.source           = { :git => 'https://github.com/fishcharlie/MySwiftPackage.git', :tag => s.version.to_s }
  s.social_media_url = 'https://twitter.com/char_fish'

  s.ios.deployment_target = '9.0'
  s.osx.deployment_target = '10.11'
  s.swift_version = '4.2'

  s.source_files = 'MySwiftPackage/Classes/**/*', 'MySwiftPackage/ViewControllers/Shared/**/*'
  s.ios.source_files = 'MySwiftPackage/ViewControllers/iOS/**/*'
  s.osx.source_files = 'MySwiftPackage/ViewControllers/macOS/**/*'
  s.resources = 'MySwiftPackage/Assets/**/*.{ttf,xcassets}'

  s.dependency 'Alamofire', '4.7.3'
  s.dependency 'Bond', '6.10.2'
  s.ios.dependency '1PasswordExtension', '1.8.5'
end

關於如何修復/調試這個的任何想法?

嘗試添加標志--no-clean 此標志使lint保留構建目錄以供檢查,因此您可以在工作區中調試構建失敗,這可能更熟悉並為您提供更多信息。

看起來他們在pr github.com/CocoaPods/CocoaPods/pull/7720中修復了xcode 10,你可以嘗試升級到1.6.0,或者將xcode降級到9.4。

錯誤應該是關於line 104: EXPANDED_CODE_SIGN_IDENTITY: unbound variable

解決方案(如github / Cocoapods上的問題7708所述 )應該是將以下用戶定義的設置添加到項目中:

EXPANDED_CODE_SIGN_IDENTITY="-"
EXPANDED_CODE_SIGN_IDENTITY_NAME="-"`

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM