web-dev-qa-db-fra.com

La charpente de cosses Xcode Swift CocoaPods échoue sur les modules d'intégration

Je reçois le message d'erreur suivant lorsque j'essaie d'exécuter 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.

Je sais que j'ai quelques avertissements que je peux nettoyer. Mais il n’ya qu’une erreur que j’obtiens, à savoir - ERROR | [OSX] xcodebuild: Returned an unsuccessful exit code.. Et au-dessus, il est indiqué que Embed Pods Frameworks était la cause de l'échec.

Vous ne savez pas comment déboguer cela, car je peux très bien construire et exécuter les exemples de projets dans Xcode.

Ci-dessous, j'ai également joint mon 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' => '[email protected]' }
  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

Des idées sur la façon de résoudre/déboguer ceci?

5
Charlie Fish

L'erreur devrait concerner environ line 104: EXPANDED_CODE_SIGN_IDENTITY: unbound variable

La solution (comme indiqué dans Numéro 7708 sur github/Cocoapods ) devrait être d'ajouter les paramètres définis par l'utilisateur suivants au projet:

EXPANDED_CODE_SIGN_IDENTITY="-"
EXPANDED_CODE_SIGN_IDENTITY_NAME="-"`
1
Umberto Migliore

Essayez d'ajouter l'indicateur --no-clean. Cet indicateur permet à lint de laisser le répertoire de construction Intact pour inspection Afin que vous puissiez déboguer cet échec de construction dans un espace de travail plus familier et vous donner davantage d'informations.

On dirait qu'ils ont corrigé cela pour le xcode 10 dans pr github.com/CocoaPods/CocoaPods/pull/7720. Vous pourriez essayer de passer à la version 1.6.0 ou de passer à une version antérieure de xcode à la version 9.4.

1
John Ottenlips