Wednesday 6 March 2013

NSConference 5: Day Three

iOS Tools at Flipboard

Evan Doll, Flipboard @edog1203

avoiding crap work

  • use jenkins
    • run clang: +leakToEnsureClangDidRun
    • can also use to send out a beta using TestFlight/HockeyApp
    • jenkins build types:
      • beta
      • beta-external
      • ios-debug-device
      • ios-debug-simulator
      • ios-debug-unittests
    • takes some time to get things sorted with signing etc
  • app icon versioning
    • stamp app icon with the version
    • ImageMagick shell script build phase
  • use multiple bundle identifiers
    • allow app store, beta & debug builds to coexist on device
    • define a custom build setting called BUNDLE_SUFFIX
    • then reference the variable in the Info.plist
  • use JetBrains AppCode as an additional bug finding tool
    • unused code, mismatched types, etc
  • HockeyApp is great for beta handling & crash reporting

squashing bugs

  • useful to capture app state without plugging in to Xcode
    • CocoaLumberjack - high performance logging library
    • bring up a console log on the device
    • also added view hierarchy explorer & file explorer to debug builds
    • tweaker: in-app property inspector launched from pressing and holding on any view
    • see also DCIntrospect & CBIntrospector on github
  • bug reporting UI
    • launched by gesture from anywhere in the app: Flipboard use the volume buttons
      • do some basic checking in case there is actually audio playing…
      • useful to have a hardware gesture
    • attaches view hierarchy, file system, etc
    • can also take screenshot
    • Flipboard attach app feed state to each bug
      • then have in-app bug browser
      • can replicate feed state in app directly from bug

give yourself superpowers

  • testing gestures in the simulator is a pain
    • instead use keyboard shortcuts
    • override UIApplication to capture key events at a deep level
    • doesn’t mess with other text views
    • can use dlopen & dlsym to load private framework in debug code, without linking public app
    • some shortcut examples:
      • enter login info
      • block UI thread for 1 second
  • feature switches
    • exposed in the app
    • can force on/off first launch flow
    • e.g. early iPhone introducing app re-ordering jiggle
      • special shortcut to show an overlay to adjust rotation, shift & frequency
      • handed to Steve to adjust…
      • (see also the Calculator Construction Kit)
    • change the language without resetting the whole phone
      • need a wrapper round NSLocalizedString
    • if arguing about design options, try it both ways
    • freeze content in app for marketing
    • e.g. always show advert
    • make them dynamic at run-time
  • pseudolocalization
    • map all localisation keys to unicode accented characters with extra length
    • For more info on Pseudolocalization, watch the “Internationalization Tips & Tricks” video from WWDC 2012
  • WebTranslateIt
    • shared strings for iOS & Android
  • escape hatches: brains on the server
    • change your mind after the app has been released
    • JSON file for settings
    • sync NSUserDefaults
      • comment from the audience: GroundControl from Matt Thompson (@mattt) can provide remote settings
    • also replace Localized strings
    • in-app help
    • UI hints
    • even adding new social services…
  • chaos monkey
    • process in the app that randomly makes things fail
    • memory warnings, delete cached content, closing network connections
    • ensure there’s some obvious part of the UI that indicates when the monkey is running


  • use pivotal tracker: task management tool
    • testers report into Jira
    • then prioritise using pivotal
  • github pull requests to communicate about code
    • talking about code in progress
    • not just for reviewing
    • start earlier
    • get designers involved
  • GitX + email for lightweight code reviews

User Identity

Markos Charatzas @qnoid

  • stop using passwords!
  • the password policy is one of things wrong with passwords
    • each company has different rules
    • then just as you remember the password, you have to change it
  • security questions for when you forget…
  • need to innovate on user authentication
  • residence based authentication

Reverse Indie

Alexander Griekspoor, Papers

  • 100% Indie (until 31st Oct 2012…)
    • bought by Springer Science+Business Media
  • started making free apps just for the fun of it
  • won an Apple Design Award
  • then made Papers while waiting for postdoc to start
  • free apps drove adoption of paid apps
  • also gave 40% discount to students — fuelled word of mouth marketing
  • then had to figure out how to grow from one person to two?
    • how many more copies do I need to sell just to employ another person?
  • then iPhone & iPad got released…
    • suddenly could support an extra developer
  • iOS enabled growth
  • got handed a love letter to Papers at WWDC 2009 :-)
  • when app gets popular requirements start getting bigger
    • choose between lifestyle business or let the product fly
    • restrict the business to the size of you, or let the product free and take a step back
  • offer of being taken over by a big company
    • wanted to keep independent direction and not get eaten by the beast
      • take advantage of big marketing & sales + common HR & legal
    • need to be able to speak to the guys at the top
    • if the process gets difficult, need to go back to them and check if things are still on track
    • get the financial stuff sorted early
    • get professional help early
    • bring soft issues up immediately
      • they won’t go away

