Hacker News new | past | comments | ask | show | jobs | submit login
Developing iOS 8 Apps with Swift (itunes.apple.com)
201 points by krackjack on Jan 25, 2015 | hide | past | favorite | 45 comments



if anybody is serious about learning swift I would encourage you to try http://exercism.io/ I just finished the swift track of problems two weeks ago and I learnt a lot. example. http://exercism.io/submissions/e4af36983df54ad2afd53c48c51af...

It is also an open source project so if you can help by implementing other problems. I think I've learnt more by implementing an extra 9 problems into swift than I did by just solving the 14 currently in the swift track. Check it out! https://github.com/exercism/xswift

http://www.wired.com/2014/09/exercism/ "[founder] has no plans to turn the site into a business"


Here we go! I'm sending everyone I know who is trying to learn Swift to this resource. His other videos on developing iOS apps with Obj-C are great.

I can't wait until all of these video's are released.


I'm just wondering about the prerequisites. I see CS106A&B (or X) required & CS107 or CS108 or CS110 also (at a minimum) required. I am especially worried about CS108, Object Oriented Programming. I am a programming hobbyist, not a professional. I have good knowledge of Python and PHP and work with VBA at work. Will I be okay, or should I try to find equivalents of these courses before starting this course?


If you're comfortable writing object-oriented code in Python and PHP, you should be fine. The object-oriented parts of Swift are thoroughly ordinary.

One major concept you will want to become comfortable with (that doesn't really exist in dynamic languages AFAIK) is the concept of protocols: https://developer.apple.com/library/ios/documentation/Swift/...

If you're not comfortable with anonymous functions and closures, I'd recommend getting familiar with them as well, since they play a major role later on in the course.


Thanks for your reply! I feel better about it.


You should be fine


Thanks!


Interested folks should check out Bitfountain's incredibly thorough ios8/swift immersive course: http://bitfountain.io/courses/complete-ios8

It's good for first-time or experienced programmers and contains exercises for practically every feature and app style you could want.


I bought this course and I did not like it. It is wayyy to verbose and way to slow even when playing in 2.5x the speed. I learned way more with this free version of the intro to swift https://www.udacity.com/course/ud585


This is Great. I started Swift a couple of weeks ago and this is the right time to see a professional instructor teaching Swift


Is there a way to watch these without iTunes?


You can use TunesViewer[0] if you are on Linux.

0.http://sourceforge.net/projects/tunesviewer/


The previous years were posted on You Tube, so maybe these will be posted there in the near future.


If you want to learn Swift more thoroughly, there are over 200 video tutorials on YouTube: https://www.youtube.com/playlist?list=PLxwBNxx9j4PUpjCEVwjqF...


This is by far, the best resource learning to develop for iOS. highly recommended!


It's only two lectures, so far. Maybe wait until the whole course is up before giving a review?

(Stanford has some older iOS programming courses up on iTunes as well. For example, the course "Developing iOS 7 Apps for iPhone and iPad" [1] is 18 lectures.)

https://itunes.apple.com/ca/course/developing-ios-7-apps-for...


Of course it's too early to know for sure, but judging from the superb quality of Paul Hegarty's previous iOS programming courses, this course will probably become the best learning resource for wannabe iOS developers.


Dear Olifante and anyone else who may see this,

Would you have a few mins. today to talk by phone or email about your experience with Swift and/or this course? I'm writing a news release for Stanford News and would like a couple of user quotes.

Thanks for Swift reply to redwoodfroggie at gmail dot com, or (760) 709-6599.


I am exited about this. Everybody has high hopes. I hope they are all true!


Watched the two first and they are pretty good, easy to follow as someone new to Xcode/IOS. Looking forward to follow this series.


I heard from devs Swift 1.0 is still alpha quality (tools) and Apple shouldn't release it. Would you use it for new project?


I've been using Swift for personal projects. The company at which I work (it's a large social network that recruiters love) has a couple of small teams which have released or are working on apps written entirely in Swift. So it's definitely usable.

