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
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
150
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
110
The Rails Doctrine Decade
koic
2
590
ActionController meets Protocol Buffers
sorah
0
520
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.6k
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
430
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
170
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
550
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
Featured
See All Featured
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
270
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
890
It's Worth the Effort
3n
188
29k
Why Our Code Smells
bkeepers
PRO
340
58k
Leo the Paperboy
mayatellez
10
2.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
530
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
530
Thoughts on Productivity
jonyablonski
76
5.4k
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Λ͏߹
ԿͰͰ͖ΔͷͰׂѪ
Ҏ্