Production Code

Production Code in Swift?
I would like to see some industrial, production code, in Swift, and, preferably, done outside XCode.

I avoid IDE development until I am very comfortable with the language. Sometimes the IDE supplies things I “never know about”, and when I move to a different context I crash and burn. So, for six months or so, its the text editor and command line for me.

I am particularly interested interested in the use of asserts during development (once a key strategy in C, of course), and the error checking using exceptions.

Much of the code I have seen is in tutorial books, which I suspect are sufficient for demonstrating patterns, or language features, but these are not truly insightful of industrial coding in Swift.

Can anyone point me to a source, please (and code for a complete or relative complex, if short, app)? Thanks.

So!

No production code outside XCode?

IBM are doing some server work with Swift, and I expect to get some files to study there shortly. Just in case other people are interested, I include a link.

https://developer.ibm.com/swift/

I think you’ve not asked an easy question.

Most Swift work will have been done in Xcode for one simple reason: you need it to submit to the App Store. There are other Swift environments for coding, such as AppCode (by Jetbrains), but I think that still requires Xcode to be installed. As Swift develops for platforms such as Linux, I would assume there’ll be better tools for those platforms, but as far as I know it’s still early days yet.

In terms of production apps, again, it’s tricky. There’s a lot of sample code out there, a lot of open-source projects on Github or code in libraries on Cocoapods, but I don’t know how much their rating systems will guide you to best practices (as opposed to useful functionality). I read several Swift newsletters and follow several twitter accounts (there’s a list of all the RW team members’ twitter accounts you can subscribe to) and I’ve found a number of style guides and such that way (here’s one example I bookmarked a few weeks ago`), but I’m not sure about full apps.

It’s definitely a topic which could do with more discussion. I’ve been trying to apply my understanding of the SOLID principles and the VIPER architecture to Swift in my own apps for a while now, but I’m not in a position to share a complete project.