Good reasons to use Swift might include the following:

- You think you can make good use of the features Swift offers (generics, sum types, optionals, namespaces, typed containers) and are willing to not just write Objective-C code with a different syntax.

- You are willing to take a short-term productivity hit to learn a language which will probably become the crux of Apple's developer tools in the future.

- Your project isn't going to rely heavily on the dynamic features Objective-C offers (e.g. method swizzling, adding or replacing classes and methods at runtime).

Things that are troublesome with Swift include the following:

- Swift's interoperability with Objective-C and Cocoa Touch is still touch-and-go in a lot of places. It's been getting better, but unless you understand how both Cocoa Touch and Swift work, you will just have to take on faith things like IBOutlets being implicitly unwrapped optionals.

- Xcode's stability when it comes to working with Swift projects leaves much to be desired. The level of instability also seems to vary; I've worked on files that crashed SourceKit over and over and files that caused the IDE no trouble at all.

- I wouldn't call Swift alpha-quality, but there are still compiler and runtime bugs that need to be addressed.

(BTW I really wish HN supported proper lists in comments. Doing the two-space indent just makes everything run off the screen.)


I wrote a custom keyboard using Swift. XCode stability was mostly OK. SourceKit crashed sometimes (disabling syntax highlight and autocomplete), but it didn't cause much headache.

The thing that bothered me most was that iOS app wrote with Swift was packaged with 8 MB runtime libraries, so it was like 100 kB of my code and 8 MB of swift runtime libraries which I didn't like at all.

I tried to learn how to write an OS X application with Swift and for some reason it became a nightmare, SourceKit keeps crashing and it wasn't possible to work at all. I guess I triggered some bug. I tried to investigate it, but without much success, I think that XCode will send those crash logs to Apple and may be things are already fixed.

Actually I'm not really sure that Swift is the language I want to use. Objective C is good enough. It's good old C which I like. It's very dynamic which I like. Cocoa, Cocoa Touch and other frameworks are made for Objective C, not for Swift. I didn't made a final decision whether I will invest into Swift, but probably (at least until Apple declares Objective C obsolete) I will just use Objective C. It has its problems, but it has its strength too.


Many of those annoying sourcekit crashes thankfully got fixed in a recent update (Xcode 6.1.1)


"apple shouldn't release it" is IMHO clearly wrong. They were absolutely right to release it when they did, at a stage where it was just about stable enough to write working apps but many of the features of the language were still being iterated on. Yes that means the language definition isn't yet stable, but the huge advantage us that iOS devs have the chance to influence the development of the language and it's libraries.

Whether or not it's the write time to use it in production is another separate issues that will depend on the app. For fairly simple applications it seems like it's fine to use it now. There is talk that Apple have banned use of swift within the company. That's obviously false, otherwise they wouldn't be able to further develop the language. I do fully expect that to use swift in a production project you would need high level authorisation and probably close coordination with the swift dev team. That would just make sense.


I attended a Swift workshop (hosted by Apple) on my campus today. After the workshop, I asked one of the Apple engineers what he recommended in terms of developing iOS apps. He told me that he hadn't even seen what Swift looked like until today, that Apple employees are banned from using it (and that they actually have code checkers to make sure), and that he wouldn't learn it solely w/o Obj-C until a few years from now. He noted that Apple is still changing it a lot, as it's young, so the structure of the language could change dramatically between now and next year.

He thought it was good idea when I suggested learning Obj-C and then using Swift to cut down on dev time, b/c it is quicker for many things.


I think a lot of the blame for the backlash in the iOS community over Swift should be laid squarely at Apple's feet. At WWDC they pitched it as production-ready but the truth is that even today it is seriously unfinished. It doesn't even support incremental compilation and the tooling is still very fragile. I'd strongly recommend anybody new to iOS to start with ObjC for now. You need to at least be able to read ObjC to understand the APIs and all of the sample code out there and it's still overall a more productive environment.

I don't think any of Swift's current problems are unfixable but I'd give it another year or so at least to mature.


