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.4

(based on 11 reviews)

Ratings Distribution

  • 5 Stars

     

    (7)

  • 4 Stars

     

    (2)

  • 3 Stars

     

    (1)

  • 2 Stars

     

    (1)

  • 1 Stars

     

    (0)

82%

of respondents would recommend this to a friend.

Pros

  • Concise (9)
  • Accurate (6)
  • Easy to understand (6)
  • Well-written (6)
  • Helpful examples (5)

Cons

    Best Uses

    • Intermediate (9)
    • Expert (5)
    • Student (3)
      • Reviewer Profile:
      • Developer (11)

    Reviewed by 11 customers

    Sort by

    Displaying reviews 1-10

    Back to top

    Previous | Next »

    (10 of 10 customers found this review helpful)

     
    5.0

    Best Cocoa book for existing programmers

    By Krit

    from Colorado

    About Me Developer

    Pros

    • Accurate
    • Concise

    Cons

    • Os X And Ios Coverage

    Best Uses

    • Expert
    • Intermediate
    • Student

    Comments about oreilly Swift Development with Cocoa:

    Happy to read this book. I've spent a long time buying all sorts of Cocoa books back in the Objective-C days and I did not want to buy this one after being burned so many times. I went ahead though and am very happy.

    Clear examples and very concise non nonsense writing style.

    (7 of 7 customers found this review helpful)

     
    5.0

    Indispensible guide for Swift

    By David

    from Netherlands

    About Me Developer

    Pros

    • Accurate
    • Concise
    • Well-written

    Cons

      Best Uses

      • Intermediate

      Comments about oreilly Swift Development with Cocoa:

      I am an old Pascal and C programmer. I enjoyed this book. It covers a lot of good material. Reminds me of the old Hillegass books. Great place to start if you're competent with another language and want to learn Swift.

      (11 of 11 customers found this review helpful)

       
      5.0

      Excellent book for programmers

      By Simon

      from Great Outdoors

      About Me Developer

      Verified Reviewer

      Pros

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

      Cons

        Best Uses

        • Expert
        • Intermediate
        • Novice

        Comments about oreilly Swift Development with Cocoa:

        I've been reading this book over the las 2 weeks and I felt compelled to post a review. I have been a customer of O'Reilly books all the way back to some of the original Perl tomes and I have only been disappointed on a mere handful of occasions. This book "Swift Development With Cocoa" was no exception. A fine book throughout.

        Starting with a thorough introduction to the Cocoa Development Tools, the book moves briskly (and concisely) to the Swift programming language and on to the structure of Macintosh and iPhone apps and then to concurrency, bezier paths, sprite kit (for games), scene kit (for 3D), audio and video playback, iCloud and storing things, documents, networking and beyond.

        I was particularly impressed by the clear and very succinct prose combined with the accessible and easy to read casual style of the writing. I am very happy that this book chooses to cover Macintosh as well as iPhone programming and such uncommon topics as command line applications and preference bars (it is the little things that count).

        I have been a C, C# and C++ programmer for more years than I care to remember. I have never used Xcode or Objective-C before but I felt that I knew my way around after a week with this book. Code on Github was very helpful as well.

        Very highly recommended as an excellent resource to build your knowledge and then keep around as a reference book long after.

        (1 of 11 customers found this review helpful)

         
        2.0

        Misleading and poor structure

        By Curtmantle

        from United Kingdom

        About Me Developer

        Verified Reviewer

        Pros

        • Includes Os X Development

        Cons

        • Conceptual Errors
        • Poor Structure

        Best Uses

          Comments about oreilly Swift Development with Cocoa:

          I am perhaps in the minority but I was disappointed with this book.

          I lost some confidence in the authors early on when I read the definition of the MVC design pattern which is either misleading or just plain wrong. It defines the model as a data repository and states that the controller contains business logic which is in contrast to the conventional definition of the pattern, including Apple's own definition in its Developer Library. Following the guidance of the authors would negate the whole point of MVC.

          I also thought the structure of the book was quite unconventional. Most books like this will introduce core concepts in the early stages then have specialised chapters later on in the book. But this book moves very quickly on to graphics, animation and even 3D which are specialised topics. The user only learns how to bind to a controller in Chapter 11 despite the authors describing the MVC pattern as "fundamental". Any developer not interested in graphics might jump immediately to this chapter but would be left wondering what core concepts have been missed in the graphics chapters.

          I've read better introductions to Swift and I've found it more useful to read existing Objective-C based books on Cocoa to learn the fundamentals of developing OS X applications.

          Finally, I found the lack of reference to C# conspicuous. There are regular mentions of C, C++ and Java but not a single mention of C#. Even the designers of Swift have noted that C# was an influence and there are some concepts which are identical and even called the same thing, but it's like the authors can't bring themselves to mention the Microsoft created language. Maybe it's innocent... maybe not.

          (10 of 11 customers found this review helpful)

           
          5.0

          Great book

          By marko

          from Beograd

          About Me Developer

          Pros

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

          Cons

            Best Uses

            • Expert
            • Intermediate

            Comments about oreilly Swift Development with Cocoa:

            I liked this book because it didn't just tell you what to do and how, it explained the reasoning behind it so you really understand the concepts. The example code was very clear and well commented too.

            (15 of 15 customers found this review helpful)

             
            5.0

            Massive book with a lot of topics

            By Betsy

            from Mildura

            About Me Developer

            Verified Reviewer

            Pros

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

            Cons

            • Broad

            Best Uses

            • Expert
            • Intermediate

            Comments about oreilly Swift Development with Cocoa:

            This felt like a cookbook but isn't marketed as one. I am very much enjoying this book though.

            It jumps between Mac and IOS topics a lot, and covers a huge amount of ground for both Cocoa and Cocoa for iOS as well as Swift itself. It does it in a concise and clear manner and with a fair amount of humour.

            I recommend this book if you are trying to learn Swift after moving from another programming series. After seeing "Learning Cocoa" videos by the same people (I think) I would enjoy a video series based on this book too.

            (15 of 15 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.

            (13 of 13 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.

              (4 of 15 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.

              (12 of 13 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!!!

                Displaying reviews 1-10

                Back to top

                Previous | Next »

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