11

Xcode 7.3 has deprecated XCPlaygroundPage.currentPage.captureValue(_:withIdentifier:). Its predecessor, XCPCaptureValue(), was deprecated in Xcode 7.1.

I'm wondering if there is any replacement, apart from implicit capture of collections and in loops? Apart from being more flexible using the explicit approach, the ability to add captions to graphs seems to be gone with the deprecation/removal (although the symbols are found, the aforementioned deprecated methods don't do anything, or at least not what you'd expect).

hagi
  • 11,503
  • 3
  • 35
  • 48

2 Answers2

3

There is currently no alternative or replacement. Graphs are only displayed implicitly. I have verified this in the Swift/Xcode labs at WWDC 2016. I have filed a radar and will update this questions, should there be any progress.

hagi
  • 11,503
  • 3
  • 35
  • 48
  • Not to my knowledge, unfortunately. My radar was closed a long time ago, with no resolution. – hagi May 03 '17 at 07:35
  • i vaguely remember it wasn't even necessary anymore because of some other change they made, but I forgot what this change was. – Dave Kliman May 04 '17 at 04:23
  • They seem to be able to do plotting on Swift Playgrounds for iPad, does that work now on the Mac? – juandesant Apr 23 '20 at 14:52
-3

Use the currentPage property:

XCPlaygroundPage.currentPage.captureValue(_, withIdentifier:)

Infinity James
  • 4,667
  • 5
  • 23
  • 36
  • 4
    That is the API that has been deprecated. I was using the notation from the Xcode docs, although I can see how it's confusing. – hagi Mar 30 '16 at 10:20