Rethinking Syncing

Charles Parnot @cparnot

  • syncing-friendly-driven development :-)
    • start with a sync-friendly foundation
    • use a syncing-friendly data model
    • make syncing-friendly decisions
    • keep things syncing-friendly
  • can just use dropbox
    • but two devices accessing same file can get corruption
    • can use a lock file
    • or File Coordination APIs (controls all access so single machine only)
  • have multiple databases, one read/write, others read only
    • log events rather than just storing data
    • then can get latest event
  • rather than having entire record as an event, can use a key/value store with timestamp
  • fetching data involves iterating through required keys
  • can open multiple databases in CoreData
    • one as R/W
    • others can be loaded as read only
    • CoreData will manage reading from combined data and writing to R/W db automatically
  • example: crash reports library
    • shared amongst multiple developers using dropbox
    • key/value database for adding/modifying crash report files
    • UI layer has an in-memory cache of latest data
  • inspirations

Independent, but Not Alone

Craig Hockenberry @chockenberry

Principal at the Iconfactory

  • Weightbot: crazy idea to add personality
    • but it makes the app fun & accessible
    • designer challenged developer to make the app work in a better way
  • “Design is not just what it looks like and feels like. Design is how it works” — Steve Jobs
    • “Developers don’t know how their product works” — @chockenberry
  • developers think of a product from the inside out
    • think about underlying stuff at the beginning
    • UIs reflect the underlying design
  • designers think of a product from the outside in
    • don’t even know what orthogonal means
    • not worried about how it works, or how hard it might be to implement
    • think about your app in the same way that a customer would
  • a designer is your first customer
    • they will give you feedback that may hurt your feelings
  • provide help with tough decisions
  • explaining problems to a non-technical person helps you think differently about the problem
  • how do you make the design - code - review process shorter and tighter?
    • for Twitterrific (iOS & Mac) had a couple of attempts…
    • first attempt: AppTheme
      • application-level settings
      • extract fonts, colours, etc into a file that the designer can edit
      • can still be objective-c
      • still need to train designer to build & install
    • improved attempt Theme: used UIAppearance
      • one Theme for every view class in the app
      • some view classes only exist to be customisable
      • used some macros to make images, insets, gradients etc
      • in Chameleon, when remove root view controller from window, can reset UIAppearance to a new theme (don’t forget to add it back afterwards…)
  • Interface Builder is the uncanny valley of UI design…
    • hard to visualise results
    • really easy to screw things up
  • most important tool to work with designers is version control

Copywriting is Design

Nik Fletcher @nikf

  • even “serious” products are known as Apps
  • Nik is trying to purge the word Cancel from our app vocabulary
    • negatives are hard to scan quickly: “Delete” “Don’t Delete”
    • go for opposites: “Keep”, “Never”, “Not Now”
  • try not to repeat words in sequential alerts
  • disclosure
    • iOS 6 introduces data isolation instead of CLLocationService.purpose
    • localised Info.plist strings instead (see this blog post)
    • can reset:
      • OS X: tccutil reset ..
      • iOS: Settings > Reset All
  • photo access has implicit access to past location history
    • either disclose usage or scrub it before you upload
  • don’t use checkboxes to turn stuff off!
    • tell QA when you find it
  • don’t talk about the “File System” or the “Keychain”
    • again — it’s implementation detail
  • app state: not running or stopped; instead open or closed
  • example: Realmac developer found an awkward bug in Quick Look
    • developer just added a “QuickLook sucks” alert
    • Nik got an email saying “what’s your problem with Quick Look?”
    • …from the engineer at Apple who worked on Quick Look
  • “personality” can be useful in copy
    • but don’t trivialise important things
  • nice trend of moving errors inline
    • avoiding unnecessary alerts
    • e.g. Mobile Safari has error pages rather than alerts
  • your copy (and maybe your company) needs a style guide
    • anyone in the company can use it
    • even developers…!
  • customer? user?
    • Apple uses “you”
  • use genstrings & ibtool to get all the strings into a file to check through
  • recipe for a great alert:
    • title: how did I get here?
    • title & copy: what am I doing here?
    • buttons: how do I do that?
    • buttons: where do I go from here?
  • see more on

