CHALLENGES
BUILDING A
SWIFT
FRAMEWORK
MBLTDev15: Marius Racwitz, Realm
MBLTDev15: Marius Racwitz, Realm
REALM
> Object-oriented
> Fully ACID transactions
> Well-defined threading model
> Native links
> Zero-copy
> Cross-Platform
MBLTDev15: Marius Racwitz, Realm
MBLTDev15: Marius Racwitz, Realm
BUT WHAT ABOUT
?
HOW TO INTERFACE
C++ FROM SWIFT?
MBLTDev15: Marius Racwitz, Realm
MBLTDev15: Marius Racwitz, Realm
CLANG MODULEMAP
framework module Realm {
umbrella header "Realm.h"
export *
module * { export * }
explicit module Private {
header "RLMArray_Private.h"
header "RLMObject_Private.h"
// …
}
}
FIND A VIABLE WAY
TO DISTRIBUTE A FRAMEWORK
WHICH VENDORS ANOTHER
MBLTDev15: Marius Racwitz, Realm
!
APPSTORE
MBLTDev15: Marius Racwitz, Realm
CARTHAGE EXPECTS ONLY
1 FRAMEWORK
PER REPO
WORKAROUND:
SERVE !
VIA GITHUB
MAKING
COCOAPODS
use_framework!
READY FOR PRIME TIME
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
!
READY TO SHIP
!
BUT WHAT ELSE IS NEEDED?
DOCS
API
DOCS
APPLEDOC
FOR OBJECTIVE-C
/**
Lorem ipsum dolor sit amet.
@param bar Consectetur adipisicing elit.
@return Sed do eiusmod tempor.
*/
func foo(bar: String) -> AnyObject { ... }
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 { ... }
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 { ... }
MBLTDev15: Marius Racwitz, Realm
GET'S THE AST
VIA
SOURCEKITTEN
MBLTDev15: Marius Racwitz, Realm
!
MBLTDev15: Marius Racwitz, Realm
☺
⚠
VERIFY CODE EXAMPLES
SWIFT IS EVOLVING FAST
IT'S HARD TO
KEEP UP WITH THE PACE
!
WHEN WRITING ACTUAL APPS
TO MANY OTHER THINGS TO DELIVER
> Extensions
> Watch Extensions
> Watch Apps
> 3D Touch
> …
SWIFT 1.2 !
IS STILL RELEVANT
! IN THE
ROOM
CI
HOW TO SUPPORT
MULTIPLE SWIFT VERSIONS
AT ONCE?
MULTIPLE BRANCH MODEL
> master
> swift-1.2
> swift-2.1
> …
$ 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
#
!"" …
CI DOESN'T
NEED TO STOP
AT TESTS
TEST ALL
INTEGRATION
SCENARIOS
pod lib lint
STYLEGUIDE
ESTABLISH CONVENTIONS
ENFORCE CONVENTIONS
MBLTDev15: Marius Racwitz, Realm
try! questions.map { try $0.answer() }
THANKS FOR YOUR
ATTENTION!
@MRACKWITZ
MR@REALM.IO

More Related Content

PDF
Developing Serverless Microservice in Rust
PDF
実践Realm
PPTX
Realm - Phoenix Mobile Festival
PDF
Introduction to Realm Mobile Platform
PDF
Advanced realm in swift
PDF
PDF
Developing Serverless Microservice in Rust
実践Realm
Realm - Phoenix Mobile Festival
Introduction to Realm Mobile Platform
Advanced realm in swift

Similar to MBLTDev15: Marius Racwitz, Realm (20)

PDF
"I have a framework idea" - Repeat less, share more.
PDF
Swift core
PDF
Let's migrate to Swift 3.0
PDF
20191116 Swift 개발이 좋아요.
PDF
InterConnect: Server Side Swift for Java Developers
PDF
Formacion en movilidad: Conceptos de desarrollo en iOS (I)
PDF
Building a Cross-Platform Mobile SDK in Rust.pdf
PPTX
Server Side Swift
PDF
Orthogonality: A Strategy for Reusable Code
PDF
Hamamatsu.swift @浜松IT合同勉強会
PPTX
Swift: A parallel scripting for applications at the petascale and beyond.
PDF
Swift rocks! #1
PDF
Introduction to Swift
PPTX
Swift programming language
PDF
Learning Swift: A Stupid Way -- How to use Swift API in private frameworks
PDF
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 7)
PDF
Gigigo Workshop - Create an iOS Framework, document it and not die trying
PPTX
iOS Dev Happy Hour Realm - Feb 2021
PDF
[CocoaHeads Tricity] Do not reinvent the wheel
PDF
Swift, a quick overview
"I have a framework idea" - Repeat less, share more.
Swift core
Let's migrate to Swift 3.0
20191116 Swift 개발이 좋아요.
InterConnect: Server Side Swift for Java Developers
Formacion en movilidad: Conceptos de desarrollo en iOS (I)
Building a Cross-Platform Mobile SDK in Rust.pdf
Server Side Swift
Orthogonality: A Strategy for Reusable Code
Hamamatsu.swift @浜松IT合同勉強会
Swift: A parallel scripting for applications at the petascale and beyond.
Swift rocks! #1
Introduction to Swift
Swift programming language
Learning Swift: A Stupid Way -- How to use Swift API in private frameworks
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 7)
Gigigo Workshop - Create an iOS Framework, document it and not die trying
iOS Dev Happy Hour Realm - Feb 2021
[CocoaHeads Tricity] Do not reinvent the wheel
Swift, a quick overview
Ad

