Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
App ExtensionでCocoaPods管理しているライブラリを使用する方
Search
Tomonobu Sato
September 24, 2014
2
3k
App ExtensionでCocoaPods管理しているライブラリを使用する方
potatotips #9 の発表資料です
https://github.com/potatotips/potatotips/wiki/potatotips-9
Tomonobu Sato
September 24, 2014
Tweet
Share
More Decks by Tomonobu Sato
See All by Tomonobu Sato
スマートバンクのオンボーディングを支える技術
tmnb
4
1.3k
CREチームを立ち上げました
tmnb
1
460
WWDC2016共有会
tmnb
0
560
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Into the Great Unknown - MozCon
thekraken
31
1.5k
Ruby is Unlike a Banana
tanoku
96
11k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
How to Ace a Technical Interview
jacobian
275
23k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Become a Pro
speakerdeck
PRO
24
5k
Scaling GitHub
holman
458
140k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Statistics for Hackers
jakevdp
796
220k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
4
380
Raft: Consensus for Rubyists
vanstee
136
6.6k
Transcript
"QQ&YUFOTJPOͰ $PDPB1PETཧ͍ͯ͠Δ ϥΠϒϥϦΛ༻͢Δํ๏ QPUBUPUJQT
ࣗݾհ • ࠤ౻༑৴ twitter:@tomonobu_sato • גࣜձࣾFablic • ϑϦϧͱ͍͏ঁੑ͚ϑϦϚΞϓϦΛ։ൃɾӡӦ • iOSΞϓϦ։ൃͷݱͰ㘤͍ͯΈͨʂϑϦϧฤ
• http://qiita.com/yimajo/items/ 26c8e29e44a34a683a78 • iOSྺ 11ϲ݄
ΞδΣϯμ • iOS8ͷ৽ػೳɺApp ExtensionͰCocoaPodsཧ ͍ͯ͠ΔϥΠϒϥϦΛ༻͢Δํ๏Λհ 1.PodfileͷtargetʹAppExtensionΛࢦఆ͢Δ 2.Cocoa Touch FrameworkΛ༻͢Δ
App Extensionͱʁ • iOS8͔Βಋೖ͞ΕͨΞϓϦؒ࿈ܞͷΈ • iOSͰ6छྨʢOS X8छྨʣ
Today ௨ηϯλʔͷʮࠓ(Today)ʯ Ϗϡʔʹஔ͍ͯɺදࣔ༰Λଈ࠲ ʹߋ৽͠ɺ͋Δ͍؆୯ͳλεΫ Λ࣮ߦ͢Δ
Share ใߘαΠτʹهࣄΛߘͯ͠ ଞͷϢʔβͱڞ༗͢Δ
Custom Keyboard iOSγεςϜΩʔϘʔυʹΘΔΧ ελϜΩʔϘʔυΛɺ͋ΒΏΔΞ ϓϦέʔγϣϯͰ͑ΔΑ͏ʹ͢ Δ
ଞʹ • Action • Photo Editing • Storage Provider
targetʹAppExtensionΛࢦఆ ͢Δํ๏ ! platform :ios, ‘7.0’ ! pod ‘AFNetworking' !
target :Extension, :exclusive => true do pod 'AFNetworking' end
1ͭͷΞϓϦͰෳͷApp Extension͕͋Δ߹ platform :ios, ‘7.0’ ! pod ‘AFNetworking' ! target
:Extension1, :exclusive => true do pod 'AFNetworking' end ! target :Extension2, :exclusive => true do pod 'SDWebImage' end
• ϝϦοτ • ࠓ·Ͱͱಉ͡ํ๏Ͱ؆୯ʹ༻Ͱ͖Δ • σϝϦοτ • ΞϓϦͷ༰ྔ͕૿͑Δ
Cocoa Touch FrameworkΛ ༻͢Δ • XCode6͔Β͑Δ • ຊମଆɺExtensionଆͰڞ௨ͯ͠༻͢ΔίʔυΛ FreameworkʹͰ͖Δ •
͜ͷFrameworkʹPodsϥΠϒϥϦΛؚΊΔ
Cocoa Touch FrameworkΛ࡞͢Δ File>New>Target>Framework & Library>Cocoa Touch Framework͔ΒFramework targetΛ࡞
Podfileͷઃఆ platform :ios, ‘7.0’ ! link_With 'SampleKit' pod 'AFNetworking'
Frameworkͷઃఆ ! #import <UIKit/UIKit.h> ! // 自動生成されるコードは長いので省略 ! #import <AFNetworking/AFNetworking.h>
Build Settingsͷมߋ ຊମଆɺExtentionଆͷBuild Settings > Allow Non-Modular Includes In Framework
Modulesͷ ઃఆΛYESʹ͢Δ
ຊମଆ &YUFOTJPOଆ
༻ํ๏ ! #import "ViewController.h" ! #import "SampleKit.h" ! @interface ViewController
() ! @end
• ϝϦοτ • ΞϓϦͷ༰ྔ͕ݮΔ • σϝϦοτ • ༻Ͱ͖ΔͷiOS8Ҏ্ • DeployTarget͕7ҎԼͰίϯύΠϧ௨Δ
• Archive ValidationͰʮThe minimum value is 8.0ʯͱͰ·͢
·ͱΊ • targetʹAppExtensionΛࢦఆ͢Δ • iOS8Ҏલαϙʔτ • ΞϓϦ༰ྔΛؾʹ͠ͳ͍ • Cocoa Touch
FrameworkΛ༻͢Δ • iOS8ͷΈαϙʔτ͢Δ߹Θͳ͍ཧ༝ͳ͍
αϯϓϧίʔυ • ϓϩδΣΫτͷεϖοΫͱࢦఆλʔήοτͷґଘؔ Λ࡞͢Δํ๏ • https://github.com/tmnb/ TodayExtensionSample-Simple • ϦϯΫ͢ΔϓϩδΣΫτͷλʔήοτΛࢦఆ͢Δํ๏ •
https://github.com/tmnb/ TodayExtensionSample-Framework
ϝϯόʔืू • iOS/Android/WebΞϓϦέʔγϣϯ • ސ٬͕ຊʹඞཁͱ͢ΔαʔϏεମݧΛΔ • ʮৼΓฦΕϢʔβʔ͕͍Δʯڥ