Controlling an animation with a UIGestureRecognizer

Eelco Lempsink @eelco

  • want to use a gesture to scrub across an animation
    • e.g. Photos app on iPad lets you slowly pinch/zoom open each event/album
  • control animation: CA...Animation* animation ... animation.speed = 0; animation.duration = 1; animation.timeOffset = position; // 0 .. 1
  • use UIPinchGestureRecognizer
    • adjust scale to fit the UI element size and animation
    • objects should stay under your fingers as you move them
  • decide what to do when you release the gesture
    • end state, duration, animation curve
    • during gesture you probably want linear animation
    • but when you let go it should probably be something different
  • if you have a complicated animation you can add a property to control the offset
    • can then derive other properties from the value of this new property
    • simplifies code
    • but you have to do some interpolation maths yourself

The Art of Shipping

Alan Cannistraro @accannis

  • worked 12 years at Apple
  • started on iOS apps in 2006 before iPhone even announced
  • now working at Facebook London
  • 5 stages to shipping a product


  • Steve Jobs: “Creativity is just connecting things. When you ask creative people how they did something, they feel a little guilty because they didn’t really do it, they just saw something. It seemed obvious to them after a while.”
  • de Bono lateral/horizontal thinking exercises
  • e.g. “Random Entry”
    • define a focus
    • choose a word from a 2000 word table
    • spend 10-15 mins generating ideas
    • repeat
  • then distill ideas
    • filter for crap or technically impossible
    • gather into a cohesive story


  • Steve Jobs: “sweat all the details”
  • Alan uses wireframes to help to decide the design
  • then generate screenshots
  • does it flow? can you simplify it?
  • design up front is easier…
    • (but not always possible)


  • make a scaffold: has all the bits
  • Steve Jobs: “Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple.”
  • don’t mess with MVC
    • don’t have a UIView that references an NSManagedObject!
  • Cocoa SDK API has a team that scrutinises the code and strives to simplify it
    • use their API as your yardstick…
  • tried a project by designing it all in UML first
    • the developers stopped coming in…
  • start with simple bits
  • avoid shortcuts unless you’re 2-3 days away from release…


  • track everything
  • set a date
  • don’t be afraid to punt issues to the next release
  • prioritising bugs:
    1. data loss
    2. crashes
    3. visual polish (!)
    4. regressions
    5. bugs in new features
    6. everything else
  • why visual polish so high?
  • Donald Norman: Emotional Design
    • aesthetically pleasing objects appear more useful
    • cognitive bias: beauty bias
      • when something is beautiful, we believe its other properties have prowess
    • the halo effect
      • not about success in one area leading to another
      • instead our brains assume that beautiful apps are better, whether they are or not


  • Steve Jobs: “My job is not to be easy on people. My job is to take great people and push them.”
  • be honest about first impressions
    • but leave your ego at the door
  • if it feels wrong, don’t ship it

one more thing…

One thing that Steve said to Alan was “the most important thing you need to do surround yourself with people smarter than you.”

Tuesday 5 March 2013

NSConference 5: Day Two

Thriving in an App Store World

Michael Jurewitz @jury

Jury used to be an Apple Developer Evangelist. He is now Director of Product Development at Black Pixel.

work well with apple

  • need to be looking forward - focusing on future (tech/features/hardware)
  • stay on the radar of apple contacts
  • Apple looks at devrel as “animal husbandry” :-)
    • Apple wants to sell devices & make customers happy
    • so apps should feed into that
  • Apple has laser focus on future and simplicity
    • expecting & embracing change
    • they force themselves to keep going forward
    • won’t look at apps that don’t fit in to that
    • must stay current
  • no secret agenda, but often hard choices
  • can get featured by taking advantage of new OS features
    • but it’s a time limited offer…
  • example:
    • Eventbrite getting featured on Passbook feature page increased new user sign up by 664%…
    • got in right at the beginning – only 15 apps on the feature page
  • “if users aren’t upgrading their OS, they probably aren’t buying your software either” - Wil Shipley
  • Gatekeeper vs App Store: e.g. Kaleidoscope
    • if you buy Kaleidoscope on Mac App Store then you can also download direct
    • app will notice that it’s already been purchased
    • will check receipt and unlock automatically
    • useful for sending customers beta builds when testing fixes
  • file bugs
    • also for requesting to open APIs that are currently private
  • localisation:
    • Apple sales in China increased 400% last year
    • Germany has a strong software market, even though it’s limited in size
  • accessibility creates loyalty

