Xmppframework could not build module libxml

此生再无相见时 提交于 2019-12-08 02:19:59

问题


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!


回答1:


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 hope this will help you to resolve your problem as well.




回答2:


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:

  2. Configure Build Settings - Header Search Paths, like this:


The Second : Module 'KissXml' not found

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



来源:https://stackoverflow.com/questions/33595234/xmppframework-could-not-build-module-libxml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!