Show Menu

Expanding your company? Need a developer?

Submit your 30 day Job Listing for FREE

This quick tip will show you have to get REPL (Read-Eval-Print-Loop) using iOS8 Swift and Terminal.

If you read the What's new in XCode 6 it introduces some new features about Xcode 6, and it says:

Command Line

Xcode’s debugger includes an interactive version of the Swift language, known as the REPL (Read-Eval-Print-Loop). Use Swift syntax to evaluate and interact with your running app or write new code in a script-like environment. The REPL is available from within LLDB in Xcode’s console, or from Terminal.

The first thing you need to do is:

sudo xcode-select -switch /Applications/

Then you can use any of these two

xcrun swift 
lldb --repl

having issues?

We have a Questions and Answer section where you can ask your iOS Development questions to thousands of iOS Developers.

Ask Question

FREE Download!

Get your FREE Swift 2 Cheat Sheet and quick reference guide PDF download when you sign up to SwiftMonthly

Sharing is caring

If you enjoyed this tutorial, please help us and others by sharing using one of the social media buttons below.

Written by:

I work in the shadows. You can thank me by being a good soul.