properly value your work

  • Jury did some research over the past weeks…
  • top paid apps have much lower mean & median prices than top grossing apps
    • mean: paid $12.46 vs grossing $49.13
    • median: paid $6.99 vs grossing $29.99
  • two separate markets going on here
  • top grossing has:
    • 200% more Finance apps in top grossing at the moment
      • because it’s tax season at the moment in the US
    • Utilities drop by 25%
    • 22% more Games
    • 50% more Graphics
    • Social drops in half (and would be nothing without Tweetbot)
    • No Weather apps
    • 3-5 Business apps vs none in Top Paid
  • four free apps in Top Grossing
    • in-app purchases
    • freemium can work
    • talk to Kevin Hoctor who did in-app purchases in Moneywell Express
  • cheap apps get downloads, but higher priced apps pay the bills
    • which would you rather have…?
economics 101:
  • price elasticity of demand
  • how does adjusting the price of a product affect the number that you sell?
  • elastic (e.g. social apps):
    • there’s a common price that people expect
    • if you increase the price beyond that, then demand massively decreases
  • inelastic (e.g. drugs… or photoshop…):
    • people will pay pretty much whatever you ask
    • keep increasing the price and maximise revenue
  • demand curves can move due to marketing campaigns…
  • if you double the price, and you lose less than 50% of your customers, you’ve just made money
    • and fewer users means less support costs
    • also increases perceived value
  • don’t be a commodity — charge what your software is worth

price your app intelligently

  • market segment:
    • lots of basic research
    • category prices
    • start research before starting developing
  • research competitors
    • do you have a big enough differentiator?
  • make a guess
  • then try an experiment
  • example: Kaleidoscope 2
    • developer tool segment: avg price $30.11
    • other apps $70-100
    • app is useful but not crucial
    • lots of alternatives
    • guessed $34.99 intro and $69.99 ongoing
    • got various peak sales that affected average
      • great for recouping costs, but not for calculating ongoing revenue
    • evaluation:
      • elasticity = % change price / % change in quantity
      • with a couple of price changes, you can work out the ratio
      • then apply to price changes to predict quantities and therefore revenue
      • (real world demand curves aren’t linear, so elasticities aren’t actually constant)

Talking to Hardware

Alasdair Allan, Babilim Light Industries @aallan

  • Apple’s External Accessory Framework is missing most of the useful stuff
    • rest is protected by Made for iPhone program
    • which is protected by massive ranks of lawyers
    • because Apple want to protect their platform

crazy stuff

  • jailbreaking
    • average time between a jailbreak release and Apple shutting the hole is about 7 days…
    • can’t release an app to the store
  • MIDI
  • simulate capacitance touch using a piece of foil stuck to the screen
  • PeerTalk: using the USB sync cable
    • uses TCP sockets
    • same protocol as iTunes and Xcode

less crazy stuff

  • wifi is possible, but getting setting up is a pain
    • and there’s lots of support issues for different network situations…
  • acoustic coupling via the headphone jack
    • Square does this for a card reader
    • can even use the audio to provide 7.4mW of power (see Hijack board)
  • Redpark cable
    • dock connector to RS-232
    • comes with an SDK
    • but won’t let you put apps in the store — have to approve the app and the hardware
      • you can approach Redpark and ask them to request approval
      • a lot less expensive than going through MFi program
  • XBee & Zigbee (802.15.4)
    • mesh networking for low data rates
    • dock connector to XBee adapter soon available from redpark
  • bluetooth 4 (low energy)
    • can run for months with bluetooth active powered by a coin cell
    • introduced with the iPhone 4S
    • lots of boards available with Android & iOS SDKs
    • e.g. red bear labs
    • use CoreBluetooth plus board’s SDK
    • easy integration:
      • Alasdair did a live demo in just a few minutes
      • connected to arduino over Bluetooth 4 from iPhone and toggled an LED


