简体   繁体   中英

What's the best way to bundle my iOS SDK?

We're developing an SDK for a private service. We have two business plans that we aim to achieve:

  • Shipping our SDK as a proprietary service, so third party developers can receive our SDK without being able to extract its source code.
  • Shipping our SDK as an open library for certain entities, so they can use our SDK and still have access to the source code (something like Pods).

Note the following requirements:

  • Our SDK has Cocoapods dependencies
  • Our SDK shouldn't be accessible to public

What's the best approach to package this SDK (Framework, Library, Custom Pod, etc)? And how could this be done?

My experience is always use static library + pods when cannot use open source, please edit if i have any wrong

  1. Framework:
    • Pros:
      • 1 package contains everything: headers, sources, graphic bundle, etc...
    • Cons:
      • iOS 8.0+ only
      • If fat framework (can be use in both simulator and device) then have to use script to remove the simulator part before upload to AppStore or else get reject
      • Maybe not usable with Cocoapods
  2. Static library:
    • Pros:
      • More flexible on creating extra plugins
      • Can be used with lower iOS version
    • Cons:
      • Separated header and bundle files (install with pods can fix this!)
      • Cannot be created with Swift
  3. Pods:
    • Can be open sources
    • Can be use together with static library, unsure about framework

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM