When you build your app on the ipad, the following prompt appears:
Objc [1334]: Class ASIAuthenticationDialog is implemented in both/var/mobile/Applications/DDD5C5F0-49E4-425F-AEAE-0AC27FA8A0AC/MyApp. app/MyApp and/Library/MobileSubstrate/DynamicLibraries/SogouInputIPad. dylib. one of the two will be used. which one is undefined.
The prompt indicates that ASIAuthenticationDialog is used in both the app and sogou input methods. As a result, objc-runtime cannot decide whether to call the implementation in that program.
Find the reason for data discovery: The objc runtime uses the same namespace for the app. The operating mechanism is as follows:
First, the binary image is loaded and the program dependency is checked.
When each binary image is loaded, the objc classes of the program is registered in the objc runtime namespace.
If a class with the same name is loaded again, the behavior of objc runtime is unpredictable. One possibility is that the class of any program will be loaded (this should also be the default action)
This warning is triggered only when the app and sogou input method both use the ASIHTTPRequest third-party encapsulation.
If we cannot obtain the source code of conflicting apps, the corresponding solution I found is to rename the same class, but this is complicated.
The solutions found are mainly for ios unit test. For different apps, you can only rename your own classes.
The Bundle Loader and Symbols hidden by default mentioned in the document can be searched in Build Settings of TARGET.
To sum up, write apps using classes that come with Cocoa touch as much as possible, and use less third-party encapsulation.