Matias Piipari @ms2

  • CouchDB has been renamed as CouchBase Lite
  • TouchDB is document db with CouchDB-like API
    • but uses SQLite under the hood
  • sync & share with CouchDB (or TouchDB)
  • concurrency controlled like git
    • when you’re saving you have to be up to date first
  • lightweight
    • < 500Kb in app binary
    • 0.1s startup
  • Document <=> Model, with versions
    • can also contain attachments
  • use Views to define queries by property
  • once you’ve configured the replication it will keep going
    • don’t need to worry about network availability
    • do need to think about conflicts
    • do need to think about concurrency with data changes (get notifications on changes)
  • can create push and pull separately and to/from different destinations
    • e.g. combine pull from bundled with pull from remote
  • sync handles https with basic auth or OAuth
  • can combine db from iCloud/Dropbox with TouchDB

Step away from the screen

Nathan Error, Empirical Development @neror

  • your body is a tool too: improve your coding by improving your body’s effectiveness
    • exercise, diet & sleep…
  • scientometrics
    • measuring rate of change in science
    • rate of output increases by 7% each year
    • output doubles every 10-15 years
    • so whatever we think now will probably change several times over the next 10-15 years
  • maybe start looking at meat more as a side dish rather than a main
  • recent research has linked high intensity aerobic exercise to increased brain performance
  • missing one hour of sleep for a week is equivalent of a blood alcohol level of 0.2%

Subscription pricing

Manton Reece @manton on ADN

  • in 1999 working on a Mac app that cost $199
    • actually considered pretty cheap for the time
  • benefits of subscriptions
    • happy customers:
      • unhappy customers can cancel at any time
    • automatic paid upgrades
      • everyone is on the latest version
      • paying for the service
  • to justify subscription, app and service need to be one
  • examples:
    • adobe: switching to creative cloud monthly subscription
    • microsoft: office is now $9.99/month (or $99.99/year)
    • billings pro:
      • free for 1 invoice/month
      • 5 invoices/month = $10
  • focus on the consistent predictable part of the graph rather than the spikes
    • even if you don’t make more sales, the revenue is consistent
  • billing periods
    • payment percentages affect revenues: charging less often means less percentages to payment provider
    • Manton found that 57% of customers preferred yearly billing
  • hosting costs
    • use Amazon reserved instances if you’re committing to a year (saves money)
  • Stripe is leaps and bounds better than paypal…
    • but only available in US and Canada
    • beta coming to the UK this week!
  • Apple in-app purchase types:
    • non-renewing subscriptions: cancel is the default — will probably lose a lot of people
    • auto-renewable subscriptions: better, but more restrictions on review — including privacy policy & description
      • Apple are very cautious about letting non-magazine apps do this

The “Simple And Intuitive” Fallacy

Why we need standards for complex UX, too

Joerg Schweider @cooliopenguin


  • iPhones & iPads are not just accessory devices — they are becoming the main device in a lot of cases
  • apps need to be feature complete
  • if you simplify and cut out features then a lot of users will be left out in the cold
  • what makes a more intuitive UI?
    • can’t always find out by getting people to compare UIs
    • they will rate familiar schemes higher

Being Naive

Rob Rhyne @capttaco

  • “just build something so I can show it to the client”
  • users don’t care about engineering
  • iterate and test
  • at martiancraft, within three weeks of a new project you’re going to see something
    • it won’t be finished, but you can play with it
  • brent simmons: anatomy of a feature
    • the feature is the smallest part
    • it’s all the edge cases and polish that take the time
  • the naive implementation
    • demonstrates the feature
    • most obvious solution
    • takes the least amount of time to develop
  • example: histogram of live video
    • can use Accelerate framework to get histogram data from an image buffer
    • what about drawing the graph?
      • 3rd party charting lib: not obvious; little work; may demo but might not animate
      • OpenGL vertex buffer: not obvious; lots of work; will demo
      • CoreAnimation: obvious (when experienced!); little work; will demo
    • used CAShapeLayer
      • had used previously in Minds of Modern Mathematics
      • 14,000 pixel wide scroll view on an original iPad
      • can set up style once and draw separately
      • path was animatable property
    • codeless prototypes

Working on Sketch

