【问题标题】:No shared framework schemes没有共享框架方案
【发布时间】:2018-06-22 06:24:18
【问题描述】:

我正在尝试将我不拥有的开源项目转换为使用 Carthage,以便我可以将其作为依赖项包含在内。我添加了一个新方案,并将该方案设为共享。我将其签入到我的本地 git 存储库中。这是在我的购物车文件中:

git "file:///Users/crystaltwix/Projects/plcrashreporter" "shared-scheme"

当我尝试运行时

carthage update --platform iOS

我确实看到 Carthage 使用正确的 git 哈希检查 plcrashreporter,但我得到的错误是

*** Skipped building plcrashreporter due to the error:
Dependency "plcrashreporter" has no shared framework schemes for any of the platforms: iOS

为了让 Carthage 提供框架,还需要做些什么吗?

【问题讨论】:

  • 打开Carthage/build/iOS/plcrashreporter里面的项目检查框架目标,shared标志是否启用?
  • @AndreaMugnaini 是的,它被检查为共享。
  • @AndreaMugnaini 是的,就是这样。
  • 我确实将该项目与 Carthage 集成,但由于该项目已经过时,我不得不提出一个拉取请求。我将在结果下方发布。

标签: ios objective-c swift carthage


【解决方案1】:

我确实将 plcrashreporter 框架与 Carthage 集成,但由于该项目已经过时,我不得不提出一个拉取请求,即这个:

https://github.com/plausiblelabs/plcrashreporter/pull/9

如您所见,那里有许多提交 (#34),其中一些专门与 Carthage 相关,还有一些用于清理和修复目标。

你可以在这里找到回购:

https://github.com/feelform/plcrashreporter

我的测试(你可能会发现它here)有以下内容:

购物车文件:github "feelform/plcrashreporter"

在构建设置中,运行脚本:

/bin/sh:/usr/local/bin/carthage copy-frameworks

输入文件:$(SRCROOT)/Carthage/Build/iOS/CrashReporter.framework

输出文件:$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/CrashReporter.framework

【讨论】:

  • 您是否也可以使用 podspec 构建此项目?我没有。
猜你喜欢
  • 1970-01-01
  • 2013-10-02
  • 1970-01-01
  • 2013-02-09
  • 1970-01-01
  • 2016-03-15
  • 1970-01-01
  • 1970-01-01
  • 2018-08-12
相关资源
最近更新 更多