×
Copy
Open
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
How (not) to write an iOS SDK Conrad Kramer
Slide 2
Slide 2 text
We consume a lot of SDKs in Workflow We also have to roll our own SDKs for Workflow
Slide 3
Slide 3 text
Don't make assumptions
Slide 4
Slide 4 text
Language
Slide 5
Slide 5 text
Write in Objective-C Use nullability and generics Don't expose C++
Slide 6
Slide 6 text
Write a Swift wrapper All versions of Swift
Slide 7
Slide 7 text
Build System
Slide 8
Slide 8 text
Have an Xcode project Dynamic and static libraries Support Carthage
Slide 9
Slide 9 text
Have a podspec
Slide 10
Slide 10 text
Support Swift Package Manager Package.swift
Slide 11
Slide 11 text
Environment
Slide 12
Slide 12 text
Make file paths configurable App groups are a thing Have reasonable defaults
Slide 13
Slide 13 text
Don't rely on UIApplication If you must, mark APIs with NS_EXTENSION_UNAVAILABLE If you need background time, use NSProcessInfo
Slide 14
Slide 14 text
Handle inter-process coordination This is hard
Slide 15
Slide 15 text
WFNotificationCenter
Slide 16
Slide 16 text
Support all platforms watchOS, tvOS iOS, macOS carOS
Slide 17
Slide 17 text
Deployment Target
Slide 18
Slide 18 text
Dependencies Avoid them
Slide 19
Slide 19 text
Document your API High level overview Method specific documentation
Slide 20
Slide 20 text
Tests Merge with confidence
Slide 21
Slide 21 text
Performance Document expensive API calls Use Grand Central Dispatch queues
Slide 22
Slide 22 text
Performance Monitor memory utilization +load, objc_copyClassList, UIWebView, CGBitmapContext!
Slide 23
Slide 23 text
WFOAuth2 github.com/DeskConnect/WFOAuth2 swift build carthage build pod install
Slide 24
Slide 24 text
Conrad Kramer Workflow @conradev conra.dk