Pieter Omvlee, Bohemian Coding

  • Sketch: vector art app
  • have to persuade users to try us rather than Adobe
  • don’t want a public feature list with voting
    • sets unrealistic expectations
    • there will always be business goals or technical issues that mean that highly requested features remain unfixed at the top
  • listen to your customers, but only to a certain degree
  • started giving away beta versions of app
    • got lots of testers & feedback
    • keep the fans happy
    • they’re very vocal and will do marketing on your behalf
  • don’t leave refactoring until the next big update
    • you’ll want to focus on new visible features to justify the upgrade price
    • customers don’t care about engineering
  • be practical with your time
    • don’t spend time on rewriting git history
    • focus on pricing, attracting the right customers, etc
  • put in crash reporting early
  • videos are excellent promotion & support
    • they take time and lots of takes
  • try and keep in contact with your customers
    • Apple gives you no way of getting in touch with App Store customers
    • but you could ask for details within the app
    • if no newsletter, then Change Logs are your only communication medium
    • “bug fixes” is a waste of an opportunity
  • try and contact bad reviewers

Introducing CoreValues

Scott Morrison (Chief Cook & Bottle Washer), Indev Software @smorr

  • Indie developer, less Independent, more Individual
  • but not just single person
  • instead individuality & personal
    • personal investment, principles, impact, payoff & risk
  • personal & professional roles are mixed
  • indie company has the heart of the indie developer
  • values are important and define you
    • but sometimes not thought through
    • can lead to inefficient decisions
  • Edward de Bono: if you want an out of the box solution, get out of the box first
    • PO statement — an unconventional (silly) idea used to generate ideas
  • introducing CoreValues: an objective-c framework for describing and defining personal and professional values…
  • interfaces:
    • personal ≠ private
    • professional ≠ public
  • (there was much more in this vein: thought-provoking metaphors, but I didn’t write them down)

Slightly Unsupported — Finder Code Injection

Steve Flack, Bromium UK

  • wanted to add icon badges & contextual menus
    • not based on file type
    • animated
  • used class-dump, x86 disassembler plus lots of trial & error
  • inject code with mach_inject
  • Finder has four methods to swizzle for icon badging
    • one for each view (desktop is fourth)
    • talk gave code specifics for each
  • only two methods to swizzle for contextual menus
    • desktop & grid view share
    • again, talk gave specifics

The Rise and Fall of a Mobile Startup

Emily Toop @fluffyemily

  • Tiny Ears 2011-2012
    • app to teach reading to 4-6 year-old children using speech recognition
  • Emily and her partner Ian both got startups accepted to Start-Up Chile
  • had to get speech recognition
    • Google Voice API was best accuracy by far
    • PocketSphinx with OpenEars was only option with no network
    • but all were bad for children
  • can improve recognition with a better model
    • 20 hours to customise a model
    • no existing models for children
    • 20,000 hours to create a new model!
  • Startup Weekend
    • pitch your product
    • then recruit audience to work on it for 48hrs
    • make an MVP
    • really useful
  • talk about your product
    • to everyone
    • until you bore everyone
    • even yourself…
  • used AVAnimator to play movies with alpha channels
  • …but speech recognition model would cost $100,000 and take 18 months
  • then animators didn’t want to continue without speech recognition
  • make your partnerships sound!
  • don’t go alone
    • guides recommend that you have a hacker and a hustler
  • mothballed Tiny Ears
  • joined another startup to learn how startups work
  • getting more involved in education
    • joined Code Club
    • applying to be a reading assistant
  • approached by dreamthinkspeak to help with their “large-scale, site-responsive theatre production inspired by Leonardo Da Vinci, The Book of Revelations and the world of Mechatronics”
    • go see them while they’re still in London (until March 30th at Somerset House)
  • nothing you learn is ever wasted

Monday 4 March 2013

NSConference 5: Day One

This was my first NSConference and I was impressed. Three days of full-on sessions covering everything from deep technical gotchas, through brutally honest experience reports and even across to basic economics lessons. And the people… I’ve never met so many iOS and Mac developers in one room. Everywhere I turned, there was a developer of an app that I’ve used or know about and admire.

Thank you so much to Scotty and the team. Everything (apart from the wi-fi!) went swimmingly!

iOS performance testing

Bill Dudney @bdudney

  • Double check performance even when you think you’re doing it right
  • Watchdog gives you lots of time but user expectation is instantaneous
  • You can use more time on suspend… but don’t go outside watchdog times otherwise app will have to start from scratch
  • Use Time Profiler to check CPU usage on startup
  • VM tracker tells you how much memory is dirty - most crashes come from here
    • Allocations can be low but dirty memory still high
    • e.g. Image allocations
    • Memory gets dirty as soon as you write to it
  • ARC deals with most of issues for you but won’t deal with cycles
    • Can see in leaks
    • Deal with by using weak references
  • Graphics
    • Quartz all happens on CPU
    • OpenGL happens on GPU
    • Separate processor - more power
    • CoreAnimation gives you access without writing raw OpenGL
    • It’s a compositing engine
  • Offscreen rendering can take up lots of time
    • Check offscreen rendering highlight in instruments

