Importing CocoaPod into Swift Playground Produces Expression Failed to Parse Error

Viewed 270

I have several private pods that I'm already using successfully in my project. I added a Swift playground to the workspace (not to the project), and I've added an import Foo statement to the top of the playground.

Autocomplete is working for my pod modules, so things seem to be set up correctly. However, I'm getting this very obscure error:

expression failed to parse, fixed expression suggested:
  #sourceLocation(file: "Foo.playground", line: 1)   

It doesn't matter which line I put my import statement on; it always refers to line 1.

There is notably some Obj-C code in the framework that’s being imported. I’m not sure if that matters or not since it’s callable from the Swift in my app.

Any help would be appreciated!

Update (7/21/19): Still haven't been able to resolve this, but I was able to confirm that a much simpler Obj-C library is callable from a playground. So, it's just the complex one I was trying to call initially. Since this is proprietary, there's not a lot of info I can share, but if anyone has suggestions on what to try (or what I can genericize, extract, and share here), I'm happy to take a stab at it and update you. Thanks!

0 Answers
Related