Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Embedded Framework in Action

Embedded Framework in Action

Tachibana Kaoru

November 29, 2016
Tweet

More Decks by Tachibana Kaoru

Other Decks in Technology

Transcript

  1. check "Allow app extension API only" • Ұ෦ͷiOSͷAPI͸extension͔Β͸࢖༻ෆՄೳʹͳͬͯ ͍Δɻ •

    "Allow app extension API only"Λonʹ͓ͯ͘͠ͱɺ࢖༻ ෆՄೳAPI͕࢖ΘΕͨ࣌ʹϏϧυΤϥʔͱͳΔɻ • ౰ॳ͸Extensionͱͯ͠࢖Θͳ͍Embedded Framework Ͱ΋ɺকདྷతʹ࢖͏͜ͱʹͳͬͨ৔߹ʹۤ࿑͢Δ͜ ͱ΋ଟ͍ͷͰɺνΣοΫΛೖΕ͓ͯ͘ํ͕ແ೉ɻ
  2. Write public init to every class/struct • Embedded framework͸ผϞδϡʔϧͱͳΔͨΊɺ֎෦ ͔ΒΞΫηεՄೳͳͷ͸publicͰએݴ͞Εͨ΋ͷͷΈͱ

    ͳΔɻ • Ϋϥεɾߏ଄ମͰ҉໧తʹੜ੒͞ΕΔinitializer͸internal ͷͨΊɺ໌ࣔతʹpublic initΛهड़͢Δඞཁ͕͋Δɻ
  3. Do not include Bundle into embedded framework • Embedded Frameworkʹ֎෦ϑϨʔϜϫʔΫΛ૊Έࠐ

    ΜͩࡍʹɺͦͷϑϨʔϜϫʔΫ͕BundleΛؚΜͰ͍Δ ͱ໰୊͕ൃੜ͢Δɻ
  4. Do not include Bundle into embedded framework MyApp. app Info.plist

    Frameworks MyLib. framework GoogleMaps bundle A. framework B. framework GoogleMaps. bundle
  5. Do not embed same framework to embedded framework • ಉ͡ϑϨʔϜϫʔΫΛEmbedded

    Framework ͱMain Applicationɺ·ͨ͸ɺEmbedded FrameworkͱExtension Ͱembed͢ΔͱΤϥʔ͕ൃੜ͢Δɻ • Class GMSStreetViewService is implemented in both /.../ MyApp.app/Frameworks/MyLib.framework/MyLib and /.../ Bundle/Application/.../MyApp.app/MyApp. 
 One of the two will be used. Which one is undefined. • CrashlyticsɺFirebaseSDKɺGoogleMapsSDKΛembed͢Δ ͱൃੜ