Iglistkit: Including better Swift interfaces/wrapper APIs

Created on 27 Jul 2017  路  2Comments  路  Source: Instagram/IGListKit

Proposal

CocoaTouch frameworks can include both Swift and ObjC. IGListKit should expose better Swift interfaces by including some Swift wrapper APIs.

For example, we could:

  • Provide a proper generic SectionController in Swift by wrapping IGListBindingSectionController, since ObjC lightweight generics aren't really useful in Swift.
  • Provide default parameter values to initializers
  • Namespace the IGListDiff functions and provide defaults for the options

Before, this was blocked by IG internal, but I think this is resolved now? IG internal could re-map the framework to BUCK to exclude the .swift files (in fact, this should already work by default since the BUCK file should only be including .h, .m, .mm, etc.). Thus, only the OSS version would include Swift.

cc @rnystrom can IG/FB internal handle Swift scale now? 馃槃

enhancement proposal question

Most helpful comment

At the very least we could include this in he public project but just exclude it with Buck. Been thinking about this a lot, have some ideas.

All 2 comments

Should be doable, tho Buck still has some issues with mix-matched libs. I _think_ its all fixed with Xcode 9 tho now that static libs work.

At the very least we could include this in he public project but just exclude it with Buck. Been thinking about this a lot, have some ideas.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kanumuri9593 picture kanumuri9593  路  3Comments

PhilCai1993 picture PhilCai1993  路  3Comments

krysztalzg picture krysztalzg  路  3Comments

racer1988 picture racer1988  路  3Comments

HarshilShah picture HarshilShah  路  3Comments