The property has a previous declaration.

I tried to add the XMPP infrastructure to my ios project, and I could not get it to work. It turns out that I added it incorrectly, so I tried to delete it and now without XMPP I get the following errors: Thank you in advance! enter image description here

+6
source share
7 answers

This may also be due to CocoaPods . I had this problem with version cocoapods-0.39.0 , at the moment it is fixed to cocoapods-0.38.2 .

+14
source

There are two copies of AFNetworking in your project. Remove one of them.

... or better yet, use CocoaPods to integrate AFNetworking and your XMPP infrastructure into your project.

+5
source

Perhaps this is due to a number of added properties codecutcut

+2
source

I got this error after I reworked the class from Obj-c to Swift, and although the class names were different, the method names remained unchanged, so this caused a "Property with previous declaration" error. But this was only when I try to run the application for a different purpose.

So I just remove the refactored class from the project and clean up the project that solves the problem for me.

+2
source

One reason for this is the presence of duplicate .h or .m files.
The workaround is to simply select your project in Xcode, right-click and click "Show in Finder".
Search for a file that gives you an error.
You will find two files with this name.
Just delete it and you will go well.

+1
source

I had the same problem when I copied and embedded the whole Xcode project in a different place and opened it there. There is probably something with project settings and default paths for classes. Try to create a new project and copy and paste each class separately into a new project created properly.

+1
source

the error is your interface Duplicate interface definition for the class . this is work for me duplicating an interface declaration for a class . somehow you managed to import the .h file twice. Make sure you always use #import, not #include.

+1
source

Source: https://habr.com/ru/post/976786/


All Articles