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
忘れないで!mac app!! コマンド編
Search
Akio Itaya
May 23, 2018
1.7k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
忘れないで!mac app!! コマンド編
potatotips #51
Akio Itaya
May 23, 2018
More Decks by Akio Itaya
See All by Akio Itaya
Building a Meta Ray-Ban display app
akkeylab
0
77
What If Your App Could Debug Itself?
akkeylab
0
79
How to stabilize UI tests using XCTest
akkeylab
0
190
Bringing Spatial Web to E-Commerce
akkeylab
0
100
Learn CPU architecture with Assembly
akkeylab
1
2.2k
Porting a visionOS App to Android XR
akkeylab
0
1.2k
How to handle 3D content on Android XR
akkeylab
0
250
Create a website using Spatial Web
akkeylab
0
430
How to build visionOS apps using Windows
akkeylab
0
230
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
520
GitHub's CSS Performance
jonrohan
1033
470k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
390
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
2
3.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Why Our Code Smells
bkeepers
PRO
340
58k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
450
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
3
390
Transcript
AKKEY / AKIO ITAYA Cyberagent, Inc. Εͳ͍Ͱʂmac appʂʂ ίϚϯυฤ◦
໊લɿ൘୩ ߊྑɹ/ɹ͖͋ͬʔʢAKKEYʣ ৬छɿiOS ׆ಈɿ@AkkeyLab Ұݴɿݸਓ։ൃͬΆ͍ਓؾΞϓϦൃݟͰΔؾഒ૿ ࣗݾհ
ͲΜͳΞϓϦ࡞ͬͯΔਓʁ ※ҙɿݸਓ։ൃ
͔Θ͍͍ΞϓϦ
͔Θ͍͍ΞϓϦ • 1࣌ؒຖʹඒগঁͷͰ࣌ؒΛ͓Βͤʂ • ௨όʔʹඒগঁΠϥετ͕ʂ • ৬Ͱ҆৺ͷϛϡʔτઃఆࡌʂ • ෆఆظͷۀʹؾΛ͚ͭͯͶὑ
͔Θ͍͍ΞϓϦ • 1࣌ؒຖʹඒগঁͷͰ࣌ؒΛ͓Βͤʂ • ௨όʔʹඒগঁΠϥετ͕ʂ • ৬Ͱ҆৺ͷϛϡʔτઃఆࡌʂ • ෆఆظͷۀʹؾΛ͚ͭͯͶὑ
͔Θ͍͍ΞϓϦ • 1࣌ؒຖʹඒগঁͷͰ࣌ؒΛ͓Βͤʂ • ௨όʔʹඒগঁΠϥετ͕ʂ • ৬Ͱ҆৺ͷϛϡʔτઃఆࡌʂ • ෆఆظͷۀʹؾΛ͚ͭͯͶὑ ※৬Ͱͷ༻ࣗݾͰ͓ئ͍͠·͢ɻৗࣝͷൣғͰʂ
͔Θ͍͍ΞϓϦ • 1࣌ؒຖʹඒগঁͷͰ࣌ؒΛ͓Βͤʂ • ௨όʔʹඒগঁΠϥετ͕ʂ • ৬Ͱ҆৺ͷϛϡʔτઃఆࡌʂ • ෆఆظͷۀʹؾΛ͚ͭͯͶὑ ※৬Ͱͷ༻ࣗݾͰ͓ئ͍͠·͢ɻৗࣝͷൣғͰʂ
͔Θ͍͍ΞϓϦ ѪɹশɹɿɹϓϩੜͪΌΜ ɹྸɹɿɹ17ࡀ ৬ɹۀɹɿɹJK ੜɹɿɹ1݄11 ϘΠεɹɿɹ্ࡔ͢ΈΕ Ωϟϥɹɿɹixy ϓϩάϥϛϯάੜ์ૹ ༷ͱͷڠྗ
ͱ͍͏͜ͱͰɺ
mkdir command
Import Cocoa Class ViewController: NSViewController { func create() { let
dir = “\(NSHomeDirectory())/Desktop/swift” let task = NSTask() task.launchPath = “/bin/mkdir” task.arguments = [dir] task.launch() } } ઈରύε
Import Cocoa Class ViewController: NSViewController { func create() { let
dir = “\(NSHomeDirectory())/Desktop/swift” let task = NSTask() task.launchPath = “/bin/mkdir” task.arguments = [dir] task.launch() } }
• Sandbox ͷ༗ແͰऔಘͰ͖ΔσΟϨΫτϦ͕ҧ͏ ແɿ ~/ ༗ɿ ~/Library/Containers/com.app.name/Data/ ҙ Bundle ID
cp command
ίϐʔݩΛબ
Import Cocoa Class ViewController: NSViewController { func copy() { let
panel = NSOpenPanel() panel.canChooseFiles = true panel.canChooseDirectories = false panel.allowsMultipleSelection = false panel.allowedFileTypes = NSImage.imageTypes panel.begin(completionHandler: { num -> Void in if num == NSApplication.ModalResponse.OK, let path = panel.url?.path { Self.read(url: path) } }) } }
Import Cocoa extension ViewController { func read(url: String) { let
home = NSHomeDirectory() task.launchPath = "/bin/cp" task.arguments = [url, home + "/swift/sample"] task.launch() } }
• Sandbox ར༻ͷ߹ઃఆมߋ͕ඞཁ ϑΝΠϧબɿ FileAccess > User Selected File ҙ
ྫɿRead Only
ͥͻɺ༡ΜͰΈ͍ͯͩ͘͞ʂ
GitHub / Qiita : @AkkeyLab
Thank you !!