Ошибка зависания Cocoapods: "нет такого модуля" для импорта C ++ в подмодуле - PullRequest
1 голос
/ 30 сентября 2019

Issue

Несмотря на то, что podspec определяет и source = {:submodules => true}, и pod_target_xcconfig = {'SWIFT_INCLUDE_PATHS' => '$(PODS_ROOT)/SpokeStack/filter_audio/**, компилятор Swift, похоже, не находит имя модуля filter_audio подмодуля git (определено в module.modulemap подмодуля)вызывается из CocoaPods. Это не проблема при обычном xcodebuild вызове.

Шаги воспроизведения

git clone https://github.com/pylon/spokestack-ios.git --branch 2.0.6 --depth 1

git submodule update --init #requires a git ssh key

cd spokestack-ios

pod spec lint #or pod lib lint

Что случилось вместо этого?

 -> SpokeStack (2.0.6)
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | [iOS] xcodebuild:  note: Planning build
    - NOTE  | [iOS] xcodebuild:  note: Constructing build description
    - ERROR | [iOS] xcodebuild:  SpokeStack/SpokeStack/WebRTCVAD.swift:10:8: error: no such module 'filter_audio'
    - NOTE  | [iOS] 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')

Analyzed 1 podspec.

Стек

   CocoaPods : 1.8.0
        Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
    RubyGems : 2.5.2.3
        Host : Mac OS X 10.14.6 (18G95)
       Xcode : 11.0 (11A420a)
         Git : git version 2.21.0 (Apple Git-122)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - git - https://github.com/CocoaPods/Specs.git @ 8918e41ff9649039e8dcb7c44b6b0c2462734c69
               trunk - CDN - https://cdn.cocoapods.org/

Podspec

Pod::Spec.new do |s|
  s.name = 'SpokeStack'
  s.version = '2.0.6'
  s.license = 'Apache'
  s.summary = 'Spokestack provides an extensible speech recognition pipeline for the iOS platform.'
  s.homepage = 'https://www.pylon.com'
  s.authors = { 'Spokestack' => 'support@pylon.com' }
  s.source = { :git => 'https://github.com/pylon/spokestack-ios.git', :tag => s.version.to_s, :submodules => true }
  s.license = {:type => 'Apache', :file => 'LICENSE'}
  s.ios.deployment_target = '11.0'
  s.swift_version = '4.2'
  s.ios.framework = 'AVFoundation'
  s.exclude_files = 'SpokeStackFrameworkExample/*.*', 'SpokeStackTests/*.*', 'SpokeStack/Info.plist'
  s.source_files = 'SpokeStack/**/*.{swift,h,m}'
  s.pod_target_xcconfig = {'SWIFT_INCLUDE_PATHS' => '$(PODS_ROOT)/SpokeStack/filter_audio/** $(SRCROOT)/SpokeStack/VAD/Wit', 'HEADER_SEARCH_PATHS' => '$(PODS_ROOT)/SpokeStack/filter_audio/** $(SRCROOT)/SpokeStack/VAD/Wit'}
  s.preserve_paths = 'SpokeStack/**/*.modulemap'
  s.public_header_files = 'SpokeStack/SpokeStack.h'
  s.dependency 'TensorFlowLiteSwift', '~> 1.14.0'
  s.static_framework = true

end
...