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
330
モバイルアプリ開発チームをプラットフォームチームで分割した話
shoheifukui
0
660
iOSアプリの 大きな技術的負債に立ち向かう
shoheifukui
1
1.3k
モバイルアプリでのFeatureFlagの導入
shoheifukui
0
700
Other Decks in Programming
See All in Programming
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2.4k
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
630
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
190
Heart of Swift Concurrency
koher
0
930
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
490
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
250
XHTMLが残したもの
yosuke_furukawa
PRO
2
830
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
310
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
180
Intent as Code
shoppingjaws
6
1.1k
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
2.3k
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
120
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Curious Case for Waylosing
cassininazir
1
510
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
30 Presentation Tips
portentint
PRO
1
400
Building Adaptive Systems
keathley
44
3.2k
The SEO Collaboration Effect
kristinabergwall1
1
570
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.2k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
540
Discover your Explorer Soul
emna__ayadi
2
1.3k
WENDY [Excerpt]
tessaabrams
14
39k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
The Curse of the Amulet
leimatthew05
3
15k
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Λ͏߹
ԿͰͰ͖ΔͷͰׂѪ
Ҏ্