12

When I try to compile and run my existing app with Xcode 9.3 beta It gives me errors like

Declaration of 'xmlKeepBlanksDefault' must be imported from module 'libxml2.parser' before it is required

Implicit declaration of function 'xmlKeepBlanksDefault' is invalid in C99

enter image description here

Its in the file DDXMLDocument.m of KissXML library. Issue already raised on it

Can anyone please help with this ?

mrunal thanki
  • 753
  • 6
  • 16

2 Answers2

12

Update KissXML by running pod update KissXML.

See https://github.com/robbiehanson/KissXML/issues/95 for details.

cahn
  • 1,350
  • 1
  • 12
  • 24
  • 1
    This isn't working for me. I'm getting the same (or very similar) error messages. "Implicit declaration of function 'xmlKeepBlanksDefault' is invalid in C99", and the same thing for "xmlParseMemory", and errors that they must be imported from libxml2.parser before they are required. Updating seems to update it, but the issue remains. Xcode 9.3, KissXML 5.1.2, installed via a POD file with pod 'KissXML/SwiftNSXM' – narco Apr 09 '18 at 23:22
  • @narco you may be using old version. Current 5.2.2 pod spec doesn't have any subspec. – cahn Apr 09 '18 at 23:47
  • if I change my podfile to pod 'KissXML' (I can't remember why I originally had 'KissXML/SwiftNSXM'), then this updates to 5.2.2 and gets rid of this error, but gives a new error:" ld: library not found for -lPods-MyApp clang: error: linker command failed with exit code 1 (use -v to see invocation)". I'm hoping this is an improvement, but I am equally stumped ;) – narco Apr 10 '18 at 01:06
  • 1
    @narco Then I assume compilation succeeds but link fails to find pod framework. That's another story. I think you should search answers or open a new question about it. – cahn Apr 10 '18 at 01:15
2

Above answer works for me, I updated it manually though.

1.Remove existing KissXML from project select move to thrash not by removing reference.

2.Download the zip from github link provided in above answer and extract.

  1. Drag and drop the KissXML Directory into project where you want to add and select copy if needed and select create groups.

  2. right click on imported directory and select show in finder, in directory check everything is copied and showing same in project as well.

This should solve the issue.

iSwapnil
  • 29
  • 2