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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
Transcript
22 slides
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 !!
More Decks by Akio Itaya
See All by Akio Itaya
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
150
iOSDCのペンライトを自動制御したい!
akkeylab
0
580
Building a Meta Ray-Ban display app
akkeylab
0
260
What If Your App Could Debug Itself?
akkeylab
0
120
How to stabilize UI tests using XCTest
akkeylab
0
250
Bringing Spatial Web to E-Commerce
akkeylab
0
140
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
290
Featured
See All Featured
Leo the Paperboy
mayatellez
11
2.5k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
610
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
620
Building Adaptive Systems
keathley
44
3.3k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
So, you think you're a good person
axbom
PRO
2
2.3k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
WENDY [Excerpt]
tessaabrams
15
41k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
We Have a Design System, Now What?
morganepeng
55
8.4k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k