try! Swift — day 1


Here are some interesting parts of topics covered in first day of try! Swift conference.

JP Simard from Realm — suggests to have a look on Swift Package Manager. It’s on early stage by now but should be available at the end of this year. Main advantage over existing CocoaPods and Carthage is XCode independency — everything is built from build script. But don’t forget as the docs claims:

The initial release of the Swift Package manager is just a starting point, and we invite you to get involved and help build the best tool possible.

After speaking to him in personal, I will definitely try Realm in my next mobile project. If you are curious about how they persist your User class, you should check his presentation: A Look Into Realm’s Core DB Engine


Laura Savino spoke about readability of code, the differences between reading (easy) and decoding (takes lot of focus and energy) She proposed ideas for code clarification like:

  • avoiding slangs
  • not using abbrev.
  • not using custom operators
  • thinking about pattern matching: statusDescription vs. descriptionOfStatus

Also tip for code-reviews, instead of asking Why they can’t read this code? should we ask like What information is missing that’s making hard to read this code?

She ended her presentation with reference to NASA’s Coding Standards quote

Mission critical code should not just be arguably, but trivially correct.


Boris Bugling presented us tools and techniques for porting iOS apps to tvOS. TV apps are built with UIKit as well. Since Webkit is missing, user authentication process gets more wild as described here, but there is always github solution for that.

There are some limitations for app itself:

  • max app size is 200 MB
  • NSUserDefaults have limit of 500 kB, even documents directory is not avaibalbe
  • everything else should be stored and synced via iCloud or on demand

To port app for tvOS, implementation of focus is needed. Methods are trivial.

buttonInstance.canBecomeFocused
buttonInstance.focused
UIScreen.mainScreen.focused

tvOS also supports up to 2 game controllers, handoff or microphone access does not exists though.

And developers should avoid of direct user input because keyboard looks like this

Dear Apple. Inline keyboard? Really?

Gwendolyn Weston spoke about Type Erasing in Swift — why can’t we use type parameter in generic protocol, since language does not support covariance with generic types. She suggested using wrapper class (AnyProtocolInstance) as a workaround for now. Things might change in the future.


Daniel Steinberg’s talk was about spicing procedural paradigm with Protocol-Oriented-Programming and Functional Programming features. Whole presentation was code refactoring (and slightly over-engineering 🙂


At the end, I’d like to start movement agains using emoticons in presentations. This ? and this ? and also that ?. Please stop it right now because it’s not funny anymore and looks bit ?-y.

Oh and this article has only one image! I’ll try to fix it with some kind of food sample that is made of plastic and attached to plate. And also part of conference building during the sunny morning 🙂


Tokyo — food and people all over the place.