$30 off During Our Annual Pro Sale. View Details »
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
440
A Taste of MVVM + RxSwift
onmyway133
1
610
LLDB
onmyway133
0
440
Block
onmyway133
0
580
Other Decks in Technology
See All in Technology
Microsoft Agent 365 についてゆっくりじっくり理解する!
skmkzyk
0
440
AIエージェント開発と活用を加速するワークフロー自動生成への挑戦
shibuiwilliam
4
750
1人1サービス開発しているチームでのClaudeCodeの使い方
noayaoshiro
2
550
AIBuildersDay_track_A_iidaxs
iidaxs
3
930
mairuでつくるクレデンシャルレス開発環境 / Credential-less development environment using Mailru
mirakui
5
580
SREには開発組織全体で向き合う
koh_naga
0
400
20251218_AIを活用した開発生産性向上の全社的な取り組みの進め方について / How to proceed with company-wide initiatives to improve development productivity using AI
yayoi_dd
0
560
CARTAのAI CoE が挑む「事業を進化させる AI エンジニアリング」 / carta ai coe evolution business ai engineering
carta_engineering
0
2.2k
AWS re:Invent 2025~初参加の成果と学び~
kubomasataka
0
170
高度サイバー人材育成専科(後半)
nomizone
0
400
AIプラットフォームにおけるMLflowの利用について
lycorptech_jp
PRO
1
180
高度サイバー人材育成専科資料(前半)
nomizone
0
400
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
130
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
13
Faster Mobile Websites
deanohume
310
31k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
0
940
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
1.9k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
40
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
160
The Curious Case for Waylosing
cassininazir
0
190
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