Swift Development with Cocoa
Developing for the Mac and iOS App Stores
Publisher: O'Reilly Media
Final Release Date: December 2014
Pages: 474

Ready to build apps for iPhone, iPad, and Mac now that Swift has landed? If you’re an experienced programmer who’s never touched Apple developer tools, this hands-on book shows you how to use the Swift language to make incredible iOS and OS X apps, using Cocoa and Cocoa Touch.

Learn how to use Swift in a wide range of real-world situations, with Cocoa features such as Event Kit and Core Animation. You’ll pick up Swift language features and syntax along the way, and understand why using Swift (instead of Objective-C) makes iOS and Mac app development easier, faster, and safer. You’ll also work with several exercises to help you practice as you learn.

  • Learn the OS X and iOS application lifecycle
  • Use storyboards to design adaptive interfaces
  • Explore graphics systems, including the built-in 2D and 3D game frameworks
  • Display video and audio with AVFoundation
  • Store data locally with the file system, or on the network with iCloud
  • Display lists or collections of data with table views and collection views
  • Build apps that let users create, edit, and work with documents
  • Use MapKit, Core Location, and Core Motion to interact with the world
Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillySwift Development with Cocoa
 
4.2

(based on 5 reviews)

Ratings Distribution

  • 5 Stars

     

    (2)

  • 4 Stars

     

    (2)

  • 3 Stars

     

    (1)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

80%

of respondents would recommend this to a friend.

Pros

  • Concise (4)
  • Easy to understand (3)

