be this magical, black box that you’re scared to look at or touch • All engineers should feel comfortable reading through the code (and opening pull requests)
a post, liked/followed something, etc. New posts persisted No Internet? No problem Local storage Outgoing posts are queued, retried when connected Fetch new posts if connected, no worries if not
What you see on screen and interact with Exists in a hierarchy Drawn programatically or using a visual editor (Interface Builder) Manages a screenful (or so) of information Responds to user interaction Contains only presentation logic Has a single view Populates its view with data
on an iPhone or iPad • Check if we’re in portrait or landscape • iOS 8 • At any point, app will be either vertically/horizontally “regular” or “compact” • This can change based on rotation, other factors
site may crash. <a href="http:// tmblr.co/mqneDxY- aNcK8DhWHP23qvw">16- bitch</a> met <a href="http://tmblr.co/ mJmaPYlIVDe7tP9jhKEHlRw"> david</a>.</p> </blockquote> <p>Tumblr - making dreams come true (for David)</p> API response XML parser Mapping of character ranges to semantic section types (and attributes) Output string + data structure Or “Why inline embeds and stuff don’t show up”
crash. 16-bitch met david.\nTumblr - making dreams come true (for David)"]; ! // Loop through ranges, add the right attributes to each range ! [postContent addAttributes:@{ NSLinkAttributeName : [NSURL URLWithString:@“http://ryan.tumblr.com/post/…”] } range:NSMakeRange(0, 4)]; ! // Lots of work required to support things like nested blockquote indentation, nested lists, inline images, etc.
any time, if iOS needs to reclaim memory • iOS 7 added “background fetch” – app can periodically update itself even if it had previously been killed • Apps can perform “background tasks” (within reason) • e.g. User creates a post and then backgrounds the app – post will continue uploading
e.g. “tumblr://“ • We’ve support a number of URLs, including: • tumblr://x-callback-url/tag?tag=gif • tumblr://x-callback-url/blog?blogName=bryan • tumblr://x-callback-url/quote? quote=Quote&source=Source • x-callback-url is an unofficial specification for how iOS URLs should be structured • x-success and x-error URL parameters are used to return the user to the app where they came from