Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
忘れないで!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
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
140
iOSDCのペンライトを自動制御したい!
akkeylab
0
530
Building a Meta Ray-Ban display app
akkeylab
0
240
What If Your App Could Debug Itself?
akkeylab
0
110
How to stabilize UI tests using XCTest
akkeylab
0
250
Bringing Spatial Web to E-Commerce
akkeylab
0
130
Learn CPU architecture with Assembly
akkeylab
1
2.3k
Porting a visionOS App to Android XR
akkeylab
0
1.3k
How to handle 3D content on Android XR
akkeylab
0
280
Featured
See All Featured
Bash Introduction
62gerente
615
220k
Site-Speed That Sticks
csswizardry
13
1.6k
Paper Plane (Part 1)
katiecoart
PRO
2
12k
Side Projects
sachag
456
43k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
350
30 Presentation Tips
portentint
PRO
1
460
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
300
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
Done Done
chrislema
187
17k
Between Models and Reality
mayunak
4
560
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 !!