Зависимость фреймворка: не удалось построить модуль Objective-C - PullRequest
1 голос
/ 12 июня 2019

У меня есть это рабочее пространство (частично сгенерированное этим подфайлом)

enter image description here

# Podfile
platform :ios, '12.0'
use_frameworks!

workspace 'Wynton.xcworkspace'

def regular_pods
  pod 'RxSwift', '~> 5.0'
  pod 'RxCocoa', '~> 5.0'
  pod 'SnapKit', '~> 5.0'
  pod 'Starscream', '~> 3.0'
end

def testing_pods
  pod 'Nimble', '~> 8.0'
  pod 'RxBlocking', '~> 5.0'
  pod 'RxTest', '~> 5.0'
end

# WYNTON
target 'Wynton' do
  project 'Wynton.xcodeproj'
  inherit! :search_paths
  regular_pods
  pod 'AudioKit', '~> 4.0'

  # UNIT TESTS
  target 'WyntonTests' do
    inherit! :search_paths
    regular_pods
    testing_pods
  end

end

# WYNTON HOST
target 'WyntonHost' do
  project 'WyntonHost/WyntonHost.xcodeproj'
  inherit! :search_paths
  regular_pods
  pod 'RealtimeWatchdog', '~> 1.0'
  pod 'Watchdog', '~> 5.1'
end

В рабочей области 4 проекта.

1. Pods (the cocoapods)
2. Mirga (my static c++ library) no dependencies
3. Wynton (my mixed framework, swift and objc) is depending on Mirga. Offers the root view controller and other ui stuff. A collection of things i want to share
4. Host (the application that uses Wynton and some Pods, only has an AppDelegate.swift file)

Теперь, когда я пытаюсь заархивировать, протестировать или собрать инфраструктуру Wynton, все выглядит хорошо.

Но когда я пытаюсь запустить WyntonHost, компилятор выходит из строя с этой ошибкой.

<module-includes>:3:9: note: in file included from <module-includes>:3:
#import "../Mirga/AudioInputMapper.h"
        ^
/Users/mlostek/Projects/project/wynton/Wynton/WyntonPrivate/../Mirga/AudioInputMapper.h:4:9: error: 'MirgaFactory.h' file not found
#import "MirgaFactory.h"
        ^
<unknown>:0: error: could not build Objective-C module 'WyntonPrivate'

Странно, что это происходит отсюда


import UIKit
import Watchdog
import Wynton //=> this is where the compile error is coming from

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window:    UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {        
        // no storyboard, we create it manually
        window = UIWindow(frame: UIScreen.main.bounds)
        window?.rootViewController = AppViewController() // AppViewController is from Wynton Framework
        window?.makeKeyAndVisible()
        return true
    }

Внутри Wynton у меня есть внутренний модуль с именем WyntonPrivate. Он содержит такие вещи, как это

module WyntonPrivate {
    header "../Mirga/AudioInputMapper.h"
    header "../Mirga/Factory/MirgaFactory.h"
    header "../Mirga/Wrapper/MirgaWrapper.h"
    header "../Mirga/Wrapper/PerformanceInterfaceWrapper.h"
    export *
}

Этот файл установлен как "файл карты частного модуля" в настройках сборки.

В чем здесь проблема?

...