神刀安全网

Magic, madness, heaven, sin. Yes, we got Swift

Magic, madness, heaven, sin. Yes, we got Swift!

As most of us already know, Swift is the new hottie in the iOS App developer world since 2014. This new programming language has been built on the best of C and Objetive-C with the goal of trying to solve some compatibility problems and create a more fun, clean, flexible environment for developers to create Apps in iOS, OS X, watchOS, and tvOS

Building apps is not gonna be a nightmare dressed like a daydream. Anymore.

The Swift community has shown significant growth in the past couple of years so we decided to launch a new console type for all you Apple developers.

You can find it in the language section when you create your new console.

Magic, madness, heaven, sin. Yes, we got Swift

REPL

You can launch the REPL (read-eval-print-loop) by running the command swift in the Terminal Tab of the console below. You can use it to try libraries, debugging and inspect code in your programs. 

Running your code with Packages

You can use the Swift build system to create libraries and executables.

To test the demo you need to run the following commands:

swift build – for compiling all the code 

.build/debug/Name-Of-The-Demo – for running the package 

Tip:

You can also run as a one line command like this:

swift build && .build/debug/Name-Of-The-Demo 

Running your code as an Executable

Since Swift is compiled into machine code, you can run it as a standalone program.

If you want to get your feet wet with new technology or try a new Swift library now is your chance! No installation or configuration needed. You can find more information about Swift in their Apple Developer Documentation and on their official site .

Hopefully you keep using our amazing CodePicnic consoles for you to play as much as you want. You can start with a simple email sign-up for a free 20 hours

Happy Coding!

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Magic, madness, heaven, sin. Yes, we got Swift

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址