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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Khoa Pham
November 02, 2018
Technology
0
460
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
190
Better AppStore rating
onmyway133
0
620
Pragmatic Machine Learning for mobile apps
onmyway133
0
460
Unit Testing in iOS
onmyway133
0
580
Getting started with Flutter
onmyway133
2
680
Collection Update
onmyway133
4
450
A Taste of MVVM + RxSwift
onmyway133
1
620
LLDB
onmyway133
0
450
Block
onmyway133
0
610
Other Decks in Technology
See All in Technology
なぜ令和の今ゲームボーイを触るのか
kimkim0106
0
110
Oracle AI Database移行・アップグレード勉強会 - RAT活用編
oracle4engineer
PRO
0
140
生成AIで始める業務改革 - 製造業編 in 福島 -
daikikanemitsu
2
500
Red Hat OpenStack Services on OpenShift
tamemiya
0
200
プレビュー版のDevOpsエージェントを現段階で触ってみた
ad_motsu
1
160
Oracle Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
3
600
"共通化"と"Embed"のブレンドでスケール可能な運用を!M&Aを支えるGENDA SREの実践 / GENDA Tech Talk #3
genda
0
140
Ruby版 JSXのRuxが気になる
sansantech
PRO
0
190
量子クラウドサービスの裏側 〜Deep Dive into OQTOPUS〜
oqtopus
0
320
pool.ntp.orgに ⾃宅サーバーで 参加してみたら...
tanyorg
1
2.6k
AWS Network Firewall Proxyを触ってみた
nagisa53
1
260
Codex 5.3 と Opus 4.6 にコーポレートサイトを作らせてみた / Codex 5.3 vs Opus 4.6
ama_ch
0
250
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
99
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
390
Skip the Path - Find Your Career Trail
mkilby
0
64
How GitHub (no longer) Works
holman
316
140k
Exploring anti-patterns in Rails
aemeredith
2
260
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
460
The Language of Interfaces
destraynor
162
26k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
93
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
88
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.2k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
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