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
ShareExtensionをためす
Search
tinpay
November 11, 2014
Programming
1.8k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ShareExtensionをためす
ためしてみた。
tinpay
November 11, 2014
More Decks by tinpay
See All by tinpay
レガシーなiOSアプリのSwift化 〜5年分の成功と失敗事例〜
shoheifukui
0
340
モバイルアプリ開発チームをプラットフォームチームで分割した話
shoheifukui
0
670
iOSアプリの 大きな技術的負債に立ち向かう
shoheifukui
1
1.4k
モバイルアプリでのFeatureFlagの導入
shoheifukui
0
710
Other Decks in Programming
See All in Programming
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
250
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
220
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
130
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
370
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
110
APNsからLive Activityを開始する話
yumnumm
0
160
Jetpack Compose Mechanisms
skydoves
2
680
setup-vp GitLab対応の裏側
naokihaba
0
160
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.8k
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
140
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
960
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
390
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
30 Presentation Tips
portentint
PRO
1
420
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
The Invisible Side of Design
smashingmag
301
52k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
730
We Have a Design System, Now What?
morganepeng
55
8.4k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
320
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
770
Transcript
4IBSF&YUFOTJPO Λࢼͯ͠ΈΔ ϞόΠϧΞϓϦ ษڧձ 99Ҫষฏ
ΞδΣϯμ w 4IBSF&YUFOTJPOͱ w छྨͷ4IBSF&YUFOTJPO 4-$PNQPTF4FSWJDF7JFX$POUSPMMFSΛར༻ 6*7JFX$POUSPMMFSΛར༻
4IBSF&YUFOTJPOͱ
ྫ͑ 4BGBSJ ԼͷਅΜதͷ ϘλϯΛԡ͢
ՃͰ͖Δ
5XJUUFSͷ4IBSF&YUFOTJPO
&WFSOPUFͷ4IBSF&YUFOTJPO
1JOUFSFTUͷ4IBSF&YUFOTJPO
1PDLFUͷ4IBSF&YUFOTJPO
छྨͷ 4IBSF&YUFOTJPO
4-$PNQPTF4FSWJDF7JFX$POUSPMMFS ൚༻తͳ6* 6*෦ͷ࣮͕΄΅ෆཁɻ ؆୯ʹ࣮Ͱ͖Δɻ
6*7JFX$POUSPMMFS ࣗ༝ͷߴ͍6* 6*ɺը໘ભҠɺͯ͢ ಠࣗͰ࣮͢Δඞཁ͕ ͋Δɻ
࡞ͬͯΈΔ
ϓϩδΣΫτ ίϯςφʔΞϓϦ Λͭ͘Δ
5BSHFUΛՃ͢Δ
5BSHFUΛՃ͢Δ import UIKit import Social ! class ShareViewController: SLComposeServiceViewController {
! override func isContentValid() -> Bool { return true } ! override func didSelectPost() { self.extensionContext!.completeRequestReturningItems([], completionHandler: nil) } ! override func configurationItems() -> [AnyObject]! { return NSArray() } ! } 4IBSF7JFX$POUSPMMFSTXJGU όϦσʔγϣϯ ߘϘλϯλοϓ࣌ DPOpHVSBUJPOΞΠςϜͷઃఆ
Ұ࣮ߦͯ͠ΈΔ
$POpHVSBUJPOΞΠςϜͷՃ override func configurationItems() -> [AnyObject]! { var configurationItem :
SLComposeSheetConfigurationItem = SLComposeSheetConfigurationItem() //λΠτϧ configurationItem.title = "ϧʔϜ" //બ͞Ε͍ͯΔϧʔϜ໊ configurationItem.value = "ϚΠνϟοτ"; configurationItem.tapHandler = { [unowned self] in var storyboard : UIStoryboard = UIStoryboard(name: "SelectRoom",bundle: nil) // var vc : SelectRoomTableViewController = storyboard.instantiateInitialViewController() as SelectRoomTableViewController // self.pushConfigurationViewController(vc) } return [configurationItem] } 4IBSF7JFX$POUSPMMFSTXJGU
$POpHVSBUJPOΞΠςϜͷՃ
#BSͷ৭ͷΧελϚΠζ override func viewDidLoad() { super.viewDidLoad() self.navigationController?.navigationBar.backgroundColor = UIColor.redColor() self.navigationController?.navigationBar.tintColor
= UIColor.whiteColor() } 4IBSF7JFX$POUSPMMFSTXJGU
#BSͷ৭ͷΧελϚΠζ
ೖྗνΣοΫ override func isContentValid() -> Bool { if(self.contentText.isEmpty){ return false
} return true } 4IBSF7JFX$POUSPMMFSTXJGU
ೖྗνΣοΫ
4IBSF͢Δ 4IBSF7JFX$POUSPMMFSTXJGU override func didSelectPost() { var inputItem : NSExtensionItem
= self.extensionContext!.inputItems[0] as NSExtensionItem var outputItem : NSExtensionItem = inputItem.copy() as NSExtensionItem; var itemProvider : NSItemProvider = inputItem.attachments![0] as NSItemProvider if (itemProvider.hasItemConformingToTypeIdentifier("public.url")) { itemProvider.loadItemForTypeIdentifier("public.url", options: nil, completionHandler: { (urlItem, error) in if (error != nil) { println("Unable to add as a URL") //Τϥʔ༰ΛϗετΞϓϦʹ͑Δ self.extensionContext!.cancelRequestWithError(error) } else if let url = urlItem as? NSURL { //ೖྗ͞ΕͨςΩετΛઃఆ͢Δ outputItem.attributedContentText = NSAttributedString(string:self.contentText, attributes:nil); //࣮Λ͔͘ //࣮ࡍʹߘͨ͠ΞΠςϜΛϗετΞϓϦʹ͑Δ self.extensionContext!.completeRequestReturningItems([outputItem], completionHandler: nil) } }) } }
ίϯςφʔΞϓϦͱ4IBSF&YUFOTJPOͷ σʔλڞ༗ w ίϯςφΞϓϦͱ&YUFOTJPOͱผͷλʔήοτͳ ͷͰɺ૬ޓͷσʔλΛࢀর͢Δ͜ͱͰ͖ͳ͍ w ,FZDIBJOͷ߹,FZDIBJO4IBSJOHͱ͍͏ڞ༗ํ ๏͕͋Δɻ $PSF%BUBͷ߹"QQ(SPVQͰσʔλڞ༗Ͱ͖ Δɻ
,FZDIBJO4IBSJOH
,FZDIBJO4IBSJOH
ίϯςφʔΞϓϦͰ,FZDIBJOొ UICKeyChainStore.setString("xx0123456789xx", forKey: "accessToken" , service: "chat", accessGroup: "com.chatwork.inhouse.hogehogehoge") 7JFX$POUSPMMFSTXJGU
&YUFOTJPOͰݺͼग़͠ //ೖྗ͞ΕͨςΩετΛઃఆ͢Δ outputItem.attributedContentText = NSAttributedString(string:self.contentText, attributes:nil); //࣮Λ͔͘ var token:String =
UICKeyChainStore.stringForKey("accessToken", service: "chat", accessGroup: "com.chatwork.inhouse.hogehogehoge") ! //࣮ࡍʹߘͨ͠ΞΠςϜΛϗετΞϓϦʹ͑Δ self.extensionContext!.completeRequestReturningItems([outputItem], completionHandler: nil) 4IBSF7JFX$POUSPMMFSTXJGU
6*7JFX$POUSPMMFSΛ͏߹
ԿͰͰ͖ΔͷͰׂѪ
Ҏ্