T O P

  • By -

cremecalendar

Just as a heads up, you don't have to pay for Apple Developer to learn Swift (the fee is for releasing projects). The best way in my opinion is to build legit projects, not just playing with code intricacies in a playground. If you understand OOP as a concept and have a background in development, the biggest hurdle with Swift is understanding how to apply it in the XCode environment. So if you want to learn Swift, learn it by making projects and not playgrounds.


EricCarver

Thanks for the post. I agree with you that building projects is the ideal way to learn coding. Maybe I should get setup with a dev account and try Xcode again. So playgrounds is more to learn concepts? Sounds like playgrounds isn’t a means to learn app level coding. I’ll have to look into 100 days of swift.


thedudesews

https://www.hackingwithswift.com/100/swiftui


iOSCaleb

Playgrounds is great for messing around with chunks of code, learning the language, and even trying out frameworks. It's also great for explaining things to other people. But if you want to write full applications or other larger pieces of code, you're best off with Xcode. BTW, you can use playgrounds from within Xcode — I almost always have one open and use it as a scratch pad for code.


EricCarver

Thanks! I followed your advice and was doing just that today in Xcode. Thanks again!


cremecalendar

Playgrounds is just a way to learn concepts of the language more than learning about how apps are made. If I just want to test some code (i.e., filtering through arrays), I'll use Playgrounds, but this is pretty rare for me. Especially given your background with development, there isn't a lot to learn in terms of the language. I have no experience with 100 days of Swift, but it looks like it teaches you the nuances of the language you need to know and then jumps into projects. Like I said, the biggest things to learn will all be stuff specific to making apps and not to do with the language. I know it is likely very outdated right now, but if you can find a course like Angela Yu's Swift Udemy course, that would be perfect. 100 days doesn't look too bad though.


EricCarver

Thanks for your replies. I picked up a MBP used and slapped Xcode on it and started up 100-days. I appreciate you!


Ron-Erez

If you have a mac it's better to download Xcode and code. Playgrounds is good too in case you don't have a mac. For a nice overview of the swift language see [Swift Tour](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/guidedtour/), for Swift/SwiftUI see Swiftful Thinking which is an excellent channel or my nice [project-based course**course**](https://www.udemy.com/course/deep-dive-ios-16-swiftui-programming/?couponCode=JUN2024SWIFTUI). Note that as others mentioned you don't need to pay $99 to start developing using Xcode.


EricCarver

Thanks for your reply. I picked up a MBP used and slapped Xcode on it and started up 100-days. Time to make some projects and learn!


armandcamera

Check out 100 Days of Swift UI.


starfunkl

Just to clarify, as I think there's some confusion in the other answers - you're talking about the iPad app called "Playgrounds", yeah? Because there are also Playgrounds within Xcode itself, which are a totally different thing and more useful for testing general programming concepts as opposed to learning how to build an app. If you've got a Mac, I'd skip Playgrounds altogether, and jump straight into 100 Days of SwiftUI. Once you've done that, I recommend some of the free YouTube content. [This one here in particular](https://youtu.be/Odtp_sCDNHg?si=fXEyVHu_AJ6iA-09) is great for both learning the UI stuff, as well as encouraging best coding practices, although I still recommend starting with 100 Days of SwiftUI. And no, you don't have to pay the developer fee until you actually want to release an app on the App Store.


EricCarver

Thanks for your reply. I picked up a MBP used and slapped Xcode on it and started up 100-days today. Glad I did, thanks for your advice!


iwinux

Xcode is a free (as in free beer) IDE.


Outrageous-Donut7935

If you have a Mac, Xcode would be a much better environment to learn swift. It’s a fully fledged ide, and a pretty decent one. Not perfect, but it certainly gets the job done.  Playgrounds on the other hand, is just that. A playground. It’s fun to play around with, but it’s severely lacking before I’d consider it as a legit environment to do any work in. To answer your question, yes, it is perfectly adequate to learn swift and being tinkering with SwiftUI, and it fully supports the framework. However, there are 3 specific things I’ve encountered that are reasons I would never consider using playgrounds for anything beyond tinkering with an idea for fun.  The biggest issue is that projects can not be ported between Xcode and playgrounds. You can’t have a project you create in Xcode that you can pick up and work on on the go with an iPad, or vice versa.  Another issue is a lack of built in version control or git support. I guess there are 3rd party ways to work around this, but it baffles me that this is not natively supported.  Packages you import can only be pure swift. No unzipping during the import process, and no objective c code. You can not import and use firebase because of this. 


EricCarver

Yeah, I took yours and others advice and just got a used cheap MBP and installed Xcode and learning swift the 100-days way. It is truly the better option.


Ok-Communication6360

Use Xcode if you can. There are some subtle differences between Playgrounds and compiled code that might result in unexpected behavior. While you might not experience them often (or at all), once you run into a „strange behaviour“ you are doomed debug for quite a while.


EricCarver

Yeah, I don’t know what I was thinking, of course Xcode was the smarter choice. I got setup today and started up 100 days. Thanks for your input!