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
450
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
610
Pragmatic Machine Learning for mobile apps
onmyway133
0
450
Unit Testing in iOS
onmyway133
0
560
Getting started with Flutter
onmyway133
2
670
Collection Update
onmyway133
4
450
A Taste of MVVM + RxSwift
onmyway133
1
610
LLDB
onmyway133
0
440
Block
onmyway133
0
600
Other Decks in Technology
See All in Technology
_第4回__AIxIoTビジネス共創ラボ紹介資料_20251203.pdf
iotcomjpadmin
0
170
複雑さを受け入れるか、拒むか? - 事業成長とともに育ったモノリスを前に私が考えたこと #RSGT2026
murabayashi
0
480
AI with TiDD
shiraji
1
330
技術選定、下から見るか?横から見るか?
masakiokuda
0
170
AI駆動開発ライフサイクル(AI-DLC)の始め方
ryansbcho79
0
280
Microsoft Agent Frameworkの可観測性
tomokusaba
1
120
ESXi のAIOps だ!2025冬
unnowataru
0
450
AWSに革命を起こすかもしれない新サービス・アップデートについてのお話
yama3133
0
540
Oracle Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
3
240
Knowledge Work の AI Backend
kworkdev
PRO
0
340
さくらのクラウド開発ふりかえり2025
kazeburo
2
1.3k
AWSの新機能をフル活用した「re:Inventエージェント」開発秘話
minorun365
2
530
Featured
See All Featured
Mind Mapping
helmedeiros
PRO
0
43
What the history of the web can teach us about the future of AI
inesmontani
PRO
0
380
A Tale of Four Properties
chriscoyier
162
23k
[SF Ruby Conf 2025] Rails X
palkan
0
660
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.8k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.2k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
97
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
260
Side Projects
sachag
455
43k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Designing Experiences People Love
moore
143
24k
Between Models and Reality
mayunak
0
150
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