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
A Modern Web Designer's Workflow
chriscoyier
693
190k
Practical Orchestrator
shlominoach
186
10k
Side Projects
sachag
452
42k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
How to train your dragon (web standard)
notwaldorf
88
5.7k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Building Applications with DynamoDB
mza
90
6.1k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Music & Morning Musume
bryan
46
6.2k
Docker and Python
trallard
40
3.1k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
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ΞϓϦέʔγϣϯ • ސ٬͕ຊʹඞཁͱ͢ΔαʔϏεମݧΛΔ • ʮৼΓฦΕϢʔβʔ͕͍Δʯڥ