我正在尝试将不属于我的开源项目转换为使用 Carthage,以便将其作为依赖项包含在内。我添加了一个新方案并将该方案设为共享。我将它 checkin 了我本地的源代码 git 仓库。这是在我的 Cartfile 中:
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 提供框架,是否还需要做其他事情?
最佳答案
我确实将 plcrashreporter
框架与 Carthage 集成在一起,但由于该项目已经过时,我不得不 fork 一个 pull request,就是这个:
https://github.com/plausiblelabs/plcrashreporter/pull/9
如您所见,那里有许多提交 (#34
),一些与 Carthage 相关,另一些用于清理和修复目标。
您可以在此处找到存储库:
https://github.com/feelform/plcrashreporter
我的测试(您可能会发现它 here )具有以下内容:
Cartfile: github "feelform/plcrashreporter"
在build设置中,运行脚本:
/bin/sh: /usr/local/bin/carthage copy-frameworks
输入文件:$(SRCROOT)/Carthage/Build/iOS/CrashReporter.framework
输出文件:$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/CrashReporter.framework
关于ios - 没有共享框架方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48232206/