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
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
570
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
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
280
AI駆動開発を事業のコアに置く
tasukuonizawa
1
1.1k
Greatest Disaster Hits in Web Performance
guaca
0
320
生成AIと余白 〜開発スピードが向上した今、何に向き合う?〜
kakehashi
PRO
0
220
生成AIを活用した音声文字起こしシステムの2つの構築パターンについて
miu_crescent
PRO
3
240
20260204_Midosuji_Tech
takuyay0ne
1
170
Oracle AI Database移行・アップグレード勉強会 - RAT活用編
oracle4engineer
PRO
0
130
コミュニティが変えるキャリアの地平線:コロナ禍新卒入社のエンジニアがAWSコミュニティで見つけた成長の羅針盤
kentosuzuki
0
140
プロポーザルに込める段取り八分
shoheimitani
1
760
コンテナセキュリティの最新事情 ~ 2026年版 ~
kyohmizu
8
2.8k
Context Engineeringの取り組み
nutslove
0
440
SREチームをどう作り、どう育てるか ― Findy横断SREのマネジメント
rvirus0817
0
410
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
210
How GitHub (no longer) Works
holman
316
140k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Leo the Paperboy
mayatellez
4
1.4k
Mobile First: as difficult as doing things right
swwweet
225
10k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
Utilizing Notion as your number one productivity tool
mfonobong
3
220
Prompt Engineering for Job Search
mfonobong
0
160
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
54
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