When an ios xcode application uses more than one static libraries, if the libraries include the same interface with their own implementation, then when application creates the interface instance, a conflict will happen, as it cannot decide which library's implementation should be used.
However, the strange thing is xcode does not give a warning or error when building the application when this happens. The error will happen in runtime, it seems xcode just pick one of the implementation to continue.
The correct way to handle it is create a base library that includes the shared common source interface, and implementation, and then reference it from all other libraries and the application.
However, the strange thing is xcode does not give a warning or error when building the application when this happens. The error will happen in runtime, it seems xcode just pick one of the implementation to continue.
The correct way to handle it is create a base library that includes the shared common source interface, and implementation, and then reference it from all other libraries and the application.
No comments:
Post a Comment