Additional integration code for the platform: optional dependency or separate structure?

Im the author of the structure X and Id like to distribute small pieces of glue code for optional integration with the frameworks Y and Z. Clients should be able to use X as a standalone structure, but able to use integration code if theyre also uses Y and / or Z.

Header question: Is there a best practice for this, and what are the trade-offs? Below are the detailed subqueries.

My specific case: Im the author of Siesta . Integration with SwiftyJSON or with Alamofire requires only a little code. However, Siesta does not require any of these frameworks.

I see two acceptable options:

  • Configure the Y and Z frameworks as optional X structure dependencies in my Xcode assembly.
  • Distribute individual frameworks : X-core, X + Y glue, and X + Z glue.

Option 1 seems promising at first glance. Isn't that for which optional dependencies? But I'm worried because:

  • I do not see additional dependencies in widespread use.
  • It is unclear whether I will associate clients with specific versions of Y and Z by doing this.
  • How about people using Carthage who build X from the source? It seems that even if they do not use Y or Z, they should include this framework in their Cartfile.private only for assembly X.

Option 2 is simple, but Im concerned about overhead. Even the night frame works with a frequency of> 250 thousand. Is it still so bad in the last application? Is there any overhead for each infrastructure that should bother me if I go along this route?

Are there any other tradeoffs that I don't know about?

+7
ios frameworks xcode swift carthage
source share

No one has answered this question yet.

See related questions:

1348
How to "add existing frames" in Xcode 4?
1132
Xcode - How to fix "NSUnknownKeyException", reason: ... this class does not match the key value encoding the error "X"?
928
How do I call Objective-C code from Swift?
639
Eliminate extra delimiters below UITableView
623
What is the difference between a wireframe and a library?
613
iOS 8 UITableView separator inset 0 not working
562
What is the Spring Framework designed for?
545
Broken infrastructure iOS app on device, dyld: library not loaded, Xcode 6 Beta
499
'Ld: warning: directory not found for option
2
Cannot start XCTest for Cocoa Framework with SwiftyJSON dependency

All Articles