ios - 没有共享框架方案

标签 ios objective-c swift carthage

我正在尝试将不属于我的开源项目转换为使用 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/

相关文章:

iphone - 如何转换 NSString 中的日期时间格式?

swift - 用选定的 TableViewCell 填充文本字段?

ios - 在 UIBarButtonItem 中添加边框

c# - 无法在 Xamarin IOS 中捕获 WkWebView 的屏幕

ios - 删除 UITableViewCell 后,出现空白行

swift - 带有图像的动态 UITableView

swift - Swift 2 中 Pixel 的颜色

ios - AVAudioPlayer无法播放MP3文件

iOS:以编程方式在 UIView 中绘制线条

ios - 替换 WatchKit 中分层导航堆栈中的 Controller