I think Apple's internal policies regarding employees use of Swift for Apple's own software dev should be published as part of the Swift documentation. If it's not good enough for them, it's not good enough for me, but as they gradually change their policies, I'll probably change mine.


I used it this last week. SourceKit would crash all the time. Xcode would crash occasionally. There'd be spurious warnings. Very poor quality warnings. Stuff like "missing argument" and "extra argument" when the class is abstract.

And I'm not sure about this, but the documentation is also off in a lot of places. Essentially anywhere there is a 'setX' is meaningless because that function won't actually exist even if the (Swift) page for it claims it does because in most case you just access the variable.


Small parts of Genius Scan are written in Swift. It's working fine.

In theory it's nice to work with, as it forces you to think everything more carefully and consider all error/nullable cases. In practice, integration with XCode is still full of bugs, code completion is crashing all the time, Swift classes show up as missing symbols in Objective-C (but the project compiles fine)... So, it's a bit painful and it slows down the development process.

We will keep it to very small and well-defined pieces of code for now. It's good to learn about it, but it's not productive.


I think slow compile times and the stability of Xcode are the two biggest complaints. It should only be a matter of months before these issues are addressed. Now is probably a great time to start learning. Btw, I've collected over 500 Swift urls over the past several months. My hope is that iOS developers will soon have everything they need to make a quick migration to the new language.

http://www.h4labs.com/dev/ios/swift.html


I wouldn't use it yet for real projects. Even getting the compiler to work can be tricky sometimes. For example, when writing a function with generic argument constraints, I sometimes had to flip the LHS and RHS to get things to compile where it made no logical difference. (e.g., S.Generator.Element == X instead of X == S.Generator.Element).


We have been using Swift for a complex production app since August, there are a few issues like SourceKit crashing very often and some tools like the memory report inside Xcode doesn't seem to work properly (Instruments works fine though). Other than that Swift has been solid and you should definitely use it for new projects.


I have already used it for new projects and was glad I did. Yes there are some teething issues, but the small amount of pain is manageable and the productivity improvements are very worthwhile. I start all new projects with Swift now whenever appopriate.


Using Swift for sometime here. The language itself is great and I find myself generally more productive.

The annoyances are not with the language, but with the tooling. Slow auto-complete and lack of incremental compilation are my wishes for Apple to fix soon.


This discussion seems relevant: https://news.ycombinator.com/item?id=8887545

I took his course a few years ago when I got started programming, it was great.


I can't figure out how do you download the slides from iTunes? I click the "Get" button but nothing happens.


One you hit get, it is downloaded to a folder called "iTunesU" that is automatically created on your computer. You can search "Lecture 1" and your computer should find it.


I believe you need iTunes U.


Would this be recommended to those who have no experience in programming but want to learn Swift?


I have attended iOS 5 course and skimmed through iOS 7 course, so I hope my comment would apply to this course as well (just looked at contents/chapters). I don't really recommended attending this class without programming experience and also one should be good, I mean with beginner experience also it will be difficult. I was beginner at programming and it was difficult. Lots of things didn't make sense and ultimately I gave up in middle. Now I have understood basics of programming paradigms, like loops, object oriented programming and other concepts like MVC, things started making sense. For me iOS8 class gonna be good experience, I hope. Plus swift is easy to understand syntax wise compared to Objective C, for me.

Note that I am still a noob at Objective C, however I have learnt bit of Python and things still make sense. Hope this helps you.


As Paul mentions in the video, you are expected to have object oriented programming knowledge. If you are new to programming, I think you'll get confused at some point on the reasoning behind why he is doing/teaching some of the things.

Perhaps start from a tutorial like [1] to learn the basics and also object oriented paradigms. Then, follow the Swift course.

[1] http://code.tutsplus.com/series/python-from-scratch--net-205...


I am pretty sure that in the Stanford CS curriculum, CS193P has pre-requisites that include introductory programming clases.


No, according to course material you're expected to be somewhat experienced in object oriented programming.


Finally




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: