CocoaRadio - Alexander Stigsen on Realm

This week Justin is joined by Alexander Stigsen of Realm to discuss their new persistence layer for iOS designed exclusively for mobile. Alexander has years of experience working at Nokia, one of the original pioneers of mobile. Using those lessons related to storing data on tiny devices like smartphones, Stigsen and crew developed Realm, the first data layer designed with mobile in mind.

Whether you’re using Core Data, SQLite directly, or some other way of saving your data, it’s worth given this week’s show a listen to learn about another option that looks really promising.

CocoaRadio is now funded by its listeners. If you receieve value our of the show and would like to see it continue, please consider becoming a paid supporter.

My Thoughts On Being Indie In 2014

My Thoughts On Being Indie In 2014 are the same as in 2013. Same year. Same mistakes.

CocoaRadio Season 1 Stats

I just wrapped up what I am calling season 1 of CocoaRadio with episode 13. What started test project at the nudging of Brent has become something I look forward to producing each week. It allows me to talk to interesting people each week, work again with long-time friend and producer Tony Voss, and indirectly market Glassboard each week.

Season 1 Listenership

  • Nearly 25,000 people are subscribed to the show via different RSS clients.
  • On average, CocoaRadio has 19,000 listeners per week.
  • Overcast is by far the most popular client already. It’s not even close.
  • The most popular episode was Isaiah Carew talking with me about Parse
  • 53% of listeners are in the United States.
  • 1% are in China.

Funding Season 2

For the first round of episodes I sold traditional sponsorship slots for each episode to a variety of different companies. I was proud of every sponsor I was able to nab, because they were targeted specifically towards developers rather than just slinging another spot for Squarespace or Netflix at listeners.

The biggest hassle of doing the podcast is selling the ads however. It’s a lot of relationship building and negotiating. Not hard work, but not enjoyable and somewhat time consuming. This is a hobby project for me, and any time I spend trying to find and secure sponsors is time I don’t spend working on my actual day-to-day work.

With season 2, I am going to try something different and offer membership levels so that listeners who want to support the show can fund it directly. More information on that will be made available next week, but it’s my hope that a small percentage of listeners find the show beneficial enough to chip a few bucks a month or year towards producing it.

Season 2 of CocoaRadio starts next week. I hope you’re subscribed.

CocoaRadio 13 - Luis Abreu on iOS 8 Privacy

An article about many of the changes coming in iOS 8 from a privacy and data protection standpoint appeared recently. It’s a tomb of useful information both for consumers interested in knowing how Apple is protecting your information, but also developers who need to be aware of the changes so they can implement them in their code.

I asked the author of the article, Luis Abreu, to join me on CocoaRadio to discuss his article and all the changes coming in iOS 8.

Auto Layout In iOS 8 - Layout Margins

Apple has added a few additions to both iOS 8 and OS X Yosemite that make working with Auto Layout even more of a no brainer than before. Over the next few weeks, I am going to take some time to write about each one of them to give fellow developers an idea of how to make use of these features in their products.

Up first is layout margins.

In iOS 8, Apple added the layoutMargins property on UIView. layoutMargins takes a UIEdgeInsets value that lets you explicitly define the whitespace that your views can use to guide where portions of the interface should be placed.

UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero];
label.translatesAutoresizingMaskIntoConstraints = NO;
label.layoutMargins = UIEdgeInsetsMake(-20, -20, -20, -20);

For anyone that has used the topLayoutGuide or bottomLayoutGuide properties on UIViewController in iOS 7, laying out along a margin shouldn’t be a foreign concept. Those predefined values made it so that the content of your view wouldn’t be sunk underneath a transparent tab or navigation bar. With iOS 8, Apple has extended that functionality so that you can apply custom margins to any UIView that you work with.

To go with the new layout margins functionality, there are new attributes added exclusively for iOS 8 for establishing relationships with Auto Layout.

  • NSLayoutAttributeLeftMargin - The left margin value of the view.
  • NSLayoutAttributeRightMargin - The right margin value of the view.
  • NSLayoutAttributeTopMargin - The top margin value of the view.
  • NSLayoutAttributeBottomMargin - The bottom margin value of the view.
  • NSLayoutAttributeLeadingMargin - Similar to NSLayoutAttributeLeftMargin, except the but the interface flips in a right-to-left environment like Hebrew or Arabic.
  • NSLayoutAttributeTrailingMargin - Similar to NSLayoutAttributeRightMargin, except the but the interface flips in a right-to-left environment like Hebrew or Arabic.
  • NSLayoutAttributeCenterXWithinMargins - This is similar to NSLayoutAttributeCenterX, but it takes into account the margin values that you have set.
  • NSLayoutAttributeCenterYWithinMargins - This is similar to NSLayoutAttributeCenterY, but it takes into account the margin values that you have set.

If these all look familiar, they should. They are pretty much equivalent to the old attributes you used such as NSLayoutAttributeLeft, NSLayoutAttributeRight, and NSLayoutAttributeCenterY. The only difference is that these new methods take into account the layoutMargin values that you set.

If you are targeting iOS 8, you should start adopting these new margin capabilities in your app, because it will lead to much cleaner code. Instead of having to use the constant value of your Auto Layout equation to insert padding, you can now just set the layoutMargins value specifically on the view, and let Auto Layout use those margins as part of its process.

If you’ve found this post useful, and want to learn more about how to best take advantage of Auto Layout in your OS X and iOS apps, be sure to purchase my new book Achieving Zen With Auto Layout