Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Generate Xcode Project via Swift Package Manager

DZone's Guide to

Generate Xcode Project via Swift Package Manager

Vidyasagar Machupalli didn't know how to generate an Xcode project via Swift package manager, so he figured it out and wrote a tutorial for you to learn too!

Free Resource

Get gorgeous, multi-touch charts for your iOS application with just a few lines of code.

Generated .xcodeproj file

As part of my journey with Swift, I was watching this WWDC 2016 video – “Going Server-side with Swift Open Source” and may be at 31:36 of the video my colleague Pat mentioned, ” I went through and created a Xcode project”. The Xcode project was created for debugging the server-side code under Bluepic-Server folder of Bluepic, a sample photo sharing application for iOS. As a Swift newbie, I was wondering how did he do that? I started exploring various options like CMake, QT etc. and was not getting what I wanted.

While trying KituraA web framework and HTTP server for Swift on Linux(Ubuntu), I was reading through the documentation of Package manager  and came across this instruction

Using a Swift snapshot, it is possible to use the package manager’s support for generating an Xcode project.

If you already have Xcode 7.3.1 or above installed on your Mac,follow the Swift snapshot installation steps and the end result should look like this:

Swift Snapshot - Xcode

On a Terminal, Run the below command (if you haven’t done yet)

Generated .xcodeproj file

Suggested Read IBM Cloud Tools for Swift


Related Refcard:

.Net developers: use Highcharts, the industry's leading interactive charting library, without writing a single line of JavaScript.

Topics:
xcode ,swift ,project

Published at DZone with permission of Vidyasagar Machupalli, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}