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
130
iOSDCのペンライトを自動制御したい!
akkeylab
0
400
Building a Meta Ray-Ban display app
akkeylab
0
230
What If Your App Could Debug Itself?
akkeylab
0
110
How to stabilize UI tests using XCTest
akkeylab
0
240
Bringing Spatial Web to E-Commerce
akkeylab
0
120
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
280
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
410
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
520
Are puppies a ranking factor?
jonoalderson
2
4.1k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Building an army of robots
kneath
307
47k
Google's AI Overviews - The New Search
badams
0
1.6k
The Language of Interfaces
destraynor
162
27k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
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 !!