Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MBLTDev - Challenges of Building a Swift Framework

MBLTDev - Challenges of Building a Swift Framework

Before Realm was even initially launched, Apple announced Swift. The team quickly realized how big this is going to be. So we fully committed in building a Swift version of the binding, which meant a lot of pioneering work to do. On that way a lot of new open tools were created and existing vastly extended and improved. But there are far more challenges involved in building a framework for Swift. This talk should summarize our experiences, point out pitfalls to avoid and give you some helpful hints on your way how to find a sweetspot for development in a fastly evolving ecosystem.

Marius Rackwitz

November 17, 2015
Tweet

More Decks by Marius Rackwitz

Other Decks in Programming

Transcript

  1. REALM > Object-oriented > Fully ACID transactions > Well-defined threading

    model > Native links > Zero-copy > Cross-Platform
  2. CLANG MODULEMAP framework module Realm { umbrella header "Realm.h" export

    * module * { export * } explicit module Private { header "RLMArray_Private.h" header "RLMObject_Private.h" // … } }
  3. Pod::Spec.new do |s| s.name = 'Realm' # … s.module_map =

    'Realm/module.modulemap' end Pod::Spec.new do |s| s.name = 'RealmSwift' # … s.dependency 'Realm', "= #{s.version}" end
  4. APPLEDOC FOR OBJECTIVE-C /** Lorem ipsum dolor sit amet. @param

    bar Consectetur adipisicing elit. @return Sed do eiusmod tempor. */ func foo(bar: String) -> AnyObject { ... }
  5. RESTRUCTURED TEXT (REST) UNTIL SWIFT 1.2 /** Lorem ipsum dolor

    sit amet. :param: bar Consectetur adipisicing elit. :returns: Sed do eiusmod tempor. */ func foo(bar: String) -> AnyObject { ... }
  6. MARKDOWN FOR SWIFT 2.0 /** Lorem ipsum dolor sit amet.

    - parameter bar: Consectetur adipisicing elit. - returns: Sed do eiusmod tempor. */ func foo(bar: String) -> AnyObject { ... }
  7. !

  8. TO MANY OTHER THINGS TO DELIVER > Extensions > Watch

    Extensions > Watch Apps > 3D Touch > …
  9. CI

  10. $ tree -L 2 | ! . !"" RealmSwift ->

    RealmSwift-swift2.0 !"" RealmSwift-swift1.2 # !"" Object.swift # !"" … # $"" Tests # !"" RealmSwift-swift2.0 # !"" Object.swift # !"" … # $"" Tests # !"" RealmSwift-swift2.1 -> RealmSwift-swift2.0 # !"" …