Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
Database イノベーショントークを振り返る/reinvent-2025-database-innovation-talk-recap
emiki
0
110
Microsoft Agent 365 についてゆっくりじっくり理解する!
skmkzyk
0
240
Playwrightのソースコードに見る、自動テストを自動で書く技術
yusukeiwaki
13
5.3k
20251209_WAKECareer_生成AIを活用した設計・開発プロセス
syobochim
7
1.5k
MLflowで始めるプロンプト管理、評価、最適化
databricksjapan
1
190
GitHub Copilotを使いこなす 実例に学ぶAIコーディング活用術
74th
3
2.9k
AWS Trainium3 をちょっと身近に感じたい
bigmuramura
1
140
Challenging Hardware Contests with Zephyr and Lessons Learned
iotengineer22
0
190
大企業でもできる!ボトムアップで拡大させるプラットフォームの作り方
findy_eventslides
1
750
LLM-Readyなデータ基盤を高速に構築するためのアジャイルデータモデリングの実例
kashira
0
240
今年のデータ・ML系アップデートと気になるアプデのご紹介
nayuts
1
310
AWS Security Agentの紹介/introducing-aws-security-agent
tomoki10
0
190
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
The Language of Interfaces
destraynor
162
25k
Embracing the Ebb and Flow
colly
88
4.9k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Navigating Team Friction
lara
191
16k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
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