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
490
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
From Xcode plugin to Xcode extension
My talk at Mobile Era conference 2018 in Oslo
Khoa Pham
November 02, 2018
More Decks by Khoa Pham
See All by Khoa Pham
Introduction to Swiftlane
onmyway133
0
230
Better AppStore rating
onmyway133
0
670
Pragmatic Machine Learning for mobile apps
onmyway133
0
490
Unit Testing in iOS
onmyway133
0
610
Getting started with Flutter
onmyway133
2
720
Collection Update
onmyway133
4
490
A Taste of MVVM + RxSwift
onmyway133
1
660
LLDB
onmyway133
0
500
Block
onmyway133
0
650
Other Decks in Technology
See All in Technology
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
VLMで2.3万枚のPyCon JP写真を検索!
terapyon
1
620
サービス内で複数のOP・ASを連鎖させる(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
310
コミュニティから始まった農業IoTとの7年間 ——人との関わりが教えてくれたこと
peacemaker07
0
110
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
77k
医療の現場を変革に挑戦した半年間の軌跡 - PythonとAIで現場を変える / From Code to Care
soudai
PRO
1
630
APIセキュリティを組織で実現するには~注力する点と設計・実装に入れたい対策~
riiimparm
1
180
【書籍出版記念】 10周回って、エージェント開発は RAGがすべてだった。〜RAGの歴史と開発現場で見えた実践知〜
akiratameto
21
7.9k
AIで変わるエンジニアの働き方(仮)
naoinaoi
0
570
Introduction to Bill One Development Engineer
sansan33
PRO
0
470
AIレビュー時代に必要なのは、SLOで引く撤退ライン
nobuoooo
0
130
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
54k
Featured
See All Featured
Done Done
chrislema
186
16k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
300
Utilizing Notion as your number one productivity tool
mfonobong
4
560
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
73
42k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.5k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.8k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
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