Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add playground to existing Workspace (with cocoapods)

The question:

How to add a playground to the workspace, if i already have an app project and a pod project in this workspace ?

It should look something like this:

im1

Now it can't find dependencies from cocoapods project: im2

What did i try:
https://github.com/segiddins/ThisCouldBeUsButYouPlaying
How to add a CocoaPod framework to Xcode 8 Playground
How to use cocoapods with playground?
https://github.com/WhisperSystems/Signal-iOS/pull/1180

Didn't work.

like image 307
Nik Kov Avatar asked Oct 17 '22 14:10

Nik Kov


1 Answers

Make sure of all of the following:

  • You build your entire project (CMD+B), before trying to import pods into your playground.
  • You build your project for a simulator, building for a device would build it for the wrong platform (playgrounds run in a simulator).
  • You build your project for the correct platform (tvOS, macOS, iOS). You can see which platform your playground is in through the File Inspector (ALT+CMD+1).
like image 194
Kim Avatar answered Oct 29 '22 19:10

Kim