One of the solutions here can be to extract the code to a dylib; it will be loaded after the shared cache. I checked in a test project, and the dylib loaded at the 0x300000000 (12 GB) address.
Post
Replies
Boosts
Views
Activity
To author and everyone complaining here, what behaviour do you expect if there was no error? There is a clear ambiguity, objc compiler doesn't know which class to choose. If there was no error previously, that means that compiler choses one of those classes via some internal, undocumented way, that can lead to faulty and unexpected behaviour.
To solve this issue you can either change objc names to have prefixes (which is a way to resolve namespacing in objc, and definitely should be done in good third party libs):
// FrameworkOne
@objc(ABCThing)
public class Thing: NSObject { ... }
// FrameworkTwo
@objc(XYZThing)
public class Thing: NSObject { ... }
Or, if you don't have any way to affect this code, you have to avoid importing both frameworks at the same time when you referencing an ambiguous definitions.