More from e-Legion (20)

PPTX
MBLT16: Elena Rydkina, Pure
PPTX
MBLT16: Alexander Lukin, AppMetrica
PPTX
MBLT16: Vincent Wu, Alibaba Mobile
PPTX
MBLT16: Dmitriy Geranin, Afisha Restorany
PPTX
MBLT16: Marvin Liao, 500Startups
PDF
MBLT16: Andrey Maslak, Aviasales
PDF
MBLT16: Andrey Bakalenko, Sberbank Online
PPTX
Rx Java architecture
PPTX
Rx java
PDF
MBLTDev15: Hector Zarate, Spotify
PDF
MBLTDev15: Cesar Valiente, Wunderlist
PDF
MBLTDev15: Brigit Lyons, Soundcloud
PDF
MBLTDev15: Egor Tolstoy, Rambler&Co
PDF
MBLTDev15: Alexander Orlov, Postforpost
PDF
MBLTDev15: Artemiy Sobolev, Parallels
PPTX
MBLTDev15: Alexander Dimchenko, DIT
PPTX
MBLTDev: Evgeny Lisovsky, Litres
PPTX
MBLTDev: Alexander Dimchenko, Bright Box
PPTX
MBLTDev15: Konstantin Goldshtein, Microsoft
PDF
MBLTDev15: Anna Mikhina, Maxim Evdokimov, Tinkoff Bank
MBLT16: Elena Rydkina, Pure
MBLT16: Alexander Lukin, AppMetrica
MBLT16: Vincent Wu, Alibaba Mobile
MBLT16: Dmitriy Geranin, Afisha Restorany
MBLT16: Marvin Liao, 500Startups
MBLT16: Andrey Maslak, Aviasales
MBLT16: Andrey Bakalenko, Sberbank Online
Rx Java architecture
Rx java
MBLTDev15: Hector Zarate, Spotify
MBLTDev15: Cesar Valiente, Wunderlist
MBLTDev15: Brigit Lyons, Soundcloud
MBLTDev15: Egor Tolstoy, Rambler&Co
MBLTDev15: Alexander Orlov, Postforpost
MBLTDev15: Artemiy Sobolev, Parallels
MBLTDev15: Alexander Dimchenko, DIT
MBLTDev: Evgeny Lisovsky, Litres
MBLTDev: Alexander Dimchenko, Bright Box
MBLTDev15: Konstantin Goldshtein, Microsoft
MBLTDev15: Anna Mikhina, Maxim Evdokimov, Tinkoff Bank
Ad

Recently uploaded (9)

DOC
办Rice毕业证学历认证,哈金森社区学院毕业证留学本科毕业证
PPTX
mathematucicsSolving_Equationspptegypt.pptx
DOC
EIU毕业证学历认证,贝尔维尤学院毕业证国外毕业证
PDF
Date Right Stuff - Invite only, conservative dating app
PDF
Top 10 Platforms for Securely Buying Verified Cash App Accounts.pdf
PPTX
The-Literary-Elements in non fiction creative
PPTX
BSNL Consumer Workshop ppt.pptx Telangana
PDF
mao_guerrilla_warfare,mao zedongun gerilla savaşı üzerine yazısı
PDF
Facial Recognition System Singapore_ 1 SGD Per Month.pdf
办Rice毕业证学历认证,哈金森社区学院毕业证留学本科毕业证
mathematucicsSolving_Equationspptegypt.pptx
EIU毕业证学历认证,贝尔维尤学院毕业证国外毕业证
Date Right Stuff - Invite only, conservative dating app
Top 10 Platforms for Securely Buying Verified Cash App Accounts.pdf
The-Literary-Elements in non fiction creative
BSNL Consumer Workshop ppt.pptx Telangana
mao_guerrilla_warfare,mao zedongun gerilla savaşı üzerine yazısı
Facial Recognition System Singapore_ 1 SGD Per Month.pdf

MBLTDev15: Marius Racwitz, Realm