Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2092

Updated packaging for CocoaPods

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: libbson, packaging
    • Labels:
      None
    • Environment:
      OS X, iOS

      This was discussed a while ago in CDRIVER-691.

      I've finally had a chance to try to integrate libbson into a Swift project. Using a fork of libbson@1.6.1 with the module map checked in, I was able to publish a prerelease pod and integrate it into an Objective-C project.

      In CocoaPods, all Swift builds, as well as framework-based Objective-C builds, use a module map to collect the interface exposed by a package. This was discussed in CDRIVER-691. Here are a couple links with more information:

      By default CocoaPods generates an umbrella header with all of the package's public header files and a module map around that. That doesn't work for libbson, since directly including e.g. bson-compat.h will result in a preprocessor error, "Only <bson.h> can be included directly."

      The solution is to ship our own module map, referencing the library's umbrella header, and point CocoaPods to that.

      It needs to be checked in. Though it doesn't matter where it is in the repo. I opened this PR: https://github.com/mongodb/libbson/pull/185

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            paulmelnikow Paul Melnikow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: