Generated .xcodeproj file

Generate Xcode Project via Swift Package Manager

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.

Note: To quickly create, maintain & monitor BluePic Sample, Refer  IBM Cloud Tools for Swift

While trying Kitura – A 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)

Navigate to BluePic-Server folder on Terminal and run the below command to generate .XcodeProj,

If everything goes as expected, You should see Bluepic-Server.xcodeproj file in the folder

Generated .xcodeproj file

Note: As Swift package manager is evolving, commands are subject to change.

(Visited 5 times, 1 visits today)

Vidyasagar Machupalli

Polyglot & Pragmatic Programmer • Developer Advocate, IBM • Microsoft MVP • Intel software Innovator • DZone MVB