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
470
WWDC2016共有会
tmnb
0
560
Featured
See All Featured
Being A Developer After 40
akosma
86
590k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Gamification - CAS2011
davidbonilla
80
5k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Designing for humans not robots
tammielis
250
25k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Building an army of robots
kneath
302
43k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
A Tale of Four Properties
chriscoyier
156
23k
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ΞϓϦέʔγϣϯ • ސ٬͕ຊʹඞཁͱ͢ΔαʔϏεମݧΛΔ • ʮৼΓฦΕϢʔβʔ͕͍Δʯڥ