Create New Swift Playground Action

Sharing and discussing custom actions for LaunchBar
marco
Objective Development
Objective Development
Posts: 16
Joined: Mon Jul 28, 2014 3:00 pm
Location: Vienna, Austria

Create New Swift Playground Action

Postby marco » Mon Aug 11, 2014 2:37 pm

If you’re a Mac and/or iOS developer, there’s a good chance that you’re reading a lot about Swift right now. Xcode’s new Playground feature encourages you to try things out and familiarize yourself with the new syntax and APIs.

Oftentimes, I just want to try something out in a clean Playground real quick, but switching to Xcode, creating a new Playground and (most importantly) then deciding how to name it and where to save it is just no fun for me.

That’s why I wrote a LaunchBar Action that just creates a new Playground and opens it right away. You can optionally enter a name for the Playground, but you don’t have to (a timestamped name is used by default).

It’s written in Swift, so a current Xcode version is required.

Create New Swift Playground.png
Create New Swift Playground.png (18.33 KiB) Viewed 3707 times


The action can be downloaded here:
https://github.com/marcomasser/LaunchBarActions

nicolinden
Posts: 3
Joined: Wed Dec 03, 2014 10:52 am

Re: Create New Swift Playground Action

Postby nicolinden » Wed Jul 22, 2015 11:13 am

Hi Marco,

I like the idea and installed it but it seems to always create an OS X playground, is there a way to let it create an IOS playground instead?

Kind Regards,
Nico van der Linden

marco
Objective Development
Objective Development
Posts: 16
Joined: Mon Jul 28, 2014 3:00 pm
Location: Vienna, Austria

Re: Create New Swift Playground Action

Postby marco » Wed Jul 22, 2015 1:36 pm

Hi Nico,

that would definitely be useful as a separate action. I’ll see if I can find the time to do that. If you want to create such an action yourself, you’ll just have to replace the Template.playground file in the action bundle’s Resources folder.

Cheers,

Marco

nicolinden
Posts: 3
Joined: Wed Dec 03, 2014 10:52 am

Re: Create New Swift Playground Action

Postby nicolinden » Thu Jul 23, 2015 9:52 am

marco wrote:Hi Nico,

that would definitely be useful as a separate action. I’ll see if I can find the time to do that. If you want to create such an action yourself, you’ll just have to replace the Template.playground file in the action bundle’s Resources folder.

Cheers,

Marco


Thanks for your quick reply Marco, I will look forward for an update but it was indeed easy to change it in the current application. I replaced the template file with an iOS playground file and now I can use it for my developments since I am only a beginner and currently only on iOS this is really useful so thanks for that!

marco
Objective Development
Objective Development
Posts: 16
Joined: Mon Jul 28, 2014 3:00 pm
Location: Vienna, Austria

Re: Create New Swift Playground Action

Postby marco » Thu Jul 23, 2015 9:59 am

Glad to hear!

marco
Objective Development
Objective Development
Posts: 16
Joined: Mon Jul 28, 2014 3:00 pm
Location: Vienna, Austria

Re: Create New Swift Playground Action

Postby marco » Thu Aug 20, 2015 4:40 pm

It took a while but I finally found the time to create a separate action.


Return to “LaunchBar Actions”

Who is online

Users browsing this forum: No registered users and 3 guests