Skip to content
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

"duplicate symbols" related to AFNetworking #190

Open
hughknaus opened this issue Mar 2, 2022 · 7 comments
Open

"duplicate symbols" related to AFNetworking #190

hughknaus opened this issue Mar 2, 2022 · 7 comments

Comments

@hughknaus
Copy link

hughknaus commented Mar 2, 2022

I upgraded from 1.1.0 to 2.0.7 for Android. I'm now working on upgrading the iOS side from [email protected] to [email protected]. [email protected] has a requirement to install cocoapods, which required an upgrade in ruby for us. I also installed rubygems for bundler and fastlane. The iOS build results in "duplicate symbols" errors:

...
[16:32:59]	duplicate symbol '_OBJC_IVAR_$_AFImageResponseSerializer._automaticallyInflatesResponseImage' in:
[16:32:59]	    /Users/buildagent/Library/Developer/Xcode/DerivedData/Assist-fjvetwvbnjusdnghjhrzeyodghkr/Build/Intermediates.noindex/ArchiveIntermediates/Assist/IntermediateBuildFilesPath/Assist.build/Release-iphoneos/Assist.build/Objects-normal/arm64/SM_AFURLResponseSerialization.o
[16:32:59]	    /Users/buildagent/TCBuildAgent/work/61a78f4c40187309/platforms/ios/build/device/libAFNetworking.a(AFURLResponseSerialization.o)
[16:32:59]	duplicate symbol '_OBJC_CLASS_$__AFURLSessionTaskSwizzling' in:
[16:32:59]	    /Users/buildagent/Library/Developer/Xcode/DerivedData/Assist-fjvetwvbnjusdnghjhrzeyodghkr/Build/Intermediates.noindex/ArchiveIntermediates/Assist/IntermediateBuildFilesPath/Assist.build/Release-iphoneos/Assist.build/Objects-normal/arm64/SM_AFURLSessionManager.o
[16:32:59]	    /Users/buildagent/TCBuildAgent/work/61a78f4c40187309/platforms/ios/build/device/libAFNetworking.a(AFURLSessionManager.o)
[16:32:59]	duplicate symbol '_OBJC_METACLASS_$__AFURLSessionTaskSwizzling' in:
[16:32:59]	    /Users/buildagent/Library/Developer/Xcode/DerivedData/Assist-fjvetwvbnjusdnghjhrzeyodghkr/Build/Intermediates.noindex/ArchiveIntermediates/Assist/IntermediateBuildFilesPath/Assist.build/Release-iphoneos/Assist.build/Objects-normal/arm64/SM_AFURLS/Users/buildagent/TCBuildAgent/work/61a78f4c40187309/platforessionManager.o
[16:32:59]	    /Users/buildagent/TCBuildAgent/work/61a78f4c40187309/platforms/ios/build/device/libAFNetworking.a(AFURLSessionManager.o)
[16:32:59]	ld: 89 duplicate symbols for architecture arm64
[16:32:59]	clang: error: linker command failed with exit code 1 (use -v to see invocation)
...

I found that cordova-plugin-advanced-http is currently referencing the AFNetworking (albeit renamed to SM_AFNetworking) and the imports in this plugin might be causing the "duplicate symbols", has anyone else ran into this and found a resolution? Cross reference issue on cordova-plugin-advanced-http: silkimen/cordova-plugin-advanced-http#435

@hughknaus
Copy link
Author

Additionally, when I remove cordova-plugin-background-upload from my app I can build without getting the "duplicate symbols" errors (of course that is undesirable as we do need the functionality for background uploading).

@zfir
Copy link
Member

zfir commented Mar 9, 2022

Hello @hughknaus,

We have a forked version of cordova-plugin-advanced-http. We also got some problems regarding AFNetworking. You can try to use this PR in your build: spoonconsulting/cordova-plugin-advanced-http#3

Regards,
Zafir

@hughknaus
Copy link
Author

@zafirskthelifehacker Thank you, I'll give it a try today.

@hughknaus
Copy link
Author

@zafirskthelifehacker with spoonconsulting/cordova-plugin-advanced-http#3 we were able to get a build and the app runs! A step in the right direction. We have to do some additional testing to do on our side but it definitely looks promising! Thanks again.

@zfir
Copy link
Member

zfir commented Mar 10, 2022

Hello @hughknaus,

Great to hear that. After you complete the tests, can you try to merge this PR(spoonconsulting/cordova-plugin-advanced-http#3) on the base repository(https://github.com/silkimen/cordova-plugin-advanced-http)?

Thanks.

Regards,
Zafir.

@zfir
Copy link
Member

zfir commented Mar 10, 2022

We have already created a PR there: silkimen/cordova-plugin-advanced-http#459. Try to see if it can be merged.

Regards,
Zafir.

@silkimen
Copy link

Just merged your PR. It's fixed in cordova-plugin-advanced-http v3.3.1 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants