Big Nerd Ranch Logo • • •
  • work
  • team training
  • bootcamps
  • books
  • screencasts
  • resources
  • blog
  • work
  • team training
  • bootcamps
  • books
  • screencasts
  • resources
  • blog

Blog Category: iOS | Big Nerd Ranch

  • ALL POSTS
  • iOS
  • ANDROID
  • FRONT-END
  • BACK-END
  • MAC
  • DESIGN
  • CLIENTS
  • LEVELING UP
  • RANCH NEWS
  • STUDENTS
  • LEADERSHIP
  • Nick Teissler
    It Looks Like You're Still Trying to Use a Framework
    Nick Teissler iOS | Mac
    Jan 8, 2019

    Build a framework on the command line to gain an understanding of build errors and Swift and Objective-C interoperability.

    read more
  • Chris Guzman
    To 2019, and beyond!
    Chris Guzman Android | Front-End | iOS | Leveling Up | Mac
    Jan 1, 2019

    Every year brings changes in tech. Here are some of the things I’m excited to learn more about in 2019.

    read more
  • Jeremiah Jessel
    Mocking With Protocols in Swift
    Jeremiah Jessel iOS
    Dec 18, 2018

    Let’s get right to it. You need to test your code, and you need to test it often. You do a lot of manual testing throughout the development process, find bugs, and fix them. While this can be very beneficial, it leaves much of the code untested. When I say untested, I mean untested by you. The code will be tested at some point, it just might be by one of your users. This is where writing automated unit tests comes in, however, it is often the last thing developers do, if at all. Where do you start? How do you make this class testable? Many of these challenges can be overcome by using protocols to mock our objects in testing.

    read more
  • Andrew Fitzpatrick
    Adding External Display Support To Your iOS App Is Ridiculously Easy
    Andrew Fitzpatrick iOS
    Nov 27, 2018

    Apple made a big splash this week with the new iPad Pro. In the promo videos, they’ve shown off using the USB-C port to connect the iPad to an external display for creative tasks. This is a feature that few people know already exists on all iOS devices. You can connect an external display via a lightning adapter or AirPlay Screen Mirroring to an Apple TV.

    read more
  • Nicholas Ollis
    Custom filters with Core Image Kernel Language
    Nicholas Ollis iOS
    Nov 5, 2018

    We run a CI Kernel on a single pixel at a time and be returning a modified pixel. For the syntax, the Core Image Kernel Language essentially sits on top of the OpenGL Shading Language so it’ll have a bit different rules to what we would see from Swift of Objective-C

    read more
  • Jared Sinclair
    Migrating to Unified Logging, Swift Edition
    Jared Sinclair iOS | Mac
    Sep 18, 2018

    Thinking of migrating your iOS or macOS app from a bunch of NSLog or print statements to the new(ish) Unified Logging system? Read this for some facts and tidbits that might surprise you, along with a few suggestions for how to make the most of your transition.

    read more
  • Nick Teissler
    Pro Pattern-Matching in Swift
    Nick Teissler iOS | Mac
    Aug 21, 2018

    The switch statement is an indubitable strength of the Swift language. Behind the switch statement is Swift’s pattern-matching, which makes for more readable, safer code. It is possible to take the switch’s pattern-matching readability and power and apply it elsewhere in your code.

    read more
  • Dan Berry
    Life in Technicolor
    Dan Berry iOS | Mac
    Aug 7, 2018

    Color is a fundamental and important aspect of app development. It helps identify brand, evokes emotion, and can even help us determine things like whether or not a button can be interacted with. See how to use the latest SDK enhancements to make working with color in your apps a breeze.

    read more
  • Mark Dalrymple
    Core Graphics, Part 3: Lines
    Mark Dalrymple iOS | Mac
    Jul 10, 2018

    Consider the humble line—just a straight sequence of pixels connecting two points. There are well-known algorithms you can use to do your own drawing, but these days, we have toolkits to do the hard work.

    read more
  • Mark Dalrymple
    Core Graphics, Part 2: Contextually Speaking
    Mark Dalrymple iOS | Mac
    Jul 2, 2018

    You need to interact with the current Core Graphics context in some manner to actually draw stuff, so it’s good to get comfortable with it, what it does, and why it’s there.

    read more
  • Jeremy Sherman
    Producing a CircleCI Test Summary with Fastlane
    Jeremy Sherman iOS
    Jun 26, 2018

    The heart of Continuous Integration is running tests. Whenever a test fails, you want to know why ASAP so you can correct it. Whenever a CI build fails, you want to see that failing test and how it failed.

    CircleCI’s Test Summary feature puts this info front-and-center so you can respond directly to the test failure without anything getting in your way. The trick is to feed CircleCI your test info the way it expects.

    read more
  • Zachary Waldowski
    Apple’s Password-Less Future Is Strong Passwords
    Zachary Waldowski Mac | iOS
    Jun 12, 2018

    Passwords are the worst way to authenticate users, except for all the other ways we’ve tried. In their 2018 software updates, Apple embraces the status quo by providing their users with new defaults aimed at safety and convenience.

    read more
  • Matthew Strickland
    WWDC18 - What does today mean for your Engineering Team?
    Matthew Strickland Mac | iOS
    Jun 11, 2018

    The eyes of the world are on San Jose as thousands of developers, including half a dozen nerds, gathered for Apple’s annual World Wide Developer Conference. This year’s announcements did not feature any hardware updates but there were several software updates that you will want to keep your eye on. Let’s take a quick look at a few updates your engineering team will want to be aware of in the months ahead for Siri, CoreML, ARKit, and Swift. Finally, let’s also take a glance at a major opportunity in 2019 for bringing your iOS App to macOS with a few musings from yours truly.

    read more
  • Michael Williams
    ARKit 2: Bringing richer experiences through collaboration, enhanced detection, and greater realism
    Michael Williams iOS
    Jun 6, 2018

    At WWDC 2018, Apple continued to push the envelope with ARKit by releasing ARKit 2. Late in 2017, Apple released ARKit 1, which allowed users to place 3D objects in the real world. This technology was showcased by companies like Ikea who allowed users to try out furniture in their homes. A few months later, Apple released ARKit 1.5. This release gave users the ability to detect not only horizontal planes like the floor of their homes, but also their walls. In addition to vertical plane detection, Apple added Image Recognition, which allowed users to detect images and paintings just by pointing their phones at them. At WWDC 2018, Apple introduced enhancements to face tracking, as well as the following new features: saving and loading maps, environmental texturing, image tracking, and object detection.

    read more
  • Juan Pablo Claude
    WWDC 2018: Opening Day. Augmented Reality, Machine Learning, and Siri Shortcuts
    Juan Pablo Claude iOS | Mac
    Jun 5, 2018

    WWDC 2018 began this week in San José, CA, with the usual excitement of thousands of developers from all over the world that could not wait to learn what new shiny objects Apple would unveil for them. The expectant developer community was not disappointed. Even though the announcements were largely evolutionary and no new hardware of any kind was unveiled, the enhancements to all four platforms (iOS, macOS, watchOS, tvOS) and the development tools were many, and hint at big things to come.

    read more
  • Mark Dalrymple
    Core Graphics, Part 1: In the Beginning
    Mark Dalrymple iOS | Mac
    Mar 6, 2018

    Core Graphics, also known by its marketing name “Quartz,” is one of the oldest graphics-related APIs on the platforms. Quartz forms the foundation of most things 2-D. Want to draw shapes, fill them with gradients and give them shadows? That’s Core Graphics. Compositing images on the screen? Those go through Core Graphics. Creating a PDF? Core Graphics again.

    read more
  • Mark Dalrymple
    Digging into the Swift compiler: Nerdcamp is the Shovel
    Mark Dalrymple iOS
    Jan 30, 2018

    Learn how to be more proficient with Swift by using the Compiler. Big Nerd Ranch shares lessons learned from nerdcamp.

    read more
  • Nick Teissler
    It Looks Like You Are Trying to Use a Framework
    Nick Teissler iOS | Mac
    Jan 19, 2018

    Take a deep dive into the internals of iOS frameworks and learn how to best use (and not use) frameworks for cleaner, faster code and debugging.

    read more
  • Charles Brian Quinn
    The Frontier by Big Nerd Ranch: Screencasts for Developers
    Charles Brian Quinn iOS | Android
    Jan 2, 2018

    Big Nerd Ranch’s newest offering is officially live. The Frontier is a screencast series built to advance your iOS or Android skills with expert instructors, on your time and at your pace. I’ll share a little bit more on why we created The Frontier.

    read more
  • Daniel Ra
    How Android Expert Kristin Marsicano Stays Ahead Of The Game
    Daniel Ra iOS | Android | Leveling Up
    Oct 25, 2017

    One thing that sets Big Nerd Ranch instructors apart is we consider ourselves students first. That’s definitely the case with Kristin Marsicano, whose passion for learning and asking questions has solidified her as an Android expert in a few short years. Her advice to all her fellow programmers out there might surprise you.

    read more
  • Aaron Hillegass
    Introducing: The Frontier
    Aaron Hillegass iOS | Android
    Oct 13, 2017

    Big Nerd Ranch was founded on the idea that developers learn best when immersed in a distraction-free environment. Today I want to talk to you about a new path to advance your skills; one that doesn’t look like anything we’ve offered before.

    read more
  • John Daub
    SiriKit Part 4: Custom UI
    John Daub iOS
    Oct 11, 2017

    Siri is Apple’s intelligent personal assistant. Siri allows you to use your voice to interact with your iOS, watchOS, tvOS, and macOS devices. This series explores SiriKit and how you can use it to expose your app’s functionality through Siri. Part 4 shows how to enhance and brand your app’s Siri experience by adding a custom UI.

    read more
  • John Daub
    SiriKit Part 3: Finishing Touches
    John Daub iOS
    Oct 3, 2017

    Siri is Apple’s intelligent personal assistant. Siri allows you to use your voice to interact with your iOS, watchOS, tvOS and macOS devices. This series explores SiriKit and how you can use it to expose your app’s functionality through Siri. Part 3 continues the exploration, focusing on those final details needed to ship your Siri-enabled iOS app.

    read more
  • Robert Edwards
    Everything You Need to Know About Ruby for iOS Development
    Robert Edwards iOS
    Oct 2, 2017

    On iOS projects, we often find ourselves using command-line tools for testing and distributing our apps. More often than not, these tools were written in Ruby. In this post, we will give you a solid understanding of each step in the Ruby toolchain so you can confidently set up a consistent environment for your development team.

    read more
  • John Daub
    SiriKit Part 2: Resolve, Confirm, Handle
    John Daub iOS
    Sep 28, 2017

    Siri is Apple’s intelligent personal assistant. Siri allows you to use your voice to interact with your iOS, watchOS, tvOS and macOS devices. This series explores SiriKit and how you can use it to expose your app’s functionality through Siri. Part 2 explains the heart of SiriKit: Resolve, Confirm and Handle.

    read more
  • John Daub
    SiriKit Part 1: Hey Siri, How Do I Get Started?
    John Daub iOS
    Sep 19, 2017

    Siri is Apple’s intelligent personal assistant. Siri allows you to use your voice to interact with your iOS, watchOS, tvOS, and macOS devices. This series explores SiriKit and how you can use it to expose your app’s functionality through Siri. Part 1 explains the basics of SiriKit and how to add it to your iOS app.

    read more
  • Zack Simon
    iPhone X: Designing for the Notch
    Zack Simon iOS | Design
    Sep 18, 2017

    The unveiling of the iPhone X has confirmed the existence of the top “notch” or sensor housing. While this seems purely aesthetic, there are a few things to consider when designing around this sensor housing in both portrait and left/right landscape orientations.

    read more
  • Joseph Dixon
    Working with the Files App in iOS 11
    Joseph Dixon iOS
    Sep 14, 2017

    One of Apple’s showcase features is the new Files app, which allows users to manage files stored locally and in iCloud. In this post, we learn how your app can take advantage of this cool new feature.

    read more
  • John Daub
    Get Your Apps Ready for iPhone X
    John Daub iOS
    Sep 13, 2017

    Apple’s new iPhone X changes the landscape (pun intended) for iOS developers. There are things you need to do to ensure your app continues to look stunning on iPhone X display. Discover what you need to do to get your app updated.

    read more
  • Nick Teissler
    Custom Collection View Layouts with tvOS: Part 2
    Nick Teissler iOS
    Aug 22, 2017

    Develop more intuitive and creative tvOS apps by adding animation and custom focus behaviors. This tutorial walks you through controlling focus between a split view controller and animating the custom collection view layout from part 1.

    read more
  • Jeremy Sherman
    Why Associated Type Requirements Become Generic Constraints
    Jeremy Sherman iOS
    Aug 17, 2017

    Swift protocols can have associated types, which makes them more powerful than Objective-C protocols. It also makes them more complicated. In this post, learn how Swift protocols balance power and complexity. See an example of code that uses a protocol with associated type, then understand why it has to be generic.

    read more
  • Zachary Waldowski
    Accessibility Stories: Interfaces Are for Everyone
    Zachary Waldowski iOS | Leveling Up | Clients
    Aug 10, 2017

    WWDC 2017’s Design for Everyone challenges developers to work for all our users. This post will teach you to rise to the challenge through concrete examples of accessible design. The examples I list are iOS-specific, but the ideas aren’t—developers across all platforms should keep accessibility in mind.

    read more
  • Zack Simon
    Improve Usability in Your iOS App with These Features
    Zack Simon iOS | Design | Clients
    Aug 2, 2017

    Year after year, Apple rolls out platform features that greatly improve usability when they’re used correctly. Unfortunately, many apps that have been around for awhile still don’t take advantage of these features. With the release of iOS 11 on the horizon, now is the perfect time to start incorporating them. To help you along, I’ve listed out some under-used features and reasons why your users will thank you for using them in your app.

    read more
  • Steve Sparks
    tvOS Games, Part 4: Bullets and Explosions
    Steve Sparks iOS
    Jul 31, 2017

    In Part 4 of our series on tvOS game development, we add the important stuff: Bullets! Explosions! Death! Carnage! We’ll discover how to create a bullet and then detect when it hits something.

    read more
  • Amit Bijlani
    Getting Started with Deferred
    Amit Bijlani iOS
    Jul 17, 2017

    At Big Nerd Ranch, our iOS team has created a library called Deferred to help you work with values that have not yet been determined. Here’s how to use it to your advantage and incorporate it into your apps.

    read more
  • David House
    Improvements to Motion Effect in tvOS 11
    David House iOS
    Jul 10, 2017

    Last time, we talked about 10 Tips for Mastering the Focus Engine on tvOS, and this time we’re diving into a new API that comes with tvOS 11. Included in the tvOS 11 changes is a new property on UIImageView that we can use to extend the motion effect to more than just the image itself.

    read more
  • Nick Teissler
    Custom Collection View Layouts with tvOS: Part 1
    Nick Teissler iOS
    Jul 3, 2017

    The tvOS focus engine and collection views can bring a robust and interactive control to the television screen, but to design any layout that is non-linear, you will need to create a custom layout. In this post, we’ll create a custom control for a tvOS app to show how to create a custom layout in the shape of a circle.

    read more
  • Jade Hill
    Why You Should Update Your iOS and Android Apps Before Launch Day
    Jade Hill iOS | Android | Clients
    Jun 28, 2017

    With iOS 11 and Android O launching later this year, you may be curious as to whether or not you should spend the money updating your apps. The answer is a resounding yes. Here’s why.

    read more
  • Steve Sparks
    tvOS Games, Part 3: Animations
    Steve Sparks iOS
    Jun 27, 2017

    In Part 3 of our series on tvOS game development, we add some animations to our sprites. Learn how to customize your own characters by using Aseprite and then make them move.

    read more
  • Zack Simon
    Think Bigger: Design Changes in iOS 11
    Zack Simon iOS | Design
    Jun 20, 2017

    Recent versions of iOS have reimagined the design for several of Apple’s platform apps, with big titles, rounded card-like UI and filled buttons. Apple pushes these changes even further in iOS 11 by making them the norm for the platform, which means that it is time to reevaluate your apps to ensure that they conform with the new design language.

    read more
  • Matt Mathias
    Machine Learning in iOS Using Core ML
    Matt Mathias iOS
    Jun 12, 2017

    Core ML is an exciting new framework that makes running various machine learning and statistical models on macOS and iOS feel natively supported. In this tutorial, learn to create a linear regression model in Python and convert it to a format that Core ML understands.

    read more
  • Jade Hill
    Big Nerd Ranch Named Top iOS App Development Company
    Jade Hill iOS | Ranch News | Clients
    Jun 12, 2017

    mobbed.io recently chose Big Nerd Ranch as a top company on its “20 Best iOS Development Companies in the World” list.

    read more
  • Mikey Ward
    New HEVC & HEIF Media Formats: What You Need to Know
    Mikey Ward iOS
    Jun 8, 2017

    Once again, Apple is bringing to the table some new image and video formats to push the platform forward by saving you storage space, bandwidth and computation time. Here’s the short version.

    read more
  • Michael Williams
    WWDC 2017: Implementing Apple's Drag and Drop
    Michael Williams iOS
    Jun 8, 2017

    One of the objections to the iPad becoming a mainstream productivity device is the lack of seamless interplay between apps. With the addition of drag and drop, Apple has once again pushed the iPad forward as a strong contender in the productivity space.

    read more
  • Mohammad Asgharneya
    WWDC 2017: Large Titles and Safe Area Layout Guides
    Mohammad Asgharneya iOS
    Jun 7, 2017

    iOS 11 added a property to UINavigationItem that can enable a large out-of-line title in the navigation bar. Here’s how to take advantage of it.

    read more
  • Gabe Hoffman
    WWDC 2017: Helping You Get Things Done
    Gabe Hoffman iOS
    Jun 6, 2017

    At this year’s Worldwide Developers Conference (WWDC), we saw the continued evolution of Apple’s offerings. Pundits may say these changes aren’t revolutionary enough, but we’re excited about a number of refinements.

    read more
  • Jeremy Sherman
    Throws Helps Readability
    Jeremy Sherman iOS
    Jun 5, 2017

    The correct answer to “throws or Result?” is a loud BOTH! Learn to make the best of these tools to write clear, maintainable a/sync code through a worked example.

    read more
  • Steve Sparks
    tvOS Games, Part 2: SpriteKit Goes Retro
    Steve Sparks iOS
    May 23, 2017

    In Part 2 of our series on tvOS game development, we begin laying out our game. In this instance, we’ve created a clone of the 1981 Willams arcade classic Robotron: 2084.

    read more
  • Steve Sparks
    tvOS Games, Part 1: Using the Game Controller Framework
    Steve Sparks iOS
    Apr 28, 2017

    If you want to write a game for tvOS, it starts with understanding what the controllers can do for you. In the first of a five-part series, Steve Sparks takes you through the Game Controller framework.

    read more
  • Gabe Hoffman
    Making Accessibility More Accessible, Part 2
    Gabe Hoffman iOS | Leveling Up
    Apr 24, 2017

    Making your apps accessibile is hard work, especially when dealing with Accessibility Traits. Discover a straightforward way of handling it, and then another more creative solution to make it more Swifty.

    read more
  • Gabe Hoffman
    Making Accessibility More Accessible, Part 1
    Gabe Hoffman iOS | Leveling Up
    Apr 19, 2017

    Technology should be accessible to everyone. Apple has worked hard to make it easier to support Accessibility. Here’s some tips on how to support it.

    read more
  • David House
    10 Tips for Mastering the Focus Engine on tvOS
    David House iOS
    Mar 28, 2017

    Applications that run on the Apple TV present an entirely new method of interaction compared to mobile and desktop applications. Instead of directly interacting with the device, a user uses the remote to indirectly control it.

    read more
  • Jeremy Sherman
    Build Log Groveling for Fun and Profit, Part 2: Even More Manual Swift
    Jeremy Sherman iOS
    Mar 22, 2017

    In my last post, you learned how the compiler compiles the source files. This time around, you’ll see how everything is pulled together.

    read more
  • Jeremy Sherman
    Build Log Groveling for Fun and Profit: Manual Swift Continued
    Jeremy Sherman iOS
    Mar 15, 2017

    Manual Swift: Understanding the Swift/Objective-C Build Pipeline walked you through the high-level view of how Objective-C gets access to Swift code. Today, we’re going to see what that looks like in practice by examining Xcode build logs.

    read more
  • Mark Dalrymple
    Core Graphics, Part 4: A Path! A Path!
    Mark Dalrymple iOS | Mac
    Feb 27, 2017

    In Core Graphics, a path is a step-by-step description of some kind of shape. It could be a circle, a square, a valentine heart, a word frequency histogram or maybe a happy face.

    read more
  • Aaron Hillegass
    You Need a tvOS App
    Aaron Hillegass Clients | iOS
    Feb 7, 2017

    If current trends continue, most babies born today will never own a laptop or a desktop computer. They will carry a smart phone, and at home they will have a streaming device connected to their TV. That streaming device will run apps. And that leads us to why your company needs a tvOS app.

    read more
  • Josh Justice
    Refactoring to Clarity in Swift
    Josh Justice iOS
    Jan 23, 2017

    The first point of the Swift API Design Guidelines is that “clarity at the point of use is your most important goal.” What does it look like to put that goal into practice? I found an answer recently while writing some integration tests. My test code started out difficult to follow, but by working on its clarity one step at a time, I ended up with an API I love. Let’s take a look at the process I went through to see what it looks like to improve the clarity of your code.

    read more
  • Steve Sparks
    Monetizing Your Apps with Apple's In-App Purchases
    Steve Sparks iOS
    Jan 20, 2017

    It’s hard monetizing your apps, and as much as Apple has done to make in-app purchasing (aka IAP) easy, it’s still not easy. The code is the easy part. There are a bunch of things to get straight before we even get to the code. Today we’re going to walk through the process from start to finish.

    read more
  • Robert Edwards
    Breaking Down Type Erasure in Swift
    Robert Edwards iOS
    Jan 6, 2017

    As a fan of strongly typed programming languages, I love relying on the type system to catch common mistakes and typos early. Occasionally though we want to relax the strict rules to gain the payoff of flexibility over safety. Just like you use a rubber eraser to remove written material, we can use a concept known as Type Erasure to remove type information from our programs.

    read more
  • Matt Mathias
    Server-Side Swift with Vapor
    Matt Mathias iOS
    Dec 2, 2016

    Swift on the server is an exciting application of the language. In this post, we’ll take a look at a popular framework to get a flavor for Swift web development.

    read more
  • Jeremy Sherman
    Manual Swift: Understanding the Swift/Objective-C Build Pipeline
    Jeremy Sherman iOS | Leveling Up
    Nov 29, 2016

    Every build pipeline is an opportunity for leaks and stoppages. Understanding how all the bits come together to make a functioning app helps you to plumb your way through these problems. So… How exactly does Swift and Obj-C all turn into one app?

    read more
  • Mark Dalrymple
    Articulation Accents
    Mark Dalrymple iOS | Leveling Up
    Nov 21, 2016

    Is it possible to ask a question that leads you directly to fixing a bug? If so, how do you find those questions to ask them?

    read more
  • Matt Mathias
    Using Swift Enumerations Makes Segues Safer
    Matt Mathias iOS
    Nov 11, 2016

    Swift style encourages developers to use the compiler to their advantage, and one of the ways to accomplish this is to leverage the type system. In many cases, doing so can feel fairly obvious, but working with UIKit can be challenging since it often hands you String instances to identify view controllers, storyboards and so on. We have received some guidance on this issue in the form of a WWDC session in 2015, but it’s a good idea to revisit the problem to continue our practice of thinking Swiftly.

    read more
  • Josh Justice
    A Rubyist's Perspective on Testing in Swift
    Josh Justice iOS | Back-End
    Oct 24, 2016

    I took a week-long hacking vacation (“hackcation”?) to start an iOS app side project. I learned testing in Ruby, which is known for the maturity of its testing tools and practices, and I was interested to see how they applied in the context of Swift. After a week, here are some of my impressions.

    read more
  • Jade Hill
    Big Nerd Ranch Alumnus Releases Second App in App Store
    Jade Hill Students | iOS
    Oct 20, 2016

    Chris Hepworth is an alumnus of the iOS Essentials with Swift bootcamp here at Big Nerd Ranch who recently released his second app in the App Store. Since we love to showcase alumni success, we interviewed him about his career path, his experience at Big Nerd Ranch, and his two complete apps.

    read more
  • Bolot Kerimbaev
    ConstraintLayout vs Auto Layout: How Do They Compare?
    Bolot Kerimbaev Android | iOS
    Oct 7, 2016

    ConstraintLayout and Auto Layout use the same underlying algorithm. How do they differ?

    read more
  • David House
    Video: Cleaning Up Messy Chaining in Swift
    David House iOS
    Oct 5, 2016

    Swift allows for chaining methods together to perform powerful operations in a single line of code. If you aren’t careful, however, this can lead to code that is difficult to read and maintain. In this video, I’ll show you some approaches to make this more clean and manageable.

    read more
  • Jeremy Sherman
    Prefer Bare Enum Tags When That's All You Need
    Jeremy Sherman iOS
    Oct 5, 2016

    Swift’s destructuring case statements are cool. But when you don’t care about the associated data at all, go with case .tag: rather than case .tag(_, _):. Here’s why.

    read more
  • Jeremy Sherman
    What Use are Swift Access Modifiers?
    Jeremy Sherman iOS | Mac
    Sep 22, 2016

    If you’re writing Swift apps and not Swift frameworks, do Swift’s access modifiers even matter, or are they just a big distraction?

    read more
  • Aaron Hillegass
    Use TensorFlow and BNNS to Add Machine Learning to your Mac or iOS App
    Aaron Hillegass iOS | Mac
    Sep 20, 2016

    Should you use BNNS or TensorFlow to add artificial intelligence to your iOS or Mac app? The answer is… both.

    read more
  • Mark Dalrymple
    Dude, Where's my Call?
    Mark Dalrymple Mac | iOS
    Aug 17, 2016

    Imagine that one day you’re feeding some innocuous looking code to a Swift compiler, and then you get a smackdown of an error. Where’d it go? It got renamed.

    read more
  • Jade Hill
    Video: Cross-Platform Game Templates in Xcode 8
    Jade Hill iOS
    Aug 9, 2016

    It’s been possible to write cross-platform SpriteKit code, but you had to build all the boilerplate yourself. The new Xcode 8 Beta 3 includes a new project template for cross-platform games, saving many hours of repetitive setup. In this video, Steve Sparks walks through the structure of the template and shows you how to start creating your own.

    read more
  • Zack Simon
    tvOS Design: Use Case Considerations
    Zack Simon Design | iOS
    Jul 19, 2016

    Designing meaningful products for Apple TV requires taking into account many more additional factors than when designing for a mobile device. To prepare for this, here are some considerations when designing your app for tvOS.

    read more
  • Mark Dalrymple
    Hannibal #selector
    Mark Dalrymple Mac | iOS
    Jul 7, 2016

    The selector is key to Objective-C’s dynamic runtime nature. It’s just a name that’s used, at runtime, as a key into a dictionary of function pointers. Whenever you send a message to an Objective-C object, you’re actually using a selector to look up a function to call. Sometimes selectors bubble up in Cocoa/CocoaTouch API, and you will need to deal with them in Swift.

    read more
  • Bolot Kerimbaev
    Neural Networks in iOS 10 and macOS
    Bolot Kerimbaev iOS | Mac
    Jun 29, 2016

    Apple has been using machine learning in their products for a long time—Siri answers our questions and entertains us, iPhoto recognizes faces in our photos, Mail app detects spam messages.

    As app developers, we have access to some capabilities exposed by Apple’s APIs such as face detection, and starting with iOS 10, we’ll gain a high-level API for speech recognition and SiriKit.

    read more
  • Steve Sparks
    Crowns and Sprites in WatchOS 3
    Steve Sparks iOS
    Jun 22, 2016

    It’s been a bit over a year since we got the Apple Watch, and right at a year since we got watchOS 2. Back then, we were excited to be given a way to interact with the digital crown. You created a WKInterfacePicker in IB, filled it with picker items, and it would react to the crown for you. It was usable, but limited. It required you to give up screen space, even though you could make it invisible.

    read more
  • Matt Mathias
    WWDC 2016: Increased Safety in Swift 3.0
    Matt Mathias iOS | Mac
    Jun 16, 2016

    Swift 3.0 changes the semantics of ImplicitlyUnwrappedOptional, and is even safer than its previous incarnations. What has changed in Swift 3.0 for this type that improves the language’s safety? The answer has to do with improvements in how the compiler infers type information for ImplicitlyUnwrappedOptional.

    read more
  • Mark Dalrymple
    WWDC 2016: A Quick Look at APFS
    Mark Dalrymple iOS | Mac
    Jun 16, 2016

    WWDC 2016. New Notification Center features? Eh. Bouncy sticker graphics giant emoji in Messages? Blah. New file system? OMG. Apple File System. APFS. NEW FILE SYSTEM!. That wasn’t on any Rumor Radar that I had seen.

    read more
  • Step Christopher
    WWDC 2016: Developer Reading List
    Step Christopher iOS | Mac
    Jun 15, 2016

    With the advent of WWDC comes a lot of new information. Don’t want to wait for the WWDC 2016 videos? Start with our list of recommended reading.

    read more
  • Step Christopher
    WWDC 2016: Continued Maturation, More Monetization
    Step Christopher iOS | Mac | Clients
    Jun 13, 2016

    As I type, Apple’s yearly developer conference, WWDC 2016, is in full swing. The keynote can be watched via Apple TV and their website, or you can catch summaries and highlights on every site that covers Apple’s doings.

    read more
  • Jeremy Sherman
    Creating a Custom XCTest Assertion
    Jeremy Sherman Mac | iOS
    May 24, 2016

    Apple’s bundled test framework XCTest provides a very limited, general collection of assertions. These get the job done much of the time, but sometimes they’re not the right tool to communicate what you’re actually checking. That’s when it’s useful to know how to write custom assertions that clearly express what you are truly checking for without getting lost in a maze of little this-that-and-that assertions.

    read more
  • Matt Mathias
    Protocol-Oriented Problems and the Immutable 'self' Error
    Matt Mathias Mac | iOS
    Apr 29, 2016

    Protocol-oriented programming leverages Swift’s features in a powerful way, but there are practical concerns, like whether you want both value types and reference types to be able to conform, limiting the application and usability of a given protocol. This post provides an example where the developer may want to make this limiting choice, elucidates the tensions in making the decision, and discusses some strategies in moving forward.

    read more
  • John Gallagher
    Building an iOS App in Rust, Part 4: A Basic View Model in Rust
    John Gallagher iOS
    Apr 14, 2016

    Welcome to Part 4 of the “Let’s Build an iOS App in Rust” series. We’ll continue to build on the tools and techniques we explored in the first three parts, creating a basic view model in Rust.

    read more
  • Matt Mathias
    Introducing Freddy, an Open-Source Framework for Parsing JSON in Swift
    Matt Mathias iOS
    Jan 31, 2016

    Parsing JSON can be tricky, but it shouldn’t be. We think parsing JSON should feel like writing regular Swift code, so we’ve introduced Freddy, a new open-source framework for parsing JSON in Swift.

    read more
  • Mark Dalrymple
    Hi! I'm #available!
    Mark Dalrymple iOS | Mac
    Jan 19, 2016

    As app developers, we don’t have the luxury of shipping our software exclusively on the latest-and-greatest OS version. We want to use the new shiny toys, but we also need to be able to work on older versions of the OS that don’t have these features. Swift 2.0 introduced a new language construct, #available, that helps solve the problems that crop up when your app needs to support multiple versions of iOS or OS X.

    read more
  • John Gallagher
    Building an iOS App in Rust, Part 3: Passing Owned Objects between Rust and iOS
    John Gallagher iOS
    Dec 3, 2015

    In Part 3 of our “Building an iOS App in Rust” series, we’ll cover how to pass much more complex data than strings, and how to correctly and safely manage the ownership of that data.

    read more
  • Pouria Almassi
    Inspecting Auto Layout with the Cocoa Layout Instrument
    Pouria Almassi iOS
    Oct 10, 2015

    In previous posts, MarkD delved into many of the diagnostic tools available to us in Instruments, such as the Time Profiler and the Energy Diagnostics template. In that same vein, I’ll provide an overview of the Cocoa Layout Instrument.

    read more
  • Robert Edwards
    Introducing the Open-Source Big Nerd Ranch Core Data Stack
    Robert Edwards iOS | Mac
    Sep 18, 2015

    When we at the Ranch use Core Data, we inevitably end up using it in a multi-threaded environment. The Right Way™ to use Core Data across multiple threads is a topic of fierce debate, one that we had ourselves when we set out to create a shared Core Data stack.

    read more
  • Jeremy Sherman
    UI Testing in Xcode 7, Part 1: UI Testing Gotchas
    Jeremy Sherman iOS
    Sep 13, 2015

    UI testing is testing via the user interface. This is nothing new; we do it all the time, manually, by running an app and tap-tapping through its UI. But manually testing for regressions is dull. This is why we have computers, right?

    read more
  • John Gallagher
    Building an iOS App in Rust, Part 2: Passing Primitive Data Between Rust and iOS
    John Gallagher iOS
    Aug 21, 2015

    Last time, we built a simple “Hello, World!” library in Rust and successfully linked it into an iOS app. This time, we’re going to explore more of Rust’s FFI, or foreign function interface, layer. The Rust book has an excellent chapter on Rust’s FFI facilities; however, it is almost exclusively about how to call C libraries from Rust, whereas we want to go the other direction and call Rust from Swift.

    read more
  • Matt Mathias
    Swift 2.0 Error Handling
    Matt Mathias iOS | Mac
    Jul 16, 2015

    As my fellow Nerd Juan Pablo Claude pointed out in his post on Error Handling in Swift 2.0, the latest iteration of Swift introduces many features, and a new native error handling model is notable among these. While Juan Pablo’s post offered a bit of history and differences between Objective-C and Swift error handling, today I’d like to dive into the differences in error handling between Swift 1.2 and Swift 2.0.

    read more
  • Steve Sparks
    WatchKit 2: Complications
    Steve Sparks iOS
    Jul 5, 2015

    There are a lot of nerds with a soft spot for horology. I tend towards chronographs; I love the extra functions for stopwatches, secondary time zones and time-to-speed conversions. All of those additional displays are called complications. Now Apple has done a pretty great job of enabling custom complications with watchOS 2.

    read more
  • Mark Dalrymple
    We've Got You Covered: Code coverage and Xcode 7
    Mark Dalrymple iOS | Mac
    Jul 3, 2015

    One of Xcode 7’s new features is in-line display of code coverage metrics. Yay? That’s a pretty dull way of describing a nice feature. Code coverage figures out which lines of code have been executed while running unit tests, and now Xcode shows you information about this coverage in the UI.

    read more
  • Juan Pablo Claude
    Error Handling in Swift 2.0
    Juan Pablo Claude iOS | Mac
    Jun 23, 2015

    When Apple announced Swift 2.0 at this year’s WWDC, Swift’s main architect, Chris Lattner, indicated that the 2.0 update to the language focused on three main areas: fundamentals, safety and beautiful code. Out of the list of new features, improvements, polishes and beautifications, one that may impact your Swift 1.x code the most is error handling.

    read more
  • Steve Sparks
    WatchKit 2 Hardware Bits: The Accelerometer
    Steve Sparks iOS
    Jun 22, 2015

    When Apple announced WatchKit 2, I shot over to the developer website and immediately began consuming whatever documentation I could find. There was something I didn’t really expect, but was happy to see: Core Motion. You see, I love Core Motion. I love sensors. I love hardware.

    read more
  • Steve Sparks
    WatchKit 2 Hardware Bits: The Taptic Engine
    Steve Sparks iOS
    Jun 15, 2015

    When I put up the draft of my Digital Crown blog post for internal review, my friends MarkD and Step both saw the little one-liner I’d thrown in about making the Taptic Engine click as you scroll the Digital Crown. They wanted to hear more, but to their disappointment, I declined, saying it was a post for another day. Well, today is that day.

    read more
  • Christian Keur
    WWDC 2015: iPad Multitasking
    Christian Keur iOS
    Jun 13, 2015

    One of the most exciting announcements from WWDC this year was that native multitasking is coming to iPad. The ability to run two apps side by side is something that many iPad owners have wanted for some time to increase productivity. What do you have to do to get this working in your app? The wonderful answer is that you don’t have to do anything whatsoever! That is, if you’ve been following Apple’s recommendations over the past few years, then you don’t have to do much of anything.

    read more
  • Steve Sparks
    WatchKit 2 Hardware Bits: Using the Digital Crown
    Steve Sparks iOS
    Jun 11, 2015

    WatchKit 2 allows code to run on the watch itself, rather than in the extension space on the phone. Running on the watch increases the difficulty of some things like communication with your containing app, as well as opening us up to power consumption issues, but it unlocks so much potential that it’s worth it. Most of that potential is in the hardware. The first and easiest piece to chew off is the Digital Crown.

    read more
  • Zachary Waldowski
    Flexibility, The Future and More: What You Missed at WWDC 2015's Keynote
    Zachary Waldowski iOS
    Jun 10, 2015

    The theme of this year’s WWDC announcements was one of incremental refinement. The landscape of iOS and OS X aren’t changing dramatically; rather everything is getting a bit better. If you feel like your investments in yesterday’s new technologies like Auto Layout, Storyboards or WatchKit weren’t paying off, now is when that investment will bear fruit. If you aren’t familiar with these technologies yet, be sure to check them out before the end of the year. In the meantime, let’s get into the changes in more detail.

    read more
  • John Gallagher
    Building an iOS App in Rust, Part 1: Getting Started with Rust
    John Gallagher iOS
    Jun 8, 2015

    If you’re developing an app on multiple platforms, you’ll often face duplicate work. C++ is the reigning king of the hill for portable, native library development, but there’s a new challenger in Rust.

    read more
  • Steve Sparks
    How to Build A WatchKit app in Three Hours
    Steve Sparks iOS
    Apr 29, 2015

    It was a Friday, and my pals Mikey and Step had been tasked with leading a WatchKit Hack Night the next week.

    read more
  • Angie Terrell
    Our Mobile Design Courses Will Prepare You for the Big Leagues
    Angie Terrell Students | Design | Android | iOS
    Apr 24, 2015

    What do designers, who may have little to no experience with mobile design, want and expect out of courses? Do web designers or graphic designers see the value of an extended, in-depth course like we offer at Big Nerd Ranch?

    read more
  • Brandy Porter
    Tap into your Creativity with our Mobile Design Bootcamps
    Brandy Porter Students | Design | Android | iOS
    Apr 16, 2015

    Get ready to tap into your creativity alongside the Nerds. Designers, developers and project managers: join us for our new Android Mobile Design and iOS Mobile Design bootcamps. In two days, these classes will teach you to design intuitive interfaces employing platform-specific conventions and innovative trends. You will learn vocabulary, current trends and how to work alongside developers to create a pixel-perfect app for mobile devices.

    read more
  • Jay Hayes
    An Adventure in Hacking Arduino Firmata with NeoPixels
    Jay Hayes iOS | Android
    Apr 2, 2015

    Learn ALL the things! That’s basically the motto at Big Nerd Ranch. And in my last post, I wrote about how my team, The Artists Formally Known As (╯°□°)╯︵ ɥsɐןɔ, learned a lot of new things when we tackled hardware hacking with Arduino, NeoPixels and Artoo.

    read more
  • Josh Dobbin
    iOS and Swift at Big Nerd Ranch: Effective Training, No Corners Cut
    Josh Dobbin Students | iOS
    Apr 1, 2015

    I took Big Nerd Ranch’s Beginning iOS with Swift course and I have to admit, I left the bootcamp impressed—and with a whole lot of newfound knowledge.

    read more
  • Jay Hayes
    Hacking Arduino Firmata with NeoPixels
    Jay Hayes Back-End | iOS | Android
    Mar 27, 2015

    We recently had our annual app-building competition, Clash of the Coders. It’s a fantastic opportunity for us nerds to experiment with unfamiliar technologies, stretching ourselves and our tools. It’s all about learning, a fundamental value of Big Nerd Ranch. After an intense 72-hour coding marathon, our team (The Artists Formally Known As (╯°□°)╯︵ ɥsɐןɔ, yep) came out with an online, multiplayer game equipped with clients crossing four platforms: iOS, Android, Web… and Arduino!

    read more
  • Florian Harr
    Continuous Deployment with Travis CI and HockeyApp, Part 1
    Florian Harr iOS
    Feb 26, 2015

    Continuous integration has become an important topic and a significant part of a developer’s workflow. Finding bugs and ensuring a stable codebase are among the most important benefits of using continuous integration. While these benefits are huge on their own, we can extend our continuous integration setup to actually deploy new builds of our application to our testers. We call this extended setup continuous deployment.

    read more
  • Angie Terrell
    Why Apple Pay is the Most Secure Form of Payment
    Angie Terrell iOS
    Feb 6, 2015

    Fumbling with a bunch of credit cards and a wallet is a hassle. Whether you love or hate Apple, you will not find a more secure form of credit card payment than Apple Pay. Period.

    read more
  • Sean Farrell
    WatchKit Extensions: Communicating with your Parent Application
    Sean Farrell iOS
    Jan 30, 2015

    The release date for the long-awaited Apple Watch has not yet been announced, but the nerd herd here is hard at work learning how to program with WatchKit. We believe that the 4th beta of Xcode 6.2 is a rather stable version of what we should expect for the public release of iOS 8.2 and WatchKit early this year.

    read more
  • Bolot Kerimbaev
    Playing with Numbers in Global Playgrounds
    Bolot Kerimbaev iOS
    Jan 16, 2015

    Learn more about showing numbers correctly in iOS and OS X using Xcode 6 and Playgrounds.

    read more
  • Zack Simon
    'Port' Isn't a Dirty Word: Moving your iOS Apps to Android
    Zack Simon Design | iOS | Android
    Dec 19, 2014

    For a designer, the word “port” can be cringe-inducing. By definition, a port is an application adapted from one environment to another. However, what sounds like a short re-skinning project is actually a challenging process involving design, development and stakeholder communication.

    read more
  • Jeremy Sherman
    Swift Access Control
    Jeremy Sherman iOS
    Dec 11, 2014

    Swift access control enables you to hide the implementation details of your code and to specify a preferred interface through which that code can be accessed and used. It also allows the developer to control the context their types, methods, and other names can be used from.

    read more
  • Ashley Putnam
    What’s our Vector, Victor?
    Ashley Putnam Design | iOS
    Nov 13, 2014

    iOS 8 and Xcode 6 have brought about the ability to use vector assets in your applications. Unfortunately, Xcode 6 doesn’t fully support vector assets in iOS just yet. Let’s look at how you can create and use vector graphics that are non-destructive and editable in the future.

    read more
  • Step Christopher
    Power up with our Swift and iOS 8 Roadshow
    Step Christopher iOS | Students
    Oct 28, 2014

    Are you in Chicago or Austin? Do you want to get up to speed with Swift and iOS 8? We can give you a huge boost up the learning curve.

    read more
  • Robert Edwards
    New in Core Data and iOS 8: Asynchronous Fetching
    Robert Edwards iOS
    Oct 17, 2014

    Using Core Data in a multi-threaded environment has always required a deep understanding of the framework and a healthy dose of patience. Asynchronous fetching is not necessarily a feature of a multi-threaded Core Data environment. However, its ability to alleviate a common performance issue could potentially free you up from the added complexity of a multi-threaded CoreData stack.

    read more
  • Ashley Putnam
    iOS 8 Demo: Universal Storyboards and Adaptive UI
    Ashley Putnam iOS | Design
    Oct 16, 2014

    With the addition of two new iPhone sizes, designers and developers will have to be more flexible in their layouts. In this demo, I give a quick overview of Universal Storyboards and Adaptive UI in iOS 8, and how they impact design and development.

    read more
  • Tasha Schroeder
    iOS 8 Demo: Asynchronous Testing With Xcode 6
    Tasha Schroeder iOS
    Oct 10, 2014

    In 2013, Apple shipped a revamped testing framework in Xcode called XCTest, and this year, they’ve shipped a few features with Xcode 6 that were missing from last year’s update. In this video, Sean McCune gives a quick demo of those features.

    read more
  • Zack Simon
    How iOS 8 Will Change App Design
    Zack Simon iOS | Design
    Oct 9, 2014

    Designers need to be aware of many new features when it comes to designing for iOS 8 apps. Extensions, device sizes and frameworks like HealthKit and HomeKit all have an impact. In this demo, I talk about the ways that iOS 8 changes app design.

    read more
  • Matt Mathias
    iOS 8 Demo: Interactive Playgrounds and Functional Programming
    Matt Mathias iOS
    Oct 3, 2014

    In this demo, I cover Interactive Playgrounds and Functional Programming.

    read more
  • Zack Simon
    What iOS 8 Means for App Design
    Zack Simon iOS | Design
    Oct 2, 2014

    While the visual design of iOS 8 remains similar to its predecessor, it is packed with features that require special design attention.

    read more
  • Robert Edwards
    Core Data Demo: Batch Updating and Asynchronous Fetching
    Robert Edwards iOS
    Sep 25, 2014

    In this tutorial, I talk about about Core Data and what’s new in iOS 8. I focus on two new APIs, both centered around performance: batch updating and asynchronous fetching.

    read more
  • Steve Sparks
    Get up and Running with iOS 8's CloudKit
    Steve Sparks iOS
    Sep 23, 2014

    CloudKit gives you record-based, auto-replicating storage across all of your iOS and Mac devices. In this demo, I cover creating records, the push notification subsystem and CloudKit’s capacities.

    read more
  • Steve Sparks
    CloudKit: The fastest route to implementing the auto-synchronizing app you've been working on?
    Steve Sparks iOS
    Sep 18, 2014

    Apps often need to store their data model objects in the cloud, and Apple has released CloudKit to address this need. I decided to put together a chat application to learn more. Here's how to simply create objects in the public database.

    read more
  • Matt Mathias
    iOS 8: Interactive Playgrounds
    Matt Mathias iOS
    Sep 17, 2014

    WWDC 2014 was full of surprises and exciting technology to explore, and the new Playground was high on that list. Playgrounds provide a convenient environment for rapidly developing and trying out code. Apple’s Balloons.playground demonstrates much of the power of the Playground: it can serve as both a document and as a REPL. The combination of the two means that a Playground is a fully interactive document.

    read more
  • Robert Edwards
    New in Core Data and iOS 8: Batch Updating
    Robert Edwards iOS
    Sep 16, 2014

    Can’t get enough info about iOS 8? Join us for our one-day iOS 8 bootcamps in cities across the U.S.

    read more
  • Sean McCune
    Asynchronous Testing With Xcode 6
    Sean McCune iOS
    Sep 11, 2014

    In 2013, Apple shipped a revamped testing framework in Xcode called XCTest, and there was much rejoicing. The old framework hadn’t been updated in years, and a number of third-party testing tools and frameworks had sprung up to provide new features and capabilities. It was good to see the built-in tools getting some love again, and this year, Apple is shipping a few features with Xcode 6 that were missing from last year’s update. One I’m particularly glad to see is support for asynchronous testing.

    read more
  • Zachary Waldowski
    One More Thing: A Recap of Apple's Fall 2014 Event
    Zachary Waldowski iOS
    Sep 10, 2014

    Yesterday, we at the Ranch we were gathered around the campfire for Apple’s latest announcements. It may not have been the wearable or maybe even the inflatable you were expecting (I might have misheard the rumors), but Apple’s fall event, usually dedicated to the iPod and iPhone, has come and gone once again. There is tons of news to unpack for you, your apps and your users. Let’s get going.

    read more
  • Step Christopher
    Get Ready for the Latest Developments from Apple
    Step Christopher iOS
    Sep 9, 2014

    Last year, Apple gave us an iOS update that was all about the appearances. The update for iOS 8 takes a deeper look at the workings underneath. Before we head into Apple’s 2014 announcements, let’s take a last look at some of the rumors.

    read more
  • Steve Sparks
    Learning New Tricks: an iOS Developer Learns Ruby on Rails
    Steve Sparks iOS | Back-End | Students
    Sep 3, 2014

    Why would an experienced iOS developer want to take our Ruby on the Server bootcamp? Nerd Steve Sparks on learning new tricks and why you need a guide.

    read more
  • Matt Mathias
    Announcing our Swift and iOS 8 Roadshow
    Matt Mathias Students | iOS
    Aug 15, 2014

    Our first roadshow is bringing one-day classes in Swift and iOS 8 to a city near you.

    read more
  • Howard Vining
    An Introduction to Microsoft Azure Mobile Services
    Howard Vining Mac | iOS
    Aug 14, 2014

    Microsoft Azure, a cloud storage and computing platform, is a one-stop shop for virtual machine hosting, web hosting, machine learning analysis, web-enabled databases, content delivery and more. Here's how to get started.

    read more
  • Jay Hayes
    Discover Swift with this One Weird Rubyist!
    Jay Hayes iOS | Back-End
    Aug 12, 2014

    At Big Nerd Ranch, we love certain things. We love coffee, we love fitness and we really love technology. When Apple announced Swift, I found it really hard to resist cracking open the free books and seeing what it’s all about.

    read more
  • John Gallagher
    Locking in Swift: Helping Protect Me from Myself
    John Gallagher iOS
    Aug 8, 2014

    Swift helps you write code with fewer bugs. But even more intriguing are the possibilities to change “things I have to worry about” in Objective-C into “things I can let the compiler worry about” in Swift.

    read more
  • Mark Dalrymple
    A Lurking Horror in Debugging
    Mark Dalrymple Mac | Leveling Up | iOS
    Jul 31, 2014

    …and upon looking into the face of indescribable horror, a bug so unfathomably odd that it shook the foundations of all meager human beings, I was overcome by an indistinct feeling of dread and approximate horror previously unfamiliar to me.

    read more
  • Steve Sparks
    UIDynamics in Swift
    Steve Sparks iOS
    Jul 18, 2014

    Want to use UIDynamics in Swift? Turns out, UIDynamics in Swift is pretty much just like using it in Objective-C. We just need to drape it in the Swifty Goodness™ and it will work just like it is expected to.

    read more
  • Mark Dalrymple
    File it Away
    Mark Dalrymple iOS
    Jul 3, 2014

    Sometimes you stumble across a file. It might be something random in your Documents folder. It might be something a parent or a client sent you. Unfortunately, you have no idea what it might be. Files don’t have to have extensions on the Mac, so there’s not much hint what “Flongnozzle-2012” might contain. But if you’re comfortable in the Terminal, you have some built-in tools to help you identify files.

    read more
  • Kurt Nelson
    The State of the Weariverse
    Kurt Nelson Android | iOS
    Jun 24, 2014

    Wearables are becoming ubiquitous. Every day, it feels like there’s some new fitness tracker with a slightly different set of sensors and an entirely new app/API/website/life-changing-experience/yet-another-account-to-set-up. And fitness trackers are only the most popular bastion of wearable computing. Once you start counting the many devices that used to be released as a USB peripheral and are now being updated to use Bluetooth Low Energy and a rechargeable battery, the list of wearables becomes even larger than the number of Android devices available.

    read more
  • Mark Dalrymple
    Learning SDKs
    Mark Dalrymple iOS
    Jun 12, 2014

    After WWDC, there are new SDKs (Software Development Kits), APIs (Application Programming Interfaces) and new languages to play around with, along with the usual extensions to existing interfaces. Getting up to speed quickly with a new SDK, especially a pre-release SDK, can mean the difference between having a good time with new software toys or becoming angry and making those around you miserable.

    read more
  • Aaron Hillegass
    iOS Developers Need to Know Objective-C
    Aaron Hillegass iOS
    Jun 11, 2014

    When Apple announced Swift, I heard a few people say “Hurray! Now I can be an iOS developer without learning Objective-C!” I have three messages for these people:

    read more
  • Matt Mathias
    Preparing for Swift's Unique Opportunities
    Matt Mathias iOS
    Jun 11, 2014

    In last week’s WWDC, Apple introduced an entirely new language for Mac and iOS development called Swift. Swift is a modern language that is less verbose but is just as expressive as Objective-C. Furthermore, Swift offers a number of features not available in Objective-C. We at the Big Nerd Ranch are incredibly excited about it.

    read more
  • Christian Keur
    WWDC 2014: iOS 8 Will be Huge for Users and Developers
    Christian Keur iOS
    Jun 5, 2014

    In their opening keynote on Monday, Apple stated that iOS 8 is their biggest update to iOS since its initial developer release with iPhoneOS 2.0. It sounds hyperbolic, but it isn’t—this year is huge, both for users and developers.

    read more
  • Tasha Schroeder
    Aaron Speaks at AltConf 2014
    Tasha Schroeder iOS
    Jun 5, 2014

    Miss Aaron Hillegass’ talk at AltConf? We’ve got you covered.

    read more
  • Adam Preble
    WWDC 2014: Big Nerd Ranch and Swift
    Adam Preble iOS
    Jun 3, 2014

    Editor’s note: We have since published the first edition of our Swift programming guide, currently an Amazon best seller. Our iOS and Cocoa bootcamps have also been updated to include Swift programming.

    read more
  • Mark Dalrymple
    Thoughts on Debugging, Part 2
    Mark Dalrymple Mac | iOS | Leveling Up
    May 29, 2014

    You can find Part 1 of this series here.

    read more
  • Mark Dalrymple
    Thoughts on Debugging, Part 1
    Mark Dalrymple Mac | iOS | Leveling Up
    May 16, 2014

    You can find Part 2 of this series here.

    read more
  • Graham Lee
    Dependency Injection, iOS and You
    Graham Lee iOS
    Apr 13, 2014

    Dependency injection refers to the design principle of telling a class which other objects its instances should work with, improving the flexibility with which the class can be used in different contexts. There are no special tools or libraries needed, and it's easy to adopt dependency injection in legacy code to enable testability.

    read more
  • Joseph Dixon
    JavaScriptCore by Example
    Joseph Dixon iOS
    Apr 11, 2014

    JavaScriptCore is not a new framework; in fact, it’s been lurking on Mac OS X ever since version 10.2. But with iOS 7 and Mac OS 10.9, Apple has introduced a native Objective-C API for JavaScriptCore. Apple does provide some documentation in the form of programmer’s comments in the header files, but otherwise this API is poorly documented. We first wrote about JavaScriptCore and iOS 7 last fall, but today, I want to demonstrate how and why one might include JavaScript in an iOS app. By the end you will be able to:

    read more
  • Dave McKinney
    Building an App in a Month with Big Nerd Ranch Programming Guides
    Dave McKinney iOS | Students
    Apr 3, 2014

    Big Nerd Ranch fan Dave McKinney recently gave himself one month to learn some basic programming skills and build an iOS app from scratch. Starting with zero code experience, would he be able to learn enough to make a simple app and submit it to the App Store?

    read more
  • Christian Keur
    Designing Interfaces for iOS 6 and iOS 7
    Christian Keur Mac | iOS
    Mar 28, 2014

    Although the iOS 7 adoption rate is now at 85 percent, many developers still need to support iOS 6. I've seen people struggle with designing their interfaces so that they look at home on both versions of the operating system. This blog post will show you the best practices for achieving this goal.

    read more
  • Step Christopher
    Advanced iOS Mutiny
    Step Christopher iOS | Students
    Mar 19, 2014

    In our Advanced iOS bootcamp, there’s always something new for us instructors to learn from the students. But last week, my class has an extra surprise for me: mutiny!

    read more
  • Graham Lee
    Making a Mockery with Mock Objects
    Graham Lee iOS
    Mar 12, 2014

    Mock objects are used by many developers when they're using test-driven development to design their systems, but what is it? And what are all these subtypes like partial mocks and nice mocks? Are mock objects usually nasty but impartial? Let's take a look, using examples from the OCMock framework for Objective-C testing.

    read more
  • John Gallagher
    Make iOS 7's Dynamic Type Easier to Use with our Open-Source BNRDynamicTypeManager
    John Gallagher iOS
    Feb 7, 2014

    Using iOS 7’s Dynamic Type adds polish to an app. Unfortunately, it can feel cumbersome to use. BNRDynamicTypeManager is an open-source library that makes it less painful.

    read more
  • Howard Vining
    Data-Driven iOS Development with ReactiveCocoa
    Howard Vining Mac | iOS
    Feb 4, 2014

    Editor’s note: This post was co-authored by Howard Vining and Matt Mathias.

    read more
  • Tasha Schroeder
    Providing Medical Care—with an iPhone App
    Tasha Schroeder iOS | Students
    Jan 31, 2014

    Jamie Daniel has attended not one, but three Big Nerd Ranch bootcamps. And he’s putting his knowledge to good use: Jamie is collaborating with a medical team at Duke University to develop a tool that helps doctors and healthcare providers improve care for patients with diabetes.

    read more
  • Mark Dalrymple
    The Universal Troubleshooting Process
    Mark Dalrymple Mac | iOS
    Jan 16, 2014

    Last week I walked through finding and fixing My Favorite Bug. Observant readers may have noticed a multi-step process outlined by some <H3> tags. Get the Attitude, Do Corrective Maintenance, and so on. What was that?

    read more
  • Mark Dalrymple
    Debugging: Tell the Story
    Mark Dalrymple Mac | iOS
    Dec 19, 2013

    I love stories. I love telling stories, and I love listening to stories. I learn from stories. I believe that we, as a programming community, don’t tell enough personal stories around the campfire.

    read more
  • Mark Dalrymple
    Foggy Macro Breakdown
    Mark Dalrymple Mac | iOS
    Dec 5, 2013

    I’m a big fan of caveman debugging. That is, using log statements to gather information and visualize a program’s control flow. But I only use it very tactically: I need this one piece of information. Add a log or two and see what I get. Once I solve the problem I take out the logs before sending the code out for review and checking it in. I consider caveman debugging different from the logging an app does to report its activity or health. This should be designed like any other feature, and not be dependent upon developers randomly scattering log statements around the code base.

    read more
  • Mark Dalrymple
    Stochastic Profiling in Debugging
    Mark Dalrymple Mac | iOS
    Nov 27, 2013

    I’ve talked about stochastic profiling in the past, such as the fairly recent Rock Heads. It’s something I mention when I talk about debugging or performance tuning at various conferences. Interestingly enough, I had a need for it last night because I had stumbled into an often-reported, difficult-to-reproduce problem and wasn’t in a situation to hook up Instruments.

    read more
  • Mark Dalrymple
    64-bit Smorgasbord
    Mark Dalrymple Mac | iOS
    Nov 14, 2013

    iPhone 5s. iPad Air. The 64-bit era has moved from the desktop and into our hands. Mike Ash has an excellent article covering what 64-bit ARM is. I’m here to explore some of the day-to-day implications of this 64-bit thing.

    read more
  • Brian Hardy
    Xcode Breakpoint Wizardry for Debugging
    Brian Hardy Mac | iOS
    Nov 8, 2013

    Every great developer should know how to use a debugger. Xcode has an excellent debugger UI that wraps LLDB (or, if you’re living in the past, GDB), giving you access to all the standard tricks like breakpoints, stepping in and out and around your code, and stack frame details.

    read more
  • Mark Dalrymple
    Smooth (Bitwise) Operator
    Mark Dalrymple Mac | iOS
    Nov 7, 2013

    One of the wonderful(?) things about Objective-C is that it’s based on C. Part of the power of C is bit-bashing, where you can manipulate individual bits inside of a piece of memory. Have a bunch of boolean values but don’t feel like wasting a byte or two for each one? Represent them as individual bits! Luckily we tend not have to do this a lot of these days given the massive amounts of memory that we have to play with, even on iOS devices. That being said, there are times where bitwise operations appear in the Cocoa APIs, so it’s good to be comfortable with a couple of basic operations.

    read more
  • John Gallagher
    Should I Use a Property or an Instance Variable?
    John Gallagher Mac | iOS
    Oct 15, 2013

    One of our interns recently asked what seemed like a fairly innocuous question: “What are the scenarios where the use of instance variables would be more preferred than using properties?” At Big Nerd Ranch, we strongly prefer using properties to direct ivar access, but take a sampling of the Objective-C community and you’ll find almost as many answers as there are developers:

    read more
  • Mark Dalrymple
    Property Values
    Mark Dalrymple Mac | iOS
    Oct 4, 2013

    Part of the fun of teaching a live class is fielding questions and thinking on your feet. Once I was showing some code that used @properties extensively in the interface, and one of the students asked “What are all the little fiddly bits that go after the @property? I’ve used retain and assign and nonatomic, but don’t really know what they really do.” (There’s a TL;DR at the end of all the @property attributes if you just want a quick cheat-sheet.)

    read more
  • Jonathan Blocksom
    UIKit Dynamics and iOS 7: Building UIKit Pong
    Jonathan Blocksom Mac | iOS
    Sep 23, 2013

    UIKit Dynamics is one of the more fun parts of iOS 7, giving us user interface elements that mimic real physical objects. They can bump into each other, move and spin, fall with gravity and bounce around on invisible springs and strings. I decided to build an app that plays Pong using only UIKit in order to see how it all worked.

    read more
  • Step Christopher
    Golden Opportunity: Custom Transitions in iOS 7
    Step Christopher iOS
    Sep 20, 2013

    iOS 7 feels fresh and new, thanks in large part to its zooming, swooping, sliding interface. To me, it feels alive and fresh after several years of everything sliding in from the right. You want to add this yummy goodness to your app, right? Let’s get to it.

    read more
  • Owen Mathews
    JavaScriptCore and iOS 7
    Owen Mathews iOS
    Sep 18, 2013

    As a rule, iOS programmers don’t think much about JavaScript. We spend our days swimming in C and Objective-C, while occasionally dipping our toes into the waters of C++. But JavaScript has been consistently popular for the past decade, mostly on the web—both in the browser and on the back end.

    read more
  • Kar Loong Wong
    Apple Design Goes Flat with iOS 7
    Kar Loong Wong Design | iOS
    Sep 18, 2013

    Lots of people have been calling Apple’s new iOS 7 design “flat,” but to me, that’s oversimplifying Apple’s intent.

    read more
  • Mark Dalrymple
    We want information... Information...
    Mark Dalrymple Mac | iOS
    Sep 12, 2013

    Even though Apple is known for limiting what you can do on iOS compared to Mac OS X, they actually provide you with some information about the OS and hardware environment you’re running in, assuming you know where to look. Here I’ll be looking at three different places to accumulate this info: the NSProcessInfo, the application bundle, and a Unix system call.

    read more
  • Mark Dalrymple
    Callin' U Back
    Mark Dalrymple Mac | iOS
    Sep 5, 2013

    I sometimes see the question “How do I cast a method into a function pointer?” come up during classes or on some form of social media. One problem programmers have, which asking questions, is phrasing the question too specifically. In this case, the real question is “How do I use an Objective-C method as a callback for a C library?” Casting a method to a function pointer is one possible way of solving the problem. Is it the right way?

    read more
  • Step Christopher
    How App Developers Should Prepare for iOS 7
    Step Christopher Design | iOS
    Aug 29, 2013

    You’ve heard the rumors. iOS 7 is coming.

    read more
  • Gregg Rothmeier
    Using an API to Back an iOS Application
    Gregg Rothmeier iOS | Back-End
    Aug 13, 2013

    krendler logo] At this year’s annual Clash of the Coders, I teamed up with Steve Sparks and Mark D to create Krëndler, a framework that can be added to any iOS application to record and play back a user’s touch events. Steve and Mark took care of the iOS aspect, while I created an API for them to use to store the touch event data they collected.

    read more
  • Mark Dalrymple
    Inside the Bracket, part 7 - Runtime Machinations
    Mark Dalrymple Mac | iOS
    Jul 25, 2013

    Want to learn more about what’s really happening inside those square brackets? Read the entire Inside the Bracket series.

    read more
  • Mark Dalrymple
    Inside the Bracket, part 6 - Using the Runtime API
    Mark Dalrymple Mac | iOS
    Jul 18, 2013

    Want to learn more about what’s really happening inside those square brackets? Read the entire Inside the Bracket series.

    read more
  • Mark Dalrymple
    Inside the Bracket, part 5 - Runtime API
    Mark Dalrymple Mac | iOS
    Jul 9, 2013

    Want to learn more about what’s really happening inside those square brackets? Read the entire Inside the Bracket series.

    read more
  • Mark Dalrymple
    Inside the Bracket, part 4 - Welcome to the Machine
    Mark Dalrymple Mac | iOS
    Jun 28, 2013

    Want to learn more about what’s really happening inside those square brackets? Read the entire Inside the Bracket series.

    read more
  • Tasha Schroeder
    WWDC Gypsy Caravan
    Tasha Schroeder iOS
    Jun 19, 2013

    We’re settling into our usual routines after returning from a great week in San Francisco and WWDC. We wrote about the WWDC keynote, both its focus on users and on its attention to the details. Aaron spoke at AltWWDC and at the Union Square Apple store. We ate delicious food and managed to sneak in visits to a few sights.

    read more
  • Mark Dalrymple
    Inside the Bracket, part 3 - Who Are you?
    Mark Dalrymple Mac | iOS
    Jun 13, 2013

    Want to learn more about what’s really happening inside those square brackets? Read the entire Inside the Bracket series.

    read more
  • Paul Turner
    WWDC 2013: Focusing on the little things
    Paul Turner Mac | iOS
    Jun 12, 2013

    I was one of five lucky Nerds who got to attend Apple’s WWDC this year, and it has been a blast so far. The keynote was probably the most exciting in terms of the big-picture changes coming from Apple. Interestingly enough, the big picture means focusing on the little things.

    read more
  • Step Christopher
    WWDC 2013 keynote: a love letter to users
    Step Christopher iOS
    Jun 12, 2013

    Depending upon your perspective as a developer, you may have been disappointed by the relative lack of developer-focused information in the WWDC 2013 keynote. I was not.

    read more
  • Mark Dalrymple
    Inside the Bracket, part 2 - data invocation
    Mark Dalrymple Mac | iOS
    Jun 6, 2013

    Want to learn more about what’s really happening inside those square brackets? Read the entire Inside the Bracket series.

    read more
  • John Shea
    A recipe for creating iOS games
    John Shea iOS | Students
    Jun 4, 2013

    Editor’s note: John Shea is a two-time Big Nerd Ranch alum and is the creator of Kondrian, an action game for iPhone and iPad.

    read more
  • Mark Dalrymple
    Inside the Bracket, part 1 - Open for business
    Mark Dalrymple Mac | iOS
    May 23, 2013

    Want to learn more about what’s really happening inside those square brackets? Read the entire Inside the Bracket series.

    read more
  • Mark Dalrymple
    Leveling Up—Learning New Skills
    Mark Dalrymple Mac | iOS
    May 17, 2013

    So. That Clash of the Coders Thing. Kind of nice being able to flex mental muscles over a 72-hour sleep-deprived Dr Pepper-infused period of time, performing acts of violence upon the Objective-C runtime, UIApplication, and the layer stack. It was a blast being able to use all my platform knowledge with the express purpose of subverting it.

    read more
  • Mark Dalrymple
    Static Cling
    Mark Dalrymple Mac | iOS
    May 2, 2013

    I was hanging out on the #macdev IRC channel on Freenode the other day when someone asked a question: “static has different meanings based on the context it is placed in, right?”. Indeed, it has different meaning. And yet it’s the same. Static is a C Koan.

    read more
  • Mark Dalrymple
    We Got So Much Power, That's Ridiculous
    Mark Dalrymple Mac | iOS
    Apr 18, 2013

    Instruments is a cool tool. There is a lot it can do beyond “simple” things like profiling your application’s execution time or finding your memory leaks. It can also give you holistic views of the activity on a device, such as power consumption.

    read more
  • Mark Dalrymple
    Spelunkhead
    Mark Dalrymple Mac | iOS
    Apr 11, 2013

    You can find all sorts of interesting and useful stuff in Apple’s header files. Don’t be afraid to explore them. I usually troll through the headers when a new major SDK version comes out (like IOS 7 probably will be this year) to see what’s new. I also use them for API exploration. As always, when in doubt be sure to read the official documentation. Apple’s documentation is good. It’s also voluminous. But once you’ve marinated in a framework for awhile, you know how things work and might only need a refresher or a nudge in the right direction. These days I usually spelunk in the headers, and then hit the docs if I’m not sure what the headers are trying to tell me.

    read more
  • Mark Dalrymple
    The Ranch at CocoaConf/DC
    Mark Dalrymple Mac | iOS
    Mar 28, 2013

    Just got back from the DC area, where some fellow Ranchers and I went to CocoaConf. If you’re not familiar with CocoaConf, it’s a traveling technical conference for Mac and iOS developers. I like to call it a peripatetic conference, where Dave Klein (who runs the conference) travels around with his family to different cities and puts on a great conference. There are conferences coming up in Dallas April 4, and in San Jose April 18.

    read more
  • Mark Dalrymple
    Incremental Arrayification
    Mark Dalrymple Mac | iOS
    Mar 21, 2013

    Simple questions can be fun. A friend in the Pittsburgh CocoaHeads said “Hey MarkD. We’re having a discussion at work on the right way to iterate through an NSArray. One dude said to just use the for...in syntax, and the other said that we should always use the block based iteration form. What do you think?”

    read more
  • Joe Conway
    iOS Auto Layout: Fun Facts and Tips
    Joe Conway iOS
    Mar 11, 2013

    Editor’s note: This post originally appeared on the the blog of Joe Conway, co-author of iOS Programming:The Big Nerd Ranch Guide.

    read more
  • Mark Dalrymple
    Hooked on DTrace, part 4
    Mark Dalrymple Mac | iOS
    Mar 7, 2013

    I lied. Sorry. I thought this dive into DTrace would be a three-parter, but here’s a part 4, on static probes, suggested in a comment by Chris last month.

    read more
  • Mark Dalrymple
    Hooked on DTrace, part 3
    Mark Dalrymple Mac | iOS
    Feb 21, 2013

    As you’ve seen before, DTrace can give you a huge amount of visibility into the guts of your computer. You saw the syscall provider which lets you attach probes to system calls, those functions that let you take advantage of services from the kernel. You also saw the pid provider which lets you look inside individual processes and trace the function activity inside of there.

    read more
  • Mark Dalrymple
    Hooked on DTrace, part 2
    Mark Dalrymple Mac | iOS
    Feb 14, 2013

    The other day I was chatting with one of my colleagues at the Ranch and he asked me where I get my blog ideas. One fertile idea-ground is what sometimes happens during day-to-day work, solving a potentially hard problem in a way that’s actually pretty easy. And then I discover there’s a fair amount of ground work needed to understand it. Hence these multi-part War and Peace epics.

    read more
  • Mark Dalrymple
    Hooked on DTrace, part 1
    Mark Dalrymple Mac | iOS
    Feb 7, 2013

    This is the first of a four-parter. You can find the other parts here: two, three, four

    read more
  • Bolot Kerimbaev
    Monsters from the id
    Bolot Kerimbaev Mac | iOS
    Jan 24, 2013

    Sometimes things aren’t as simple as they appear. One of my former students was asking what id * meant. This seemed straightforward enough, but as I started exploring the question in more detail, things were becoming curiouser and curiouser.

    read more
  • Mark Dalrymple
    Hijacking for Fun and Profit
    Mark Dalrymple Mac | iOS
    Jan 21, 2013

    Last fall I took a week off to escape from the world. I assigned myself three tasks for that time: disappear and recover from a number of stressful deadlines, clean up my office area (affectionately known as “my cage”), and learn about CocoaTouch gesture recognizers. I ended writing a little tool for playing around with gesture recognizers that I called GestureLab.

    read more
  • Mark Dalrymple
    dispatch_once upon a time
    Mark Dalrymple Mac | iOS
    Jan 14, 2013

    Grand Central Dispatch, a.k.a libdispatch and usually referred to as GCD, is a low-level API known for performing asynchronous background work. dispatch_async is its poster child: “Throw this block on a background thread to do some work, and inside of that block toss another block on the main thread to update the UI.”

    read more
  • LeAnn Boucher
    iOS developers: Free resource for learning to develop Windows Store apps
    LeAnn Boucher iOS
    Dec 12, 2012

    Did you know that Microsoft sold more than 40 million Windows 8 licenses in just one month? Now that’s a big market in need of well-designed apps, and we pride ourselves on being at the intersection of useful and Nerdy know how.

    read more
  • Adam Preble
    An Objective-C Literal Subtlety
    Adam Preble Mac | iOS
    Nov 29, 2012

    Update: In the time since this blog post was published, the compiler behavior demonstrated has been remedied in the version of clang accompanying Xcode 4.6. For a BOOL generateMipmaps, @(generateMipmaps) now evaluates to kCFBooleanTrue or kCFBooleanFalse.

    read more
  • Mark Dalrymple
    Rectangles, Part 1
    Mark Dalrymple Mac | iOS
    Nov 12, 2012

    Geometry is everywhere in modern programming. We have to know how to deal with points, sizes, and rectangles. Back in the old days we’d use NSPoint, NSSize, and NSRect. These types were bitwise-identical with their Core Graphics counterparts (CGPoint, CGSize, and CGRect), but weren’t type miscible, so you had to play games to use use one where another was wanted. With modern flavors of Cocoa, we can use them interchangeably. If you’re looking at a codebase that has both NSBlah and CGBlah for basic geometrical types, rest assured they’re the same at the bit-level.

    read more
  • Mark Dalrymple
    Fast Enumeration, part 3
    Mark Dalrymple Mac | iOS
    Nov 8, 2012

    Fast Enumeration, part 1 covered what fast enumeration is. Part 2 covered the method countByEnumeratingState, which is the centerpiece of fast enumeration. This time around there’s actual code which implements a collection that can be fast enumerated, without cheating and falling back on one of Apple’s collections.

    read more
  • Mark Dalrymple
    Fast Enumeration, part 2
    Mark Dalrymple Mac | iOS
    Nov 5, 2012

    Fast Enumeration, part 1 covered what fast enumeration is, NSEnumeration a bit, and introduced adopting fast enumeration in your own classes by doing a simple pass-through to Apple’s collections. This time around it’s time to look deeper at the central Fast Enumeration call, which I’ll refer to as countByEnumeratingState:

    read more
  • Mark Dalrymple
    Fast Enumeration, part 1
    Mark Dalrymple Mac | iOS
    Nov 1, 2012

    Fast Enumeration was introduced into Objective-C back in the 10.5 days. It’s the feature that lets you succinctly iterate through a collection:

    read more
  • Mark Dalrymple
    Tiny Programs, the Atomic Edition
    Mark Dalrymple Mac | iOS
    Oct 29, 2012

    Readers of this blog might notice a pattern in my postings. They’re occasionally accompanied by a small program to demonstrate some interesting point.

    read more
  • Mark Dalrymple
    Read/Write all about it!
    Mark Dalrymple Mac | iOS
    Oct 8, 2012

    This question came up in an IRC channel the other day: “What’s the best way to set up a property that’s read-only externally, but modifiable inside of the class, so I can use properties or KVC to change it?”

    read more
  • Mark Dalrymple
    Unsafe at Any Speed
    Mark Dalrymple Mac | iOS
    Oct 4, 2012

    __unsafe_unretained. That sounds pretty scary. It’s a new symbol added by ARC that’s used to decorate pointers. It pops up in Xcode’s autocomplete occasionally, and sometimes you see it in code you find on the net. What is it? When would you want to use it?

    read more
  • Mark Dalrymple
    Adventures in Debugging: Keeping a Log
    Mark Dalrymple Mac | iOS | Leveling Up
    Sep 24, 2012

    I usually encounter two classes of bugs on a regular basis. The first is of the form “I think I know where this is” which won’t take long to find. The steps are pretty easy: Figure out how to reproduce it. Set a couple of breakpoints. Add some caveman debugging. Find the problem and fix it. These are my favorite kind of bugs because they’re over and done with quickly, I can get a quick hit of that “you done did good” glow from making a software system better, and then move on to some more interesting problem.

    read more
  • Mark Dalrymple
    Peek a View
    Mark Dalrymple Mac | iOS
    Sep 17, 2012

    When I’m developing new code, my usual habit is to do a lot of small iterations. That gives me a little bit of success fairly often. I’m not as happy if I have to work for a long time until I can see something appearing on the screen.

    read more
  • Mark Dalrymple
    Signings of the Times
    Mark Dalrymple iOS
    Sep 6, 2012

    You know that sinking feeling in your stomach. That horrible emotion that you know that something has gone wrong, seriously wrong, and you’re going to be facing a mountain of pain. That terror that’s even worse than your significant other sitting you down saying “we need to talk”. It’s this:

    read more
  • Mark Dalrymple
    Tops in his Field
    Mark Dalrymple Mac | iOS
    Sep 3, 2012

    Today is Labor Day over here in the states, with many Nerds are taking a well-deserved break to go out into the Big Room and enjoy the company of friends.

    read more
  • Mark Dalrymple
    It's the endian of the world as we know it
    Mark Dalrymple Mac | iOS
    Aug 30, 2012

    CocoaHeads Boise on twitter asked for an elaboration on big vs little endian. In the query was a very interesting statement: “surprised not mentioned in my C books.” I had never thought about endianness issues being covered in introductory materials .

    read more
  • Mark Dalrymple
    enum-num-num
    Mark Dalrymple Mac | iOS
    Aug 23, 2012

    As happens occasionally, an interesting technical discussion ensues in an IRC channel. Earlier this week, this question came up why does Apple do this to most of their enums in the Cocoa headers:

    read more
  • Mark Dalrymple
    About Mutability
    Mark Dalrymple Mac | iOS
    Aug 13, 2012

    Cocoa has a number of classes that can hold arbitrary amounts of Stuff. Things like arrays, dictionaries, sets, index sets, character sets, strings, data, strings, and so on. These classes come in two flavors, mutable and immutable.

    read more
  • Mark Dalrymple
    A Bit on Warnings
    Mark Dalrymple Mac | iOS
    Aug 9, 2012

    I like warnings. I really do. It reminds me that the compiler loves me and is looking out for me. (OK, the compiler at least tolerates me.)

    read more
  • Mark Dalrymple
    The Selfless Debugger
    Mark Dalrymple Mac | iOS | Leveling Up
    Aug 6, 2012

    You know that feeling. You’re on a deadline. It’s 9:00 at night. You have a demo the next morning. Suddenly Xcode freaks out. Apps running half the time. Rebooting your phone. Rebooting your computer. Finally the phone decides to run your App for awhile.

    read more
  • Mark Dalrymple
    Notifications part 3 - Gotchas
    Mark Dalrymple Mac | iOS
    Jul 30, 2012

    Threading

    read more
  • Mark Dalrymple
    Notifications, part 2 - Handling and Spying
    Mark Dalrymple Mac | iOS
    Jul 16, 2012

    Last time you saw how to register for notifications. Now time to handle them!

    read more
  • Mark Dalrymple
    Notifications, part 1 - Registering and Posting
    Mark Dalrymple Mac | iOS
    Jul 12, 2012

    Notifications on the brain. Last time was a bug report about something I stumbled across when debugging some notification-related stuff. Before pursuing that much farther, I figured I’d talk about notifications.

    read more
  • Mark Dalrymple
    Anatomy of a Bug Report
    Mark Dalrymple Mac | iOS
    Jul 9, 2012

    Ever be coding along, giddily hooking objects together and doing that voodoo that you do so well, and all the sudden you hit a wall. Things stop working. You’ve hit, what could be, A Bug. “Can this really be broken? What’s going wrong?” And then you’re stuck in a gumption trap , shaving yaks until you can get back to your important work.

    read more
  • Mark Dalrymple
    String and String, what is String?
    Mark Dalrymple Mac | iOS
    Jul 3, 2012

    Just got back from a weekend at CocoaConf down in Herndon VA. A lot of great sessions from Ranch folks, and from everyone else as well. One of my favorites was the session Chad Sellers from Useful Fruit had on Text, covering the text system from NSString up through NSTextView and back down to Core Text. I learned stuff.

    read more
  • Mark Dalrymple
    A Quieter Log
    Mark Dalrymple Mac | iOS
    Jun 25, 2012

    Montana log cabinI’m a fan of Caveman Debugging, where you use print statements to trace program flow and display specific program information. I was kind of surprised when reading Coders at Work how many industry luminaries do the same thing. It’s just another tool in the debugging arsenal, along with unit tests, debuggers, Instruments, and the plethora of other software investigation toys.

    read more
  • Mark Dalrymple
    Where does it go, George?
    Mark Dalrymple Mac | iOS
    Jun 18, 2012

    Today’s topic was suggested by Paul Bruneau - thanks!

    read more
  • Mark Dalrymple
    The Ranch at CocoaConf
    Mark Dalrymple Mac | iOS
    Jun 7, 2012

    Apple’s WWDC is next week! Woot! But I know a lot of folks can’t make it to WWDC. There are a number of conferences happening over the summer for folks to get their technical info fix.

    read more
  • Mark Dalrymple
    So, What Next?
    Mark Dalrymple Mac | Leveling Up | iOS
    Jun 4, 2012

    You’ve just taken a Big Nerd Ranch course , or you’ve worked through our iOS or Cocoa book. Now what? What can you do to get value for your time spent going to a class or working through a book?

    read more
  • Mark Dalrymple
    Beware the Cruftmonster
    Mark Dalrymple iOS
    May 31, 2012

    Yankee Stadium With Godizlla (original photo by Torin Olsen)

    read more
  • Mark Dalrymple
    NS-structs
    Mark Dalrymple Mac | iOS
    May 24, 2012

    I got a question from a friend of mine the other day:

    read more
  • Mark Dalrymple
    Property List Serialization
    Mark Dalrymple Mac | iOS
    May 14, 2012

    Saving data to the file system and reading it back is a pretty common operation. One of the first ways many Cocoa and iOS programmers learn to read and write are by using the convenience functions provided by NSArray, NSData, and friends. NSDictionary has writeToFile:atomically: or writeToURL:atomically: for writing and dictionaryWithContentsOfFile: or dictionaryWithContentsOfURL: for reading.

    read more
  • Mark Dalrymple
    Actually finding a memory management error with Instruments
    Mark Dalrymple Mac | iOS
    May 10, 2012

    Instruments is a very cool profiling application, but it’s one of those things that’s kind of hard to write about. You can outline the features it has, create some contrived debugging situations (“oh look, I’ve introduced a memory leak where no sane person could have accidentally created one.”), and make some pretty screen shots.

    read more
  • Mark Dalrymple
    BOOL's sharp corners
    Mark Dalrymple Mac | iOS
    May 7, 2012

    Update October 2013 - On 64-bit iOS (device and simulator) BOOL is now actually bool, so the sharp corners have thankfully gone away for that platform. For everything else, though…

    read more
  • Mark Dalrymple
    Both kinds of Cocoa
    Mark Dalrymple Mac | iOS
    Apr 30, 2012

    If you’re an iOS programmer who only programs CocoaTouch, I want to encourage you to give desktop Cocoa a try. I’ve primarily been shipping iOS software for the last two years, but I’ve also been doing a fair amount of Cocoa programming on the desktop during that time, either writing helper tools or implementing parts of the iOS app on the desktop.

    read more
  • Mark Dalrymple
    Table Scanning
    Mark Dalrymple Mac | iOS
    Apr 26, 2012

    Every now and then I get a question about an idiom I use for looping through a collection of literal structures. This is handy for little lookup tables, or using pre-defined data to populate another data structure.

    read more
  • Mark Dalrymple
    A Motivation for ivar decorations
    Mark Dalrymple Mac | iOS
    Apr 23, 2012

    An idiom used by some Objective-C programmers is prefixing instance variable names with underscores. You do see this with explicitly declared instance variables:

    read more
  • Jon Woodroof
    The Beltline Bike Shop 'Bike Rack Locator' App
    Jon Woodroof iOS
    Apr 21, 2012

    The Beltline Bikeshop App, Bike Spot, is LIVE and available to install on your iOS device!

    read more
  • Mark Dalrymple
    Protocols Part 3 : Adopting Protocols in Class Extensions
    Mark Dalrymple Mac | iOS
    Apr 16, 2012

    One of the directions Apple is taking in Objective C that I’ve come to really like is the migration of stuff out of header files. I’m a firm believer that header files should only contain the public programming interface, along with any bookkeeping the compiler absolutely has to have And nothing else. Anything that doesn’t contribute to a person’s understanding of how to use your class shouldn’t be in there.

    read more
  • Mark Dalrymple
    Protocols part 2 : Delegation
    Mark Dalrymple Mac | iOS
    Apr 12, 2012

    Last time we talked about protocols and why you’d want to use one. So, when would you want to make your own protocol? You make protocols when you’re defining some kind of mechanism for your object to use other objects to do its work. One use of protocols is defining the set of methods used for plugins. AMOSXP(3) has a section that builds plugins in Cocoa, using a protocol to spec out how the plugin and the host application interact with each other.

    read more
  • Mark Dalrymple
    Protocols, part 1 : Why?
    Mark Dalrymple Mac | iOS
    Apr 9, 2012

    A comment from a reader of Objective-C Programming: The Big Nerd Ranch Guide came through on the forums, asking about Objective-C protocols. Specifically, why do we need them? Why do they exist?

    read more
  • Mark Dalrymple
    Checking Assumptions: -measuring isEqual[ToString]: performance
    Mark Dalrymple Mac | iOS
    Mar 29, 2012

    The last post about isEqual: vs isEqualToString: included some timings I made to test the performance of those two calls, along with compare:. That posting mentioned going down a rabbit hole, verifying commonly held beliefs of about isEqualToString:. The other rabbit hole I went down related to the performance tuning. A couple of commenters on the post asked some good questions relating to the timings, especially about literal strings.

    read more
  • Mark Dalrymple
    isEqual: vs isEqualToString:
    Mark Dalrymple Mac | iOS
    Mar 26, 2012

    _TL;DR: When to use isEqual: or isEqualToString:? There’s no meaningful performance difference between the two. For convenience use isEqual:. For a modicum of type safety use isEqualToString:, but it’s not as safe as you might believe. If you have unicode strings with different normalizations, use compare:. Be careful if nils are involved. _

    read more
  • Mark Dalrymple
    An NSError Error
    Mark Dalrymple Mac | iOS
    Mar 22, 2012

    We have a lot of very convenient, very powerful methods at our disposal such as [NSData dataWithContentsOfFile:]. This method goes to the file system, opens the file, reads in all the bytes, closes the file, packs the bytes into an NSData, and returns it back to us. It replaces a loop and several other lines of code into one convenient package. If it can’t do the work, it returns nil. That’s pretty simple.

    read more
  • Mark Dalrymple
    Objective-C Literals, part 2
    Mark Dalrymple Mac | iOS
    Mar 19, 2012

    You might want to check out Part 1 if you haven’t already seen the new NSNumber, NSArray, and NSDictionary literal syntax, and using square brackets to dig into collections.

    read more
  • Mark Dalrymple
    Objective-C Literals, Part 1
    Mark Dalrymple Mac | iOS
    Mar 15, 2012

    Update : Official Documentation now

    read more
  • Mark Dalrymple
    A Timing Utility
    Mark Dalrymple Mac | iOS
    Mar 8, 2012

    Sundial with apple, found by the Loudoun Museum in Leesburg, VA Timing how long a block of code takes is a useful tool. Maybe you’re choosing between two different calls that do similar things and you’re wondering which one is faster. If one is faster, is it faster-enough to make any difference? The usual techniques involve using a profiler like Instruments, or calling a time function like gettimeofday() before and after your code and calculating the delta. Those of us on mach-based systems like iOS and OS X can use mach_absolute_time(), which is the finest-grained timepiece available on the system.

    read more
  • Mark Dalrymple
    @import?
    Mark Dalrymple Mac | iOS
    Mar 5, 2012

    My fellow Advanced Mac OS X Instructor, and general all-around super-nerd Jeremy W. Sherman digs into the tantalizing possibility of @import syntax.

    read more
  • Mark Dalrymple
    Category Pros and Cons
    Mark Dalrymple Mac | iOS
    Feb 26, 2012

    Viiki is in ur cat-egories, prefixin' ur methudz Objective-C categories are cool. They allow you do something that you can’t do in most compiled languages: add new methods to existing classes. You can even add methods to classes that you didn’t write.

    read more
  • Mark Dalrymple
    ARC Gotcha - Unexpectedly Short Lifetimes
    Mark Dalrymple Mac | iOS
    Feb 26, 2012

    Disassembly One of our engineers was working on a project and wrote some code that crashed when running on a device:

    read more
  • Aaron Hillegass
    Going to Voices That Matter Seattle?
    Aaron Hillegass iOS
    Feb 23, 2011

    Voices that Matter is going to let me do the keynote on the first morning of their iOS conference this spring. The conference is April 9 and 10 in Seattle. You should come – it is a well-run and informative gathering. (Early-bird pricing ends on Feb 25, so sign up now.)

    read more
  • Aaron Hillegass
    New Kindle version of "iPhone Programming" book
    Aaron Hillegass iOS
    Feb 21, 2011

    Making a .epub or .mobi version of a book is not as easy as it looks. Until recently, if you bought the Kindle version of our iPhone book you were buying something that was generated from our PDF. In particular, all the code blocks were just images from the PDF.

    read more
  • Joe Conway
    Xcode Templates
    Joe Conway iOS
    Jan 14, 2011

    Update: It appears Apple has done a lot of these things, so thanks!

    read more
  • Brian Hardy
    Ask Big Nerd Ranch
    Brian Hardy Mac | iOS
    May 20, 2010

    Let’s face it. We all have questions. Why is the sky blue? What shirt will I wear today? Why does mommy spend so much time on the phone with “the handyman?” Thanks to the Big Nerd Ranch, there is now a place to ask these questions, and more.

    read more
  • Aaron Hillegass
    BNRPersistence
    Aaron Hillegass Mac | iOS
    Feb 2, 2010

    I just open sourced a simple persistence layer for Cocoa and iPhone that uses Tokyo Cabinet. If you are frustrated with Core Data, you might find it useful. Check it out on GitHub.

    read more
  • Joe Conway
    Core Animation Target-Action Layers
    Joe Conway iOS
    Dec 8, 2009

    When you write a Core Animation heavy application, you spend a lot of time implementing code that executes when an animation finishes. Typically, the view controller whose view contains the animating layers implements animationDidStop:finished: and does a series of checks to see which animation finished. This method becomes difficult to manage as the number of animations it handles increases. You must also set the delegate of each animation object and tell them not to remove themselves when finished. You end up writing a lot of code over and over again.

    read more
  • Joe Conway
    iPhone Review Process
    Joe Conway iOS
    Nov 16, 2009

    (Disclaimer: These are my (Joe Conway) opinions. Not Aaron Hillegass’ or any of the rest of the Big Nerd Ranch staff.)

    read more
  • Aaron Hillegass
    Real iPhone Crap 3: Where's the @override keyword?
    Aaron Hillegass iOS
    Aug 17, 2009

    This one is not really crap; it is just a sad omission in the Objective-C 2 language.

    read more
  • Joe Conway
    Xcode Templates
    Joe Conway Mac | iOS
    Aug 14, 2009

    Aaron Hillegass’ last post on initializers for UIViewController was spot-on. In fact, when you come to our iPhone Bootcamp, you’ll learn all about it.

    read more
  • Aaron Hillegass
    Real iPhone Crap 2: initWithNibName:bundle: is the designated initializer of UIViewController
    Aaron Hillegass iOS
    Aug 13, 2009

    Before I go into another shortcoming of UIKit, I’d like to make it plain that I genuinely like most of UIKit. In many ways it is much better than AppKit. I love UIControl, and I think that UITableViewCell being a subclass of UIView is a huge step forward. But, the weaknesses are the parts that demand difficult design decisions, so I’m delving upon them in this series.

    read more
  • Aaron Hillegass
    Real iPhone Crap 1: UINibLoading uses Key-Value Coding
    Aaron Hillegass iOS
    Aug 12, 2009

    Last week, my colleague Joe Conway wrote a posting suggesting that dot-notation was not a great addition to the Objective-C language and that he felt that programmers should not use it.  There was outrage. I, myself, was shocked that people cared at all.  After all, there are some examples of truly stupid stuff that Apple has done that are being misused in genuinely dangerous ways by the iPhone developer community.  These are worthy of discussion.  So, I’m doing a multi-part feature that I will call “Real iPhone Crap,” and this is the first installment.

    read more
  • Joe Conway
    Dot-notation Syntax
    Joe Conway iOS
    Aug 7, 2009

    When I teach, I always make sure to mention the dot-notation addition to Objective-C 2.0. Then, I make sure to tell the students never to use it ever, ever, ever again. But why? Why this seemingly irrational hatred of dot-notation? Is this a style choice and us “bracketeers” are being hard-headed? The answer is no, we are not being hard-headed, we are keeping our code consistent and maintaining readability.

    read more
  • Brian Hardy
    Find Us at WWDC
    Brian Hardy Mac | iOS
    Jun 7, 2009

    As you probably already know, this week marks Apple’s WWDC 2009 Conference in sunny San Francisco, California.

    read more
  • Joe Conway
    Good iPhone Practices
    Joe Conway iOS
    Mar 18, 2009

    The iPhone SDK has now been around long enough where we can start to pick out good practices in using some of the more “fuzzy” areas. There are two small, but important, practices that can make your life much easier.

    read more
  • Twitter
  • Facebook
  • Instagram
  • Github
  • LinkedI
  • Youtube
Subscribe to Our Newsletter

App Development

  • Work

Books

  • All books
  • Front-end
  • Swift
  • iOS
  • Android

Team Training

  • Team Training Overview
  • iOS
  • Android
  • Web
  • Design

Bootcamps

  • Bootcamp Overview
  • iOS
  • Android
  • Web
  • Schedule
  • Georgia Ranch
  • Sign In

Company

  • Who We Are
  • News
  • Resources
  • Careers
  • Blog
  • Contact

Copyright© 1998 - 2019 Big Nerd Ranch, LLC. All Rights Reserved. | Privacy Policy