0 Replies
      Latest reply on Nov 14, 2019 12:23 PM by stevekelly20
      stevekelly20 Level 1 Level 1 (0 points)

        We have a closed source framework and would like to allow our customers to enable extra functionality if they link to a specific set of additional closed source frameworks (Google Maps).  If some customers don't want the extra functionality (or if they're currently using Google Maps and don't care about our extended functionality) they should be able to continue using our framework as they have been.

         

        It seems like entire-framework weak-linking as described here would be the correct approach:

        https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html#//apple_ref/doc/uid/20002378-107026

         

        Then we could check for the existance of the GoogleMaps frameworks within the app using something like:

        `if ([GSMapView class]) { allow_the_customer_to_use_our_google_maps_functionality() }`

         

        The problem we've run into is that even when we weak link to the Google Maps frameworks as described in the above document `[GSMapView class]` never returns nil.  The Google Maps symbols appear to be embedded in our framework and customers who currently include GoogleMaps in their application will get "duplicate symbols" warnings when they install our framework.  (Note that a dependency manager like Cocoapods does not solve the problem because our framework is closed source and must be delivered as a precompiled component)

         

        I should also say that our framework is dynamic.  We tried changing our framework to static as recommended by this stackoverflow answer:

        https://stackoverflow.com/a/47303544

         

        However that essentially gives us the opposite problem, ie: a customer trying to compile our framework WITHOUT Google Maps will get missing symbol errors.

         

        Can anyone help us correctly weak link two closed source frameworks?

         

        Thanks,

        -Steve