Search code examples
iosobjective-ccocoapodsafnetworking

1188 duplicate symbols for architecture arm64


this question has been asked a ton of times already but I'm still not able to understand how to really solve this...

I'm a beginner guy in iOS i never did iOS before and I do not understand how this things works, like armv64, armv7, armv64e, armv7s... There are a ton of configurations in the project file I don't understand and I don't even know if they are right or wrong...

My situation at the moment is I'm trying to publish an app to app store but I received an e-mail saying this

ITMS-90809: Deprecated API Usage - Apple will no longer accept submissions of new apps that use UIWebView as of April 30, 2020 and app updates that use UIWebView as of December 2020. Instead, use WKWebView for improved security and reliability. Learn more

Well to my understanding I need to stop using in my app UIWebView and start using WKWebView.

It's ok I did change my code to support WKWebView, but the problem is I still get the error because i have an external library referenced in my Pods.

The library is named AFNetworking and through some research on this post they recommend to change on my Podfile from:

pod 'AFNetworking', '~> 3.0'

to

pod 'AFNetworking', '~> 4.0'

Very well I did change it but it also forced me to changed my deployment target from:

platform :ios, '8.0'

to

platform :ios, '9.0'

Because of this error, "Specs satisfying the AFNetworking (~> 4.0) dependency were found, but they required a higher minimum deployment target."

After I did that i launched the file .xcworkspace and when I try to build I always get these errors of duplicate symbols, lipo, mach-o linker, etc... And honestly this is really confusing to me.

I did try the clean / build method, deintegrate and install pods again, but doesn't solve it, can you please help me ?

EDIT

My Podfile pods:

pod 'MagicalRecord', '~> 2.2'
pod 'MLPAutoCompleteTextField', '~> 1.5'
pod 'MBProgressHUD', '~> 1.1.0'
pod 'ECSlidingViewController', '~> 1.3'
pod 'Fabric', '~> 1.7'
pod 'Crashlytics', '~>  3.9'
pod 'AFNetworking', '~> 4.0'
pod 'Firebase/Messaging'

Image of errors: enter image description here


Solution

  • Thanks for everyone that helped me trying to get this fixed.

    I was able to fix it by doing these steps:

    • I removed some librarys I had referenced in my target, by going to project view -> target -> general and then here I removed some duplicated librarys I had.
    • After that I closed XCode and then went to my project folder in finder and deleted, pods folder, podfile.lock, .xcworkspace file.
    • I also added a line in my podfile use_frameworks!
    • Open terminal, go into project folder, and did the following commands:

    pod deintegrate

    pod install

    • After that opened the newly created .xcworkspace file, clean project and then build.

    I think the problem I had is that I had these frameworks in my project targets and they were the same as in the pods so that's why I had the issue of duplicate symbols.