I've tried adding this debenu library to a pure native iOS project and it works.
Problem:
However when I try to add it to a cardova xcode porject, it gives me these errors:
Undefined symbols for architecture x86_64: "_CTFontCollectionCreateFromAvailableFonts", referenced from: ScreenFonts(int, int) in libDebenuPDFLibraryCPiOS1115.a(DebenuPDFLibraryFontConst.o) "_CTFontCollectionCreateMatchingFontDescriptors", referenced from: ScreenFonts(int, int) in libDebenuPDFLibraryCPiOS1115.a(DebenuPDFLibraryFontConst.o) "_CTFontDescriptorCopyAttribute", referenced from: ScreenFonts(int, int) in libDebenuPDFLibraryCPiOS1115.a(DebenuPDFLibraryFontConst.o) "std::runtime_error::what() const", referenced from: vtable for fmt::FormatError in libDebenuPDFLibraryCPiOS1115.a(format.o) "std::__1::basic_string, std::__1::allocator >::at(unsigned long) const", referenced from: TPDFIndObj::IsStream(std::__1::basic_string, std::__1::allocator > const*, int&, int&) in libDebenuPDFLibraryCPiOS1115.a(DebenuPDFLibraryDocument.o) "std::__1::basic_string, std::__1::allocator >::find(char, unsigned long) const", referenced from:
This are the steps I did:
- Create a new cordova Xcode project
- Add the libxml2.dyliblibrary to the "Link binary with libraries" list in the target's Build Phases project settings
- Add the DebenuPDFLibraryCPiOSObjC1115.h header file to the project
- Add the static library libDebenuPDFLibraryCPiOS1115.a to the project
- Add the lc++ option to the “Otherlinkerflags” optionintheprojectsettings
- Add a button and link it to an IBAction called buttonClick,
- Compile with 141 errors