1

In my app I'm storing data using TouchDB. I've added TouchDB.framework, everything worked fine. Then I had to work with a sqlite database in the same application, and as I'm accustomed with FMDB wrapper, I added it to the project. On build I received the following error:

duplicate symbol _OBJC_CLASS_$_FMDatabase in:
    /Users/me/Library/Developer/Xcode/DerivedData/.../armv7/FMDatabase.o
    /Users/me/.../TouchDB.framework/TouchDB(FMDatabase.o)

I guess that TouchDB framework contains FMDatabase file as well, but it's missing from Headers folder. How to fix this issue?

iOS Dev
  • 4,143
  • 5
  • 30
  • 58

1 Answers1

1

Don't link against FMDatabase, just link against TouchDB. Since I'm not sure how you're setting up those links, that's as precise as I can be.

David Berry
  • 40,941
  • 12
  • 84
  • 95
  • I don't quite understand your answer, you mean not include FMDB files (like FMDatabase) in the project? If so how to use them? – iOS Dev May 07 '14 at 19:45
  • @Euroboy If TouchDB doesn't include the FMDB .h files, you can add those to your project, but don't add the FMDB .m files. – Rob May 07 '14 at 20:01
  • Yeah, it looks like you're including the FMDB .m files, so just select all of them in the project window, open the inspector panel on the right, and make sure none of the targets are checked under Target Membership. – David Berry May 07 '14 at 20:48