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
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Making the Leap to Tech Lead
cromwellryan
133
9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Gamification - CAS2011
davidbonilla
80
5.1k
How STYLIGHT went responsive
nonsquared
95
5.2k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
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ΞϓϦέʔγϣϯ • ސ٬͕ຊʹඞཁͱ͢ΔαʔϏεମݧΛΔ • ʮৼΓฦΕϢʔβʔ͕͍Δʯڥ