Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
From Xcode plugin to Xcode extension
Search
Khoa Pham
November 02, 2018
Technology
0
440
From Xcode plugin to Xcode extension
My talk at Mobile Era conference 2018 in Oslo
Khoa Pham
November 02, 2018
Tweet
Share
More Decks by Khoa Pham
See All by Khoa Pham
Introduction to Swiftlane
onmyway133
0
180
Better AppStore rating
onmyway133
0
600
Pragmatic Machine Learning for mobile apps
onmyway133
0
450
Unit Testing in iOS
onmyway133
0
550
Getting started with Flutter
onmyway133
2
670
Collection Update
onmyway133
4
440
A Taste of MVVM + RxSwift
onmyway133
1
600
LLDB
onmyway133
0
440
Block
onmyway133
0
580
Other Decks in Technology
See All in Technology
AWS Media Services 最新サービスアップデート 2025
eijikominami
0
120
AWS re:Invent 2025 で頻出の 生成 AI サービスをおさらい
komakichi
3
240
ABEMAのCM配信を支えるスケーラブルな分散カウンタの実装
hono0130
4
1.1k
OSだってコンテナしたい❗Image Modeが切り拓くLinux OS運用の新時代
tsukaman
0
130
国産クラウドを支える設計とチームの変遷 “技術・組織・ミッション”
kazeburo
5
9.1k
IPv6-mostly field report from RubyKaigi 2026
sorah
0
200
スタートアップの事業成長を支えるアーキテクチャとエンジニアリング
doragt
1
8.1k
転職したら勘定系システムのクラウド化担当だった件 〜銀行勘定系システムをEKSで稼働させるまで〜
torukouno
0
100
[続・営業向け 誰でも話せるOCI セールストーク] AWSよりOCIの優位性が分からない編(2025年11月21日開催)
oracle4engineer
PRO
1
110
改竄して学ぶコンテナサプライチェーンセキュリティ ~コンテナイメージの完全性を目指して~/tampering-container-supplychain-security
mochizuki875
1
400
今すぐGoogle Antigravityを触りましょう
rfdnxbro
0
190
『星の世界の地図の話: Google Sky MapをAI Agentでよみがえらせる』 - Google Developers DevFest Tokyo 2025
taniiicom
0
360
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
680
KATA
mclloyd
PRO
32
15k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Designing Experiences People Love
moore
142
24k
Thoughts on Productivity
jonyablonski
73
4.9k
For a Future-Friendly Web
brad_frost
180
10k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Transcript
From Xcode plugin to Xcode extension
About Khoa Pham github.com/onmyway133 github.com/hyperoslo medium.com/@onmyway133
It takes 2 iOS developers to start complaining about Xcode
XcodeWay
Xcode plugin
Alcatraz
XVim
SCXcodeMiniMap
FuzzyAutocompletePlugin
ColorSense-for-Xcode
Techniques • Private frameworks • Objective C Runtime • LLDB
• Swizzling
class-dump • IDEKit • DVTKit • Xcode.app/Contents/SharedFrameworks/DVTKit.framework
None
DVTBezelAlertPanel class func swizzleMethods() { guard let originalClass = NSClassFromString("DVTBezelAlertPanel")
as? NSObject.Type else { return } do { try originalClass.jr_swizzleMethod("initWithIcon:message:parentWindow:duration:", withMethod: "xmas_initWithIcon:message:parentWindow:duration:") } catch { Swift.print("Swizzling failed") } }
None
DVTSourceTextView func listenNotification() { NSNotificationCenter.defaultCenter().addObserver( self, selector: #selector(handleSelectionChange(_:)), name: NSTextViewDidChangeSelectionNotification,
object: nil) } func handleSelectionChange(note: NSNotification) { guard let DVTSourceTextView = NSClassFromString("DVTSourceTextView") as? NSObject.Type, object = note.object where object.isKindOfClass(DVTSourceTextView.self), let textView = object as? NSTextView else { return } self.textView = textView }
IDEWorkspaceWindowController self.IDEWorkspaceWindowControllerClass = objc_getClass("IDEWorkspaceWindowController"); NSArray *workspaceWindowControllers = [self.IDEWorkspaceWindowControllerClass valueForKey:@"workspaceWindowControllers"];
XcodeGhost
Xcode Source Editor extension • Modify contents • Modify current
text selection • Seperated process protocol XCSourceEditorCommand { func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: @escaping (Error?) -> Void) }
App Extension • Share • Photo Editing • Today •
Finder Sync • Custom Keyboard • File Provider • Document Provider
Resign codesign
XcodeColorSense extension ? • No Notification • No UI modification
Color literal ! #colorLiteral
XcodeWay extension ? • No NSTask • No NSWorkspace •
No swizzling
AppleScript !
None
• NSUserAppleScriptTask • NSAppleEventDescriptor • ProcessSerialNumber on myOpenFolder(myPath) tell application
"Finder" activate open myPath as POSIX file end tell end myOpenFolder
App Sandbox
Scripts Directory NSApplicationScriptsDirectory
macOS Mojave • WWDC 2018 - Your Apps and the
Future of macOS Security • NSAppleEventsUsageDescription
• https://github.com/onmyway133/XcodeWay • https://github.com/onmyway133/XcodeColorSense2 • https://github.com/theswiftdev/awesome-xcode-extensions
Thanks May your code continue to compile