Carthage使用记录

来源:互联网 发布:诺德软件 编辑:程序博客网 时间:2024/03/29 14:57

在项目根目录下创建Cartfile文件,输入依赖即可:

# Used for socket communication over USBgithub "rsms/peertalk" "5a0495a"github "AFNetworking/AFNetworking"

然后在根目录下执行命令:

carthage update

carthage便会拉取项目代码并用xcodebuild尝试编译。

如果该项目没有 shared framework scheme,就会报如下的错误:

*** Skipped building peertalk due to the error:Dependency "peertalk" has no shared framework schemesIf you believe this to be an error, please file an issue with the maintainers at https://github.com/rsms/peertalk/issues/new

怎么办呢?

可以简单地只使用 carthage 的 checkout 功能,能 build 的当然可以 build:

carthage checkout

carthage build ocmock - - platform iOS

然后在我们的项目工程中再创建对应的target来引用checkout下来的源文件进行构建

hold

0 0
原创粉丝点击