在iOS应用程序中安装私有cocopods库时出错

问题描述 投票:0回答:1

我的 podspec 如下,

Pod::Spec.new do |s|
  s.name             = 'demo'
  s.version          = '0.1.0'
  s.summary          = 'A short description of demo.'
  s.description      = 'This is a pob library'

  s.homepage         = 'https://mygitrepo.git'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'authorName' => '[email protected]' }
  s.source           = { :git => 'https://mygitrepo.git', :branch =>'dev/demo' , :tag => s.version.to_s }
  s.source_files = 'demo/Classes/**/*.{h,m,swift}'
  s.vendored_frameworks = 'Example/Pods/testFramework.framework'
end

我创建了自己的私有 cocoapods 依赖库:source。我添加了一些 Objective-C 类 .h/.m 和 swift 文件。之后我将代码推送到 git 中。

XCode 构建阶段如下,

我收到的是 .h 文件,而不是 .mswift 文件。

我在我的项目中的 pod 目录中添加了此依赖项,但没有获得 .m.swift 文件。

主项目中的Pod结构如下,

安装 pod 依赖项后找不到

.m 文件。

ios swift objective-c cocoapods
1个回答
0
投票

尝试改变

s.source_files = 'Classes/**/*.{h,m,swift}'

© www.soinside.com 2019 - 2024. All rights reserved.