Swift: Beta 4 secrets revealed! New playground xcworkspaces

This makes me so happy.

Screen Shot 2015-03-27 at 7.26.45 AM

You’re looking at the contents of playground bundle that I was working on yesterday. That playground.xcworkspace file is new.

New to Beta 4, an xcworkspace contains all the details of how you last left your windows — which inspectors were open, how you set up your panes, and so forth.

Right now, the file isn’t being created all the time. This will likely get fixed soon. I’m told it’s supposed to be automatically established on your behalf. I find if I hop into the bundle and create a playground.xcworkspace folder manually and re-launch the playground, that everything kicks into place.

My only concern here has to do with the extra content being shipped with the playground. Playgrounds play two critical roles in SwiftWorld: learning and sharing. With sharing, I’d imagine I’d only want to include the cleanest material, without all the XCUserData stuff that crufts up in a workspace. Perhaps Apple might include a “prepare for shipping” option that cleans that up and archives it for you.

One Comment

  • Ideally, playgrounds will only be “the thing I am showing” and “the other stuff”. That they integrated the timeline into the editor makes the first part a single item, which I think is great. The trick for all “the other stuff” is to hide it away where it won’t be distracting, but is still accessible if necessary (in the case of pre-compiled modules).