-
-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] [iOS]Xcode13 duplicate symbol error #435
Comments
Hi @haofanning, could you get it to work? We also have AFNetworking being installed by another plugin and the build fails because of duplicate symbols. |
@azharbeebeejaun No,I cant make it work, so I have to use the old version of cordova-plugin-advanced-http. |
I too am receiving First few lines of duplicates:
@haofanning did you find a version of the plugin that worked? |
@hughknaus I have an old version locally that I downloaded earlier,It depend on AFNetworking.If you want this version,give me your email address,I can send it to you. |
@haofanning what version of |
@hughknaus cordova-ios is newest version 6.2.0 , and I am not sure the version of cordova-plugin-advanced-http, sorry for that , maybe it's 3.0.0 |
@haofanning I was actually moving from 3.0.0 to 3.2.2 because I was getting the same "duplicate symbols" error (only more of them) and I was hoping 3.2.2 would help. I think this started because we had another cordova plugin that required build dependency changes, |
@hughknaus I think you are going in the wrong direction. I think this error is caused by a conflict between the AFNetworking library and newest version cordova-plugin-advanced-http, because the code of the AFNetworking library is used by the latest version of cordova-plugin-advanced-http, resulting in variable redefinition. So the solution is to roll back cordova-plugin-advanced-http to a historical version that does not use SM_AFNetworking or do not refer to AFNetworking when using cordova-plugin-advanced-http. |
@hughknaus Maybe AFNetworking's code is also used in cordova-plugin-background-upload, causing cordova-plugin-background-upload to conflict with cordova-plugin-advanced-http. |
@haofanning Thank you for mentioning that... it's the one thing I didn't check! And it IS using AFNetworking! |
@hughknaus You are welcome |
I noticed that this commit (c2a0317), with message of
renames all the AFNetworking to SM_AFNetworking and the "duplicate symbols" errors that I get relate to SM_AFNetworking, and |
@hughknaus That's why i say you can give me your email address, I have the iOS old version of cordova-plugin-advanced-http and it import AFNetworking too(not include SM_AFNetworking inside). I think it can solve your problem. |
@haofanning I was using 3.0.0, it uses AFNetworking and I get even more "duplicate symbols" with it. From the commit (c2a0317) I imagine that's why they renamed it to SM_AFNetworking, but something else is causing the duplicates with it. I have found no good solution. |
@hughknaus OK then, that seems to work for me so far. Maybe you can find all SM_AFNetworking,make sure it doesn't exist in your project. |
Found that when I remove |
Does this interface
and this implementation
not conflict with AFNetworking interface https://github.com/AFNetworking/AFNetworking/blob/77ef5fed64d98107acd177a90182163a20ba4567/AFNetworking/AFURLSessionManager.m#L343
I know the files are named differently but the interfaces/implementations are named the same... |
I'm glad you found the cause of the problem, maybe we should let the maintainer know. |
@haofanning the maintainer of |
@hughknaus Great to hear that!Thank you for trying. |
PR for main repo: silkimen/cordova-plugin-advanced-http/pull/459 |
Will be fixed in v3.3.1 Thanks for providing the PR @zafirskthelifehacker! 👍 |
The new iOS version plugin conflicts with AFNetworking. The error message is:
duplicate symbol 'OBJC_CLASS$_AFCompoundResponseSerializer' in:
/Users/macmini_3/Library/Developer/Xcode/DerivedData/mp_ios_eim-aeasddxpzolijrfjwreqmesibntn/Build/Products/Debug-iphoneos/AFNetworking/AFNetworking.framework/AFNetworking(AFURLResponseSerialization.o)
/Users/macmini_3/Desktop/金企信/金企信v2/引用库/PluginLib/PluginLib/Plugin_Http.framework/Plugin_Http(SM_AFURLResponseSerialization.o)
duplicate symbol 'OBJC_CLASS$_AFHTTPResponseSerializer' in:
/Users/macmini_3/Library/Developer/Xcode/DerivedData/mp_ios_eim-aeasddxpzolijrfjwreqmesibntn/Build/Products/Debug-iphoneos/AFNetworking/AFNetworking.framework/AFNetworking(AFURLResponseSerialization.o)
/Users/macmini_3/Desktop/金企信/金企信v2/引用库/PluginLib/PluginLib/Plugin_Http.framework/Plugin_Http(SM_AFURLResponseSerialization.o)
duplicate symbol 'OBJC_CLASS$_AFImageResponseSerializer' in:
/Users/macmini_3/Library/Developer/Xcode/DerivedData/mp_ios_eim-aeasddxpzolijrfjwreqmesibntn/Build/Products/Debug-iphoneos/AFNetworking/AFNetworking.framework/AFNetworking(AFURLResponseSerialization.o)
/Users/macmini_3/Desktop/金企信/金企信v2/引用库/PluginLib/PluginLib/Plugin_Http.framework/Plugin_Http(SM_AFURLResponseSerialization.o)
duplicate symbol 'OBJC_CLASS$_AFJSONResponseSerializer' in:
/Users/macmini_3/Library/Developer/Xcode/DerivedData/mp_ios_eim-aeasddxpzolijrfjwreqmesibntn/Build/Products/Debug-iphoneos/AFNetworking/AFNetworking.framework/AFNetworking(AFURLResponseSerialization.o)
/Users/macmini_3/Desktop/金企信/金企信v2/引用库/PluginLib/PluginLib/Plugin_Http.framework/Plugin_Http(SM_AFURLResponseSerialization.o)
duplicate symbol 'OBJC_CLASS$_AFPropertyListResponseSerializer' in:
/Users/macmini_3/Library/Developer/Xcode/DerivedData/mp_ios_eim-aeasddxpzolijrfjwreqmesibntn/Build/Products/Debug-iphoneos/AFNetworking/AFNetworking.framework/AFNetworking(AFURLResponseSerialization.o)
/Users/macmini_3/Desktop/金企信/金企信v2/引用库/PluginLib/PluginLib/Plugin_Http.framework/Plugin_Http(SM_AFURLResponseSerialization.o)
duplicate symbol 'OBJC_CLASS$_AFXMLParserResponseSerializer' in:
/Users/macmini_3/Library/Developer/Xcode/DerivedData/mp_ios_eim-aeasddxpzolijrfjwreqmesibntn/Build/Products/Debug-iphoneos/AFNetworking/AFNetworking.framework/AFNetworking(AFURLResponseSerialization.o)
/Users/macmini_3/Desktop/金企信/金企信v2/引用库/PluginLib/PluginLib/Plugin_Http.framework/Plugin_Http(SM_AFURLResponseSerialization.o)
duplicate symbol 'OBJC_IVAR$_AFCompoundResponseSerializer._responseSerializers' in:
/Users/macmini_3/Library/Developer/Xcode/DerivedData/mp_ios_eim-aeasddxpzolijrfjwreqmesibntn/Build/Products/Debug-iphoneos/AFNetworking/AFNetworking.framework/AFNetworking(AFURLResponseSerialization.o)
/Users/macmini_3/Desktop/金企信/金企信v2/引用库/PluginLib/PluginLib/Plugin_Http.framework/Plugin_Http(SM_AFURLResponseSerialization.o)
duplicate symbol 'OBJC_IVAR$_AFHTTPResponseSerializer._acceptableContentTypes' in:
/Users/macmini_3/Library/Developer/Xcode/DerivedData/mp_ios_eim-aeasddxpzolijrfjwreqmesibntn/Build/Products/Debug-iphoneos/AFNetworking/AFNetworking.framework/AFNetworking(AFURLResponseSerialization.o)
/Users/macmini_3/Desktop/金企信/金企信v2/引用库/PluginLib/PluginLib/Plugin_Http.framework/Plugin_Http(SM_AFURLResponseSerialization.o)
duplicate symbol 'OBJC_IVAR$_AFHTTPResponseSerializer._acceptableStatusCodes' in:
/Users/macmini_3/Library/Developer/Xcode/DerivedData/mp_ios_eim-aeasddxpzolijrfjwreqmesibntn/Build/Products/Debug-iphoneos/AFNetworking/AFNetworking.framework/AFNetworking(AFURLResponseSerialization.o)
/Users/macmini_3/Desktop/金企信/金企信v2/引用库/PluginLib/PluginLib/Plugin_Http.framework/Plugin_Http(SM_AFURLResponseSerialization.o)
The text was updated successfully, but these errors were encountered: