加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

如何将CocoaPod框架添加到Xcode 8 Playground

发布时间:2020-12-14 18:12:03 所属栏目:百科 来源:网络整理
导读:我试图在 Xcode项目中向Playground添加一些pod.不幸的是,自更新以来唯一支持的范围是目标,并且不再支持link_with. 错误: [!] Invalid Podfile file: [!] The specification of link_with in the Podfile is now unsupported,please use target blocks inste
我试图在 Xcode项目中向Playground添加一些pod.不幸的是,自更新以来唯一支持的范围是目标,并且不再支持link_with.

错误:

[!] Invalid Podfile file: [!] The specification of link_with in the Podfile is now unsupported,please use target blocks instead.

当我使用目标块时,我收到此错误:

[!] Unable to find a target named MyPlayground,did find Target_1,Target_2

要么:

[!] Unable to find a target named MyPlayground.playground,Target_2

还尝试在Target_1目标范围内添加它:

错误

[!] Invalid Podfile file: [!] Unsupported options MyPlayground for target Target_1.

向Playground源添加依赖项的最简单方法是什么?

解决方法

UPDATE

作为:

Xcode 8.2

您不再需要将pod文件夹添加到资源中,只需像在项目中一样使用它.

例:

Playground

Pre Xcode 8.1

感谢Eric Aya,我找到了一个基于他的第一个建议的解决方案.

要将CocoPods框架添加到Playground,请按照下列步骤操作:

>将pod添加到pod文件并点击pod install
>添加一个新的Playground文件
>单击游乐场中的Sources文件夹
>单击“将文件添加到源”
>添加你的pod文件夹,在我们的案例HanakeSwift中
>导入项目pods框架导入Pods_PodsPlayground
>构建和访问您的框架!

Step 3

Step 3

Step 4

Step 4

Step 5

Step 5

Step 6,7

Step 6,7

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读