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
20211015 Mac CatalystでmacOS用アプリを作る
Search
Kei Ito
October 15, 2021
Programming
2
3.8k
20211015 Mac CatalystでmacOS用アプリを作る
Kei Ito
October 15, 2021
Tweet
Share
More Decks by Kei Ito
See All by Kei Ito
20210219 Flutterに入門してみた
itok
1
3.6k
20201009 iOS 14 ウィジェットをつくってみた
itok
1
2.3k
20191206 Property Wrappers 入門
itok
0
1.5k
20190920 iOS 13 対応ではまった話
itok
1
2.2k
20190726 Background App Refresh Taskがやってきた
itok
0
2k
20190722 Firebase Remote Configでアドネットワークを管理する
itok
0
1.4k
20190419 iOSアプリで証明書の情報を参照する
itok
0
1.3k
20190412 Android TV向けアプリを作ってみる
itok
0
990
20190215 iOS/Androidでドキュメントスキャナーを作ってみた
itok
0
1.6k
Other Decks in Programming
See All in Programming
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
330
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
290
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
EventSourcingの理想と現実
wenas
6
2.3k
ヤプリ新卒SREの オンボーディング
masaki12
0
130
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
初めてDefinitelyTypedにPRを出した話
syumai
0
400
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
280
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
Featured
See All Featured
BBQ
matthewcrist
85
9.3k
Building Applications with DynamoDB
mza
90
6.1k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
RailsConf 2023
tenderlove
29
900
What's in a price? How to price your products and services
michaelherold
243
12k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Transcript
.BD$BUBMZTUͰ NBD04༻ΞϓϦΛ࡞Δ .PCJMF"DU0/-*/& JUPL!ͦΒ͔ͥ
JUPL!ͦΒ͔ͥ w ͍ͱ͏͚͍ʢJUPLʣ w ɹɹɹɹɹɹͷதͷਓ w ϞόΠϧΞϓϦΤϯδχΞ݉$&0 w ෭ۀͰϑϦʔϥϯεత w
IUUQTJUPLKQ IUUQTTPSBLB[FDPKQ !JUPLKQ
ॴࡏɿژࢢதژ۠ ࣾһਓࣗ
࣮ डୗ ࣗࣾ
J04"OESPJENBD048JOEPXTαʔό ҰਓͰͬͯ·͢ʢσβΠϯҎ֎ʣ
.BD$BUBMZTUͱ
J1BEΞϓϦΛNBD04্Ͱಈ͔͢Έ 6*,JUΛNBD04্Ͱಈ͔͢Έ
6*,JU "QQ,JU NBD04 J04 J1BE04 XBUDI04 UW04 6*ͷϑϨʔϜϫʔΫผ
J1BEΞϓϦΛNBD04Ͱಈ͔͢ w "QQMF4JMJDPO.BDݶఆ Ұ෦ͷϢʔβͷΈɺJ1BEΞϓϦͱ·ͬͨ͘ಉ͡ w 4XJGU6*Ͱڞ௨Խ ৽ن࡞ʢPSϑϧεΫϥονʣ w
.BD$BUBMZTU طଘͷϦιʔεΛ༗ޮ׆༻ʁ
ͨͱ͑
J04J1BE04ΞϓϦ
NBD04Ͱಈ͔͢ ։ൃத
.BD$BUBMZTUͷߏ
$BUBMZTUͷߏ "QQ,JU NBD04 6*,JU ɿΠϝʔδ ࣮ͱͯ͠6*,JUଆ͕ϝΠϯ "QQ,JUͷΨϫΛ͔Ϳͬͯಈ͍͍ͯΔ
Ϋϥεؒͷؔ "QQ,JU NBD04 6*,JU 6*7JFX$POUSPMMFS /48JOEPX /4"QQMJDBUJPO 6*"QQMJDBUJPO 6*4DFOF 6*8JOEPX
Ϋϥεؒͷؔ "QQ,JU NBD04 6*,JU 6*7JFX$POUSPMMFS /48JOEPX /4"QQMJDBUJPO 6*"QQMJDBUJPO 6*4DFOF 6*8JOEPX
͓͕͍ͨͷ͜ͱ ͍ؔͯ͠ͳ͍
࣮ࡍʹͬͯΈΔ
͡Ί͔ͨ
খωλू
.VMUJQMFXJOEPXT 8JOEPXΛด͡ΔͱΞϓϦऴྃ͢Δ ऴྃͤͨ͘͞ͳ͍߹NVMUJQMFXJOEPXTʹରԠ͢Δ ˠ6*4DFOF6*4DFOF%FMFHBUF
.VMUJQMFXJOEPXT ։ൃத
6*ύʔπ 6*4XJUDIUJUMF #JH4VSҎ߱
6*ύʔπ button.menu = UIMenu(title: "", options: .displayInline, children: [ UIAction(title:
"item1", handler: { _ in }), UIAction(title: "item2", handler: { _ in }), UIAction(title: "item3", handler: { _ in }), UIAction(title: "item4", handler: { _ in }) ]) button.showsMenuAsPrimaryAction = true
৭ IUUQTEFWFMPQFSBQQMFDPNEFTJHOIVNBOJOUFSGBDFHVJEFMJOFT NBDDBUBMZTUPWFSWJFXWJTVBMEFTJHO J1BE04 NBD04
"QQ,JU͞ΘΓ͍ͨ
"QQ,JUͷԸܙ
#VOEMFܦ༝Ͱ "QQ,JUʹΞΫηε "QQ,JU NBD04 6*,JU 6*7JFX$POUSPMMFS /48JOEPX /4"QQMJDBUJPO 6*"QQMJDBUJPO 6*4DFOF
6*8JOEPX #VOEMF
#VOEMFͷߏ "QQ,JU NBD04 6*,JU 7JFX$POUSPMMFS #VOEMF "QQ,JU1MVHJO 1MVHJOQSPUPDPM
#VOEMF࡞
1MVHJOTXJGU import Foundation @objc(Plugin) protocol Plugin: NSObjectProtocol { init() func
doSomethingWithAppKit() } 6*,JUଆʹݟͤΔQSPUPDPMΛఆٛ
"QQ1MVHJOTXJGU import AppKit class AppKitPlugin: NSObject, Plugin { required override
init() { } func doSomethingWithAppKit() { let bar = NSStatusBar.system statusItem = bar.statusItem(withLength: 100) statusItem?.button?.title = "..." } } "QQ,JUΛ࣮ͬͨ
*OGPQMJTU <key>NSPrincipalClass</key> <string>AppKitPlugin</string> Ϋϥε໊ΛӅ͍ ʢ6*,JUଆ͔Β۩ΫϥεΛΔඞཁ͕ͳ͘ͳΔʣ
7JFX$POUSPMMFSTXJGU import UIKit class ViewController: UIViewController { func loadPlugin() {
let bundleFileName = "AppKitPlugin.bundle" guard let bundleURL = Bundle.main.builtInPlugInsURL?.appendingPathComponent(bundleFileName), let bundle = Bundle(url: bundleURL) else { return } guard let pluginClass = bundle.principalClass as? Plugin.Type else { return } let plugin = pluginClass.init() plugin.doSomethingWithAppKit() } }
·ͱΊ w .BD$BUBMZTU w NBD04༻ΞϓϦΛ࡞ΔબࢶͷҰͭͱͯ͠ w طଘϦιʔεΛ׆༻ͭͭ͠ ɹɹɹɹɹɹɹɹNBD04Ͱಉ͡ϢʔβମݧΛ w 8JEHFUΛͬͯ͘Β͏ͨΊʹศར͔
w J1BEΞϓϦͷҠ২Λݕ౼ͯ͠Έͯʁ