Custom Cocoapod всегда возвращает «Нет такого модуля XXX» - PullRequest
0 голосов
/ 28 мая 2019

Я следовал найденному руководству здесь

Это мой .podspec файл

Pod::Spec.new do |s|
  s.name         = "iOSUtils"
  s.version      = "0.0.1"
  s.summary      = "A really short description of MyFramework."
  s.description  = <<-DESC
  A much much much longer description of MyFramework.
                   DESC
  s.homepage     = "https://github.com/xxxxxxx/ios-utils"
  s.license      = "MIT"
  s.author       = { "xxxxxxx" => "xxxxxxx@xxxxxxx.io" }
  s.source       = { :path => '.' }
  # s.source       = { :git => "https://github/samwize/MyFramework", :tag => "#{s.version}" }
  s.source_files  = "Source/**/*.swift"
end

Мое решение выложено как enter image description here

И для целей тестирования я создал простой сервис

public class TestService {
    static public let shared = TestService()
    private init() { }

    public func foo() {
        print("bar")
    }
}

Podfile моего проекта, который будет использовать этот новый фреймворк, выглядит как pod 'iOSUtils', :path => '../iOSUtils', и запуск установки возвращает сообщения об успехе.

Однако когда я пытаюсь импортировать свой модуль, я получаю ошибку no such module и не могу собрать.

Также, глядя на мой проект, я не вижу исходный код, включенный в модули разработки

enter image description here

1 Ответ

1 голос
/ 28 мая 2019

Попробуйте добавить имя вашего пакета в s.source_files вашего iOSUtils.podspec файла.

  s.source_files  = "iOSUtils/Source/**/*.swift"
...