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.2k
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
980
20190215 iOS/Androidでドキュメントスキャナーを作ってみた
itok
0
1.6k
Other Decks in Programming
See All in Programming
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
240
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
210
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
150
OpenTelemetryでRailsのパフォーマンス分析を始めてみよう(KoR2024)
ymtdzzz
4
1.5k
Vitest Browser Mode への期待 / Vitest Browser Mode
odanado
PRO
2
1.7k
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
420
推し活の ハイトラフィックに立ち向かう Railsとアーキテクチャ - Kaigi on Rails 2024
falcon8823
6
2.2k
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
150
生成 AI を活用した toitta 切片分類機能の裏側 / Inside toitta's AI-Based Factoid Clustering
pokutuna
0
570
Java ジェネリクス入門 2024
nagise
0
600
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
390
WEBエンジニア向けAI活用入門
sutetotanuki
0
300
Featured
See All Featured
Embracing the Ebb and Flow
colly
84
4.4k
Designing on Purpose - Digital PM Summit 2013
jponch
115
6.9k
What's new in Ruby 2.0
geeforr
342
31k
BBQ
matthewcrist
85
9.3k
Producing Creativity
orderedlist
PRO
341
39k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
4 Signs Your Business is Dying
shpigford
180
21k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Code Reviewing Like a Champion
maltzj
519
39k
A Tale of Four Properties
chriscoyier
156
23k
Facilitating Awesome Meetings
lara
49
6k
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ΞϓϦͷҠ২Λݕ౼ͯ͠Έͯʁ