Cons

    Best Uses

    • Intermediate (4)
      • Reviewer Profile:
      • Developer (5)

    Reviewed by 5 customers

    Sort by

    Displaying reviews 1-5

    Back to top

    (6 of 6 customers found this review helpful)

     
    5.0

    Return to form for O'Reilly books

    By Anthony

    from burlingame

    About Me Developer, Maker, Sys Admin

    Verified Reviewer

    Pros

    • Broad
    • Concise
    • Easy to understand
    • Helpful examples

    Cons

    • Broad

    Best Uses

    • Expert
    • Intermediate
    • Student

    Comments about oreilly Swift Development with Cocoa:

    Received this as an early Xmas present. Pleasantly surprised to find that the ebook covers a huge range of topics with a concise and informative style. Helpful to me to get back into software development on the Macintosh and the iPhone. The new Swift programming language is full of surprises and this book certainly helped. The code provided on GitHub was helpful.

    (8 of 8 customers found this review helpful)

     
    4.0

    Great intro to OS X/iOS dev with Swift

    By Jim S.

    from Richmond, VA

    About Me Developer

    Verified Reviewer

    Pros

    • Accurate
    • Concise
    • Easy to understand
    • Helpful examples
    • Well-written

    Cons

      Best Uses

      • Novice
      • Student

      Comments about oreilly Swift Development with Cocoa:

      I reviewed this book for O'Reilly and I really enjoyed it. I have a development background mostly in C#, Scala, and JavaScript; I was interested in this book to explore similarities between Swift and Scala.

      The book is useful and in-depth. I think beginners to OS X and iOS development will pick up a lot from reading the book. I read the early access version and found only a handful of typos, which is a great indicator for how well-written the final product will be.

      Like Etienne in a previous review, I found an issue with one of the topics conceptually. My issue was with the explanation of closures. If you're familiar with JavaScript, Ruby, or Python, you've likely already become intimate with the concept of closures. In the early access version of this book, closures are explained as: "From a code-writing perspective, the only real difference between functions and closures is that closures don't have parameter names, while functions do." The entire section seems to either miss the point of closures or not properly convey what a closure is to the reader. Closures are clearly defined on Apple's documentation (https://developer.apple.com/library/mac/documentation/Swift/Conceptual/Swift_Programming_Language/Closures.html), so readers should definitely follow up there to gain a better understanding of closures. What was missing in the section on Closures was that a 'closure' occurs when a function has a reference to members in the enclosing type and when that function gets passed around elsewhere, the enclosed references are still available. Closures are basically privately accessible data to a function that isn't lexically defined within the function's body. I felt like the chapter only explained a 'closure' as a function pointer or delegate that could be passed around as a self-contained executable block of code.

      Aside from my issue with the Closures section, I enjoyed the rest of the book. Topics are presented with an introduction, a hands-on walkthrough, and occasionally a follow-up discussion. This is one of few books that I worked through almost every example. The only thing I would have changed about the examples is that in some sections, the examples are self-contained and you could easily use the sections as a reference. In other sections, you're instructed to edit each subsequent example in-place of the previous example. This affects the user's ability to refer to each section as an ad hoc reference.

      I was impressed by the amount of ground covered in such a small amount of text. The book ends by quickly demonstrating how to write a command line utility, status menu item and preference pane in Swift. Although the examples there aren't hefty real world examples, they will get a beginner well on their way.

      I would have given the book 5 stars if it wasn't for the issue I had with the Closures section. I really enjoyed it and I'd recommend it for any OS X development newbie like myself. Having never written an application on an Apple platform, I can't say whether or not an intermediate or expert level developer will gain much from the book. I'd hope those levels would know how to use XCode, debug a program, and create a basic project.

      (3 of 9 customers found this review helpful)

       
      3.0

      Useful but lacking in details

      By Etienne

      from Ottawa, Canada

      About Me Developer

      Verified Reviewer

      Pros

      • Concise

      Cons

      • Difficult to understand
      • Incorrect Terminology
      • Not comprehensive enough

      Best Uses

      • Intermediate

      Comments about oreilly Swift Development with Cocoa:

      You have to commend this book for its terseness, but in doing so, it although skips a lot of important information. This is evidenced in the description of the Self keyword when compared to the one in Apple's Swift Guide:

      ---

      O'Reilly:

      Code that's in a method is able to access the properties of a class by using the self keyword, which refers to the object that's currently running the code.

      ---

      Apple:

      Every instance of a type has an implicit property called self, which is exactly equivalent to the instance itself. You use the self property to refer to the current instance within its own instance methods.

      In practice, you don't need to write self in your code very often. If you don't explicitly write self, Swift assumes that you are referring to a property or method of the current instance whenever you use a known property or method name within a method. This assumption is demonstrated by the use of count (rather than self.count) inside the three instance methods for Counter.

      The main exception to this rule occurs when a parameter name for an instance method has the same name as a property of that instance. In this situation, the parameter name takes precedence, and it becomes necessary to refer to the property in a more qualified way. You use the self property to distinguish between the parameter name and the property name.

      ---

      As you can see, there is a wealth of really important information here which is completely missed.

      The terseness also makes it difficult to understand certain concepts like Closures, notwithstanding the fact that the book actually doesn't employ the correct technical Swift terms in many cases.

      For instance, there's nary a mention of nested functions and function return types, even though the examples clearly make use of them.

      As for the more visual aspects of Cocoa, I would highly recommend video training instead. This book's explanations are missing visual references in such a way that you could only really understand them if you've programmed in Xcode before. They're not actually useful for anyone trying to learn this for the first time.

      (6 of 7 customers found this review helpful)

       
      5.0

      it's excellent ebook!

      By iNachox

      from Rosario,AR

      About Me Developer

      Pros

      • Concise
      • Easy

      Cons

        Best Uses

        • Intermediate

        Comments about oreilly Swift Development with Cocoa:

        This is excellent swift ebook!!!

        (6 of 6 customers found this review helpful)

         
        4.0

        Great Book

        By Wayne

        from Madison, AL

        About Me Developer

        Verified Buyer

        Pros

        • Easy to understand
        • Well-written

        Cons

          Best Uses

          • Intermediate

          Comments about oreilly Swift Development with Cocoa:

          As a disclaimer, I have not finished reading the book cover to cover yet. The parts I have finished have been really good. I'm much more familiar with iOS than OS X and the book does a good job of pointing out where things differ between the platforms.

          Displaying reviews 1-5

          Back to top

           
          Buy 2 Get 1 Free Free Shipping Guarantee
          Buying Options
          Immediate Access - Go Digital what's this?
          Ebook: $33.99
          Formats:  ePub, Mobi, PDF
          Print & Ebook: $43.99
          Print: $39.99