How to build your own iOS framework

14
HOW TO BUILD YOUR OWN IOS FRAMEWORK BILLY TOBON @ RENT THE RUNWAY FEBRUARY 17TH, 2015

Transcript of How to build your own iOS framework

HOW TO BUILD YOUR OWN

IOS FRAMEWORKBILLY TOBON @ RENT THE RUNWAY

FEBRUARY 17TH, 2015

WHY?

▸ Split your app in multiple apps▸ Create new apps

▸ Create extensions or Apple Watch widgets▸ Open source your code

BONUS POINTS▸ (Re)learn your code▸ Pay your techinical debt ▸ Oportunity to Unit test

▸ A chance to document your code

WHAT GOESIN A FRAMEWORK?

▸ Model classes like User or Product▸ Networking components▸ Common business logic

▸ Assets ▸ UI Controls

▸ Helpers and extensions

WHAT ARE MY OPTIONS?▸ Cocoa Touch Static Library

▸ CocoaPods▸ Cocoa Touch Frameworks

COCOA TOUCH STATIC LIBRARY▸ Only binary output▸ Traditional way▸ Only code, no assets▸ Not so easy setup

COCOAPODS▸ Open source alternative (Ruby gem)

▸ Widely used ▸ Share source, assets or binaries▸ Easy setup for basic use

COCOA TOUCH FRAMEWORKS▸ New in XCode 6 and iOS 8

▸ Easy setup***

▸ Same look and feel of Apple frameworks▸ No need of extra software

LET'S TRY IT!*

* last famous words

GOOD THINGS TO DO▸ Manage versions▸ Favor Deprecations▸ Unit test

▸ Document (Good docs)▸ Follow a styleguide▸ NSBundles

TO LEARN MORE...▸ WWDC 2014 - Building Modern Frameworks

▸ Cocoapods.org▸ gentlebytes.com/appledoc

▸ XCodeCoverage

GRACIASNO CORGIS WERE HARMED IN THE

MAKING OF THIS DEMO1

1 Image source: https://ru.wikipedia.org/wiki/Вельш-корги