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:



        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:



        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?