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
4k
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.8k
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
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
780
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
790
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
460
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
110
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
130
テストコード書いてみませんか?
onopon
2
130
たのしいparse.y
ydah
3
120
MCP with Cloudflare Workers
yusukebe
2
220
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
130
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
140
Jakarta EE meets AI
ivargrimstad
0
250
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Become a Pro
speakerdeck
PRO
26
5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Git: the NoSQL Database
bkeepers
PRO
427
64k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
BBQ
matthewcrist
85
9.4k
Producing Creativity
orderedlist
PRO
341
39k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
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ΞϓϦͷҠ২Λݕ౼ͯ͠Έͯʁ