I tried adding XMPP framework into my ios project and I couldn't get it working. Turns out I added it incorrectly, So I tried removing it and now without XMPP I am getting these errors:
Thanks in Advance!

- 824
- 4
- 15
- 25
-
1Is there a way that you can either make the image bigger or copy the text out of it into your message? (Or: "What is this, a screenshot for ANTS?!") – Ian MacDonald Oct 15 '14 at 15:34
-
Made it a little bigger sorry about that! – DanHabib Oct 15 '14 at 15:47
8 Answers
This could also happen because of CocoaPods
. I had this issue with version cocoapods-0.39.0
, downgrading to cocoapods-0.38.2
fixed it for now.

- 23,526
- 11
- 88
- 94
-
1This did the trick for me as well (6 hours into banging my head on the desk). Can you explain how you figured this out so we can open an issue on Github? I haven't seen this reported yet. – Andrew Oct 17 '15 at 05:28
-
1same here... tried everything for a few hours... than downgraded to 0.38.2 and worked perfectly – rsergiu2003 Oct 20 '15 at 08:44
-
Did you do anything special before downgrading? I seem to have the same issue as you but can't fix it since days. I downgraded to 0.38.2 as explained here but that doesn't fix it: http://stackoverflow.com/questions/20487849/downgrading-or-installing-older-version-of-cocoapods I also recloned the project and reinstalled XCode even. – JWKot Oct 20 '15 at 17:17
-
5@JWKothe make sure you also clean your project and delete your derived data. I'm still investigating and will submit an issue asap. – Antoine Oct 23 '15 at 08:02
-
2@Antoine Yes deleting the derived data solved the problem for me finally. Took me days to figure it out. – JWKot Oct 25 '15 at 19:07
-
Following these steps worked for me too. Props to Antoine for this tip. – John McKnight Mar 03 '16 at 23:53
-
@Antoine Yes deleting the derived data solved the problem for me finally [2]. thanks a bunch! – Tiago P Jun 05 '16 at 22:42
I got this error after I refactored class from Obj-c to Swift and although classes names was different but methods names stay the same, so that was causing "Property Has a Previous Declaration" error. But it was only when I try to run app on different target.
So I just remove refactored class from project and clean the project, that solve the problem for me.

- 21
- 2
One of the reason for this is you are having duplicate .h or .m files.
A temporary workaround is to just select your project in Xcode, right-click and hit "Show in Finder".
Search for the file that is giving you error.
You will find two files of that name.
Simply delete one and you are good to go.

- 53
- 1
- 8
I had the same problem when I copied and paste whole XCode project to another location and opened it there. Probably has something with project settings and default paths for classes. Try making a new project and copying and pasting each class individually into the new project, created properly.

- 3,200
- 2
- 30
- 58
the error is your interface Duplicate interface definition for class. this is work for me duplicate interface declaration for class. somehow you have managed to import the .h file twice. Check to make sure you always use #import and not #include.

- 1,363
- 18
- 23
I don't think this will answer your specific problem, but for other people who got here via Google, in my case the problem was caused by a name collision of embedded class in a custom framework. Example of code that will result in such error:
public class Car: NSObject {
public class Wheel: NSObject {
}
}
public class Truck: NSObject {
public class Wheel: NSObject {
// "Wheel" class is duplicated and even though it's embedded in another class,
// it will still result in a collision in a ".h" file
}
}
I'm not actually sure if inheriting from NSObject
changes anything here.

- 614
- 1
- 7
- 16