106 duplicate characters for armv7 architecture

Working on my iPhone app and trying to build for debugging, and I get "106 duplicate characters for armv7 architecture"?

I am using the .workspace file because I am trying to use CocoaPods. If I do not use .workspace and instead use .xcodeproj, I do not get an error, but then I lose -lPods.

In my project, I have the following goals in the Project Navigator.

Pods (blue icon) MyProject (blue icon) Restkit.xcodeproj (blue icon) ... all my files 

The problem is that Restkit refers to "AFHTTPClient.h" and all other autofocus code, but I enabled it through CocoaPods. I tried to delete the AFNetworking folder from the RestKit library, but apparently the Restkit library cannot find the version of the AFNetworking subsystem?

Is there a way to force RestKit to use the version of Pods? If not, how can I remove the removal of Pods from my project?

+6
source share
7 answers

One of your .h files has a line that says

 #include "___.m" 

instead

 #include "___.h" 
+6
source

So I fixed it. After removing the RestKit version of AFNetworking from the provider folder, I added it back by dragging it to Xcode. He asks in which project I want it to be used / copied, and this time I selected RestKitTest (or something called RestKitTesting). He is working now. Perhaps earlier I chose RestKit and RestKitTest, what was wrong?

+2
source

I also came up with the same error. Typically, this error occurs due to duplication of classes and xibs in the project folder. For example, in my project, I had these classes twice ServiceRequest.h/.m . Get rid of duplicates, and you're good to go.

+2
source

In the "Phase Assembly" section โ†’ "Compile Sources", make sure that you do not have the same file added twice.

+2
source

"Repeating characters for architecture" problem occurs in two situations:

  • You have added the .m file to your project twice

  • You are using a static library (.a file), which already includes some classes that you include in the project.

To fix any of these cases, check the linker error and look for .o files that are duplicated (example: Reachability.o).

Then go to the assembly phases โ†’ compile sources and search for the specified files, if one of them appears twice, delete one of them, if it appears only once, this means that the file is also included in one of the static libraries added to your project. Remove it from the list of sources to compile and try again.

+2
source
  • I saw this error when, I dragged the calabash frame onto xcode and selected the add to target option in the window shown. Basically two links to the added files were added. I had to manually remove the calabash frame.

  • The right way to do it

    copy to the calabash structure for the project directory then go to the xcode project Select the target โ†’ Assembly phases โ†’ Link the binaries to the libraries and add the frame operation using the + button

0
source

I noticed that duplicate characters are called for Google analytics after installing cocoaPods. As soon as I deleted one of the archives, either libGoogleAnalytics_debug.a or libGoogleAnalytics.a disappeared. But, obviously, if I deleted debug one, I could not start os simulator and vica versa. I know this is not a solution, but at least it can give an idea of โ€‹โ€‹what a solution can be. I will return to this topic if I find out how to have both files in this case.

Edit: I was able to solve the problem by upgrading it from G-analytics version 2 to 3. It has only one library file, and I think this is the reason we no longer get duplicate characters. Hope this makes sense.

0
source

All Articles