searching for speedy searching

Simon Wolf @sgaw or @sw on ADN

  • WWDC 2010 mastering CoreData suggests title contains[dc] $content
  • Can use beginswith to improve speed
  • Even faster use >= 'frog' and < 'froh'
  • But doesn’t work for in-word searching
  • SQLite with full text search FTS (or FTS3, older)
  • Have to build own version of SQLite and include in your app
  • And then can’t use with CoreData
  • Use FMDatabase & FMDatabaseQueue to behave better with threads
  • Use SQLite with FTS to create an index that refers to the Managed Object ID
  • otsNormalizeString string category to remove diacritics (in blog post)
  • FTS search is word based, * is wildcard
  • Can also define “nearness” of terms
  • Need to keep index in sync with CoreData

The ultimate developer toolchain

Richard Morton @richardmorton

  • “if you have a machine and don’t buy it, you will ultimately find you have paid for a machine and don’t have it” — Henry Ford
    • buy a decent developer machine!
  • iOS Support Matrix gives you a good way to find which test devices you need
  • Injection for Xcode: restores “Fix & Continue”
    • uses bundles & method swizzling
  • Xcoverage
    • LLVM provides build coverage
    • instrument program flow & generate test coverage files
  • Mogenerator
  • AppCode by JetBrains
    • would still do bulk of dev in Xcode but boot up AppCode to use refactoring & other unique features
  • Jenkins
  • PaintCode
  • xScope
  • ResourceHelper
    • extra QA for assets

Why making 12 Games in 12 months is a good idea

Matthijs Hollemans @mhollemans

  • lots of game jams around
  • why?
  • experimentation & innovation
  • learning how to finish
    • often there’s a long hard grind to finish
  • learn to limit your scope
    • one single thing
    • take idea and strip it to the core
  • putting constraints on what you’re doing enhances your creativity
  • also get experience in failing to finish games
    • good to find a way to fail faster!

UISS - UIAppearance on Steroids

Robert Wijas @robertwijas

  • UISS available on github & CocoaPods
  • UIAppearance & UIAppearanceContainer lets you set appearance defaults application-wide
  • but need lots of code to do anything…
  • UISS uses JSON syntax, similar to CSS
  • lets you set styles for inner elements
  • and also styles per device type (iPhone/iPad)
  • lets you define variables
  • easily disable bits by prefixing selector with “-“
  • setup:
    • [UISSS configureWithDefaultJSONFile];
    • add uiss.json file
  • debug: UISS status bar
    • tapping status bar shows errors in uiss.json
  • works with live updates in uiss :-)
    • just make uiss.json available via HTTP
    • [UISS configureWithURL:url]
    • let’s you build the app and give it to your designer to adjust, even without Xcode
    • debug option lets you adjust URL
  • generates UIAppearance code for you
    • you’ll want to do that before you create production code
  • can use UIProxy to control your own custom views with UIAppearance
    • also allows you to adjust them with UISS
  • other systems doing same thing:
    • NUI
    • pixate
    • both use traditional CSS - so heavier dependencies

Becoming a product company

