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
500
WWDC2016共有会
tmnb
0
570
Featured
See All Featured
A Philosophy of Restraint
colly
203
16k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Fireside Chat
paigeccino
34
3.1k
How to train your dragon (web standard)
notwaldorf
88
5.7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Faster Mobile Websites
deanohume
305
30k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
The Language of Interfaces
destraynor
154
24k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Visualization
eitanlees
146
15k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
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ΞϓϦέʔγϣϯ • ސ٬͕ຊʹඞཁͱ͢ΔαʔϏεମݧΛΔ • ʮৼΓฦΕϢʔβʔ͕͍Δʯڥ