Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xmppframework could not build module libxml

Xcode

On DDXMLNode.h

My project import XMPPFramework by cocoapods ,like:

pod 'XMPPFramework', '~> 3.6.6'

I find some way like:

1.header search paths add "$(SDKROOT)/usr/include/libxml2"

2.Other Linker Flags add "-lxml2"

3.Framework Search Path add "/usr/lib/libxml2.dylib"

All not working!

like image 260
weijia.wang Avatar asked Sep 06 '26 11:09

weijia.wang


2 Answers

Instead of changing path of the files, you can do what I have done to resolve my error in Xcode 7.2 beta. First check if you have file libxml2.tbd framework and libresolve.tbd framework; if not then add it to you project and replace few things:

#if !(TARGET_IPHONE_SIMULATOR)
//@import dnssd;
#import <dns_sd.h>
#else
//@import dnssdSimu;
#import <dns_sd.h>
#endif

Second thing you have to do is replace this one:

   #if !(TARGET_IPHONE_SIMULATOR)
   //@import libxml;
  #import <libxml/tree.h>
 #else
 //@import libxmlSimu;
 #import <libxml/tree.h>
  #endif

This resolved my problem.

like image 175
objectiveCoder Avatar answered Sep 07 '26 23:09

objectiveCoder


Ok, I'll say get down to business. I use Cocoapods at the beginning, everything goes well and do not configure something, but because of the need to modify the source code to meet certain requirements, so manually add XMPPFramework, but encountered all sorts of issues.


The First : Modlue 'libxmlSimu' not found

In order to solve this problem, I did two things:

  1. Download the file https://github.com/robbiehanson/KissXML/blob/master/libxml/module.modulemap and import to your project. Like this: enter image description here

  2. Configure Build Settings - Header Search Paths, like this: enter image description here


The Second : Module 'KissXml' not found

By replace @import KissXml; to #import "DDXML.h"

like image 30
tianglin Avatar answered Sep 08 '26 00:09

tianglin