I have made an objective-C custom framework for my client. The custom framework has many features, one of them is map. I built it on top of Google Maps SDK with some additional actions on map. I added these frameworks and bundle to my custom framework project
GoogleMapsCore.framework
GoogleMapsBase.framework
GoogleMaps.framework
GoogleMaps.bundle
The custom framework works fine for almost client's apps UNTIL one client integrates my custom framework but they also included those above Google Map frameworks to their project before for their app private purpose which isn't related to my map on custom framework purpose.
Their app can build successfully but on runtime it crashes with the exception
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[GMSx_GMPCClientVectorTileExtensionsRoot indoorBuildingMetadata]: unrecognized selector sent to class 0x10xxxxxxx'
Along with it, I receives a ton of logs similar to
objc[483]: Class GMSBaseClearcutClient is implemented in both /private/var/containers/Bundle/Application/2BA0B2AF-5D3D-4664-BAB4-866D3BC9FFCE/<main_app>.app/Frameworks/<my_custom_framework>.framework/<my_custom_framework_name> (0x10xxxxxx) and /private/var/containers/Bundle/Application/2BA0B2AF-5D3D-4664-BAB4-866D3BC9FFCE/<main_app>.app/<main_app_name> (0x10xxxxxxx). One of the two will be used. Which one is undefined.
I searched around the Internet and found that the problem may be app added those 4 Google Map frameworks and bundle more than once as the following explanation
Google Maps not displaying - Failed to decode tile
I suppose the problem is app added these Google Map framework itself and my custom framework also added those, too.
So my question is how can we make the app only recognizes those Google map SDK on app project directory, not those on the custom framework. Is there any way to configure the custom framework can absolutely hide its add-in framework from external app