r/SwiftProgramming

99 archived posts · Jun 2014 – May 2020

Random post

u/walkietokyo•

I know that applications written in Swift won't be accepted into the App Store until iOS 8 / OS X Yosemite is out, however I wonder how the code gets compiled...

I haven't looked much through the documentation yet but as far as I gather, it is natively compiled (even though it's written like a scripting language). However, does it need specific support from the OS?

What I'm getting at is basically if we will be able to compile our Swift apps to support previous versions of iOS and OS X? Has anyone found any indication either way?

I'm guessing no, but it would be sweet if we could keep backwards compatibility and it would also affect how soon I should start to look into the language.

*(

510

u/thatguyonthetrain•

I'm interested in having a hard bound copy of the manual for Swift printed, but it looks as if iBooks isn't really set up to allow printing (imagine that).

I've found one .pdf version of the manual here, but if I'm going to be paying to print out 466 pages of text (probably color, too) it's just gotta look better than that .pdf.

Before I break out a .pdf editor and begin the tedium of reformatting that file, does someone have a recommendation for me?

43


u/tehunceldolan•

I just bought a book to learn objective-c, but now swift has come out. Does anyone know if Apple's guide starts from the bottom or requires knowledge of objective-c? If so, should I start with swift or learn objective-c anyways?

310

u/jjquave•

I'm having some concerns about a few things in the language. So far it looks like almost everything is global. This can be solved by moving encapsulated objects in to functions, but it changes the thinking with developing iOS apps a bit. What are your thoughts?

Additionally, it seems like there's a lot of inferred types, using the var keyword. You can explicitly set a type but from interfacing with the Cocoa API I'm seeing a lot of 'AnyObject' objects, which I guess are something like ids.

32

u/nowforfeit•

So I started learning iOS programming and I finished a book on obj-c and now I'm working on Big Nerd Ranch's iOS 7 book (only 5 chapters in).

I know I should learn to program apps with obj-c eventually, but I'm also very interested in Swift (it appears to be easier than obj-c too). For a beginner programmer like me, what do you think is the best course of action now that Swift is out?

  1. Finish the book on building apps with Obj-C, ignoring Swift
  2. Learn both at the same time
  3. Switch to Swift and then learn making apps with Obj-C for deeper knowledge
38