How to add a CocoaPod framework to Xcode 8 Playground

后端 未结 2 970
走了就别回头了
走了就别回头了 2021-01-13 13:54

I tried to add some pods to the Playground within an Xcode project. Unfortunately, the only scope supported is targets since the update, and link_with is no lon

2条回答
  •  星月不相逢
    2021-01-13 14:15

    UPDATE

    As of:

    Xcode 8.2

    You no longer need to add your pod folder into resources, simply use it as you would in the project.

    Example:


    Pre Xcode 8.1

    Thanks to Eric Aya, I have found a solution based on his first suggestion.

    In order to add a CocoPods framework to Playground, follow these steps:

    1. Add pods to your pod file and hit pod install
    2. Add a new Playground file
    3. Click on the Sources folder in your playground
    4. Click on the + for Add Files to Sources
    5. Add you pod folder, in our case HanakeSwift
    6. Import your project pods framework import Pods_PodsPlayground
    7. Build and access your framework!

    Step 3

    Step 4

    Step 5

    Step 6, 7

提交回复
热议问题