Daniel Pasco @dlpasco

  • started in 2007 as contracting but aimed from the beginning to be a product company
  • 6 people for 3 years, then doubled in size for 3 years
  • operate as a remote company, HQ in Seattle, but spread over US, with a couple in France
  • have shipped hundreds of apps, but all for other people
    • have a reputation for confidentiality
    • so can’t tell anyone about them…
  • there’s an opportunity cost to do product development
    • in the presence of lucrative contracts, you take a risk and turn away money
  • however, you get stability
    • find that contract work is busy Feb to July
    • occasional spike in November preparing apps for Xmas
  • did client work until they had enough money
    • then did some product work until money ran out
    • then swapped back to contract
    • big gaps between product dev
    • when went back to code, there were lots of changes to make with all the new knowledge…
  • initial product was Bistromath
    • massively over-engineered…
    • developed in a vacuum
  • need to share app with people who know nothing about how the app works
    • tester should not share any of your assumptions
  • life after being featured…
    • intense — but treat it as a bonus
    • people need to be aware of the app outside of the app store
  • painful first product experience made them very gunshy
  • learnings:
    • vet your ideas early on
    • get feedback on betas
    • no excitement? that’s an issue
    • if someone wants to extrapolate — that’s great! but leave those additional features for later
    • have a sustainable dev plan — through to the product release
    • check out marketing
  • changed business model:
    • grew contracting team so could subsidise continuous product team
    • could keep momentum going
  • got the chance to acquire three products from other developers (NetNewsWire, Kaleidoscope, Versions)
    • existing userbase
    • well-known brands
  • products acquired through revenue-share
    • no money up front
    • revenue share decreases as time goes on
  • wanted to share info & blog monthly, but…
    • have competitors: don’t want to reveal feature roadmap
    • no one knows if you miss a deadline: would have announced and missed three times!
    • no one knows if you drop a feature you promised
  • Apple will not let you transfer an app between accounts
    • unless you get the keys to the old account, customers will have to buy the app over again…
    • trying out introductory pricing on upgrades to help people recover their losses
  • iCloud sync issues with NetNewsWire
    • iCloud/Core Data: still unusable…
      • opening the iCloud container can take up to 25 minutes
    • iCloud/Key Value Store: works fine
    • iCloud/Ubiquitous Documents: has issues
  • got creative tensions from people caring so much about their own products
  • changed aim to be frequent, shorter, release cycles
  • got lost with features — endless ticket list
    • @jury drew a line in the sand: ship by this date
    • focus accordingly
    • the plan:
      • 4 weeks for feature complete
      • then 4 weeks for no P3 bugs (fix or defer)
      • then 2 weeks for no P2s
      • then 1 week for no P1 bugs
    • there will always be another release
      • if that isn’t built into your plan — change your plan!
    • it’s ok to ship with bugs, as long as they’re not blockers

Software Architecture: what questions to ask?

Jacob Gorban @apparentsoft

A short list of questions to ask when adding a new feature to your project:

  • good ideas are insidious: they increase scope
    • must definitely be worth adding…
    • here are some questions to think about before adding a new one to your project
  • is it really a good idea?
    • is it good for your business?
    • it it good for your app in the long run
  • is it DRY?
  • is it orthogonal?
    • good to have smaller pieces joined than one big piece
  • is it testable?
  • is there another way?
    • when you see a good move, look for a better one — Emanuel Lasker
  • what is the cost of changing this later?
  • what would the architecture look like if I didn’t have this problem?
    • is this problem framed properly for my app?
    • perhaps we can change the problem…
  • document the rationale
    • not just for later — helps you understand the problem
    • could also discuss with others
  • what are the facts and assumptions?

Download from

WebKit UI Inspector Tips and Tricks

Daniel Jalkut, Red Sweater Software @danielpunkass

  • use webkit inspector to fix a page for printing
  • prototype app store previews
  • can set inspector on in your own (Mac) app:
    • just add -WebkitDeveloperExtras YES argument
    • can add same preference on other apps
    • defaults write <bundle-id> WebkitDeveloperExtras -bool YES
    • or globally: defaults write -g WebkitDeveloperExtras -bool YES
  • Dictionary app uses a WebView… so you can inspect it!
  • preference key doesn’t guarantee that the “Inspect Element” menu item will be available
  • is a very good robust HTML editor using a WebView but it overrides the contextual menu
  • for any process (even one that has custom contextual menu):
    • attach to target
    • break on [NSView menuForEvent:]
      • lldb: break set -r menuForEvent
    • ctrl-click in the suspected WebView
    • run code: [[[$rdi _webView] inspector] show:0];
      • event target is in $rdi
  • iOS webkit inspector can inspect Safari or any UIWebView in an app that you own

The Invisible Interface — Adding offline speech UI to your app

Halle Winkler @politepix

  • large vocabulary tasks
    • use server-based speech recognition
    • UITextView, Nuance, AT&T, iSpeech
  • command and control
    • can use offline speech recognition
    • e.g. OpenEars
  • speech API dimension is time
    • make time, rather than just take time
  • small steps through decision tree, means small steps backwards
    • trust & quickly verify
    • switch between small vocabularies
  • watch out for “out of vocabulary”
    • what happens when people walk past talking loudly…?
    • it’s a solved problem in speech recognition, but deciding what to do is a design issue