0

I'm trying to get a Live View to work in a Swift Playground. Whenever I import the XCPlayground framework to execute the XCPShowView function i get this error:

Playground execution failed: error: Couldn't lookup symbols:_CGPointMake

The error changes for a few other "symbols" as well, including CGRectMake. I've tried clearing my Xcode beta 5 cache directory as well as re-installing Xcode.

dcbenji
  • 4,598
  • 5
  • 21
  • 23

2 Answers2

2

Try with this: instead of using

CGSizeMake(200, 200)

use this (without the "Make")

CGSize(width: 200, height: 200)

The same with CGPointMake / CGPoint, CGRectMake/CGRect...

Draelach
  • 531
  • 3
  • 14
  • 1
    This solved the symbols error, but now xcode is throwing an error about constraints so it still won't display an animation of my view. I'm going to post this error in a separate question as your advise technically solved the issue I posted. [Here](http://stackoverflow.com/questions/25231688/swift-playground-xcpshowview-unable-to-satisfy-constraints) is the new question. Thanks for your help! – dcbenji Aug 10 '14 at 18:24
  • 1
    I wish to emphasize the absence of `make` in the second sample. I misread it a couple of times and wondered why it didn't work... – CloakedEddy Aug 19 '14 at 11:37
0

I'm experimenting with sprite kit in a playground, and I had the same problem. For me it helped with NSPoint(x:y:) and NSRect(x:y:)

empee
  • 151
  • 1
  • 8