Cocoapod库问题:DTCoreText

时间:2015-05-10 06:37:41

标签: ios objective-c dtcoretext

我之前提出了一个关于这个问题的问题,但我已经清理了项目并从头开始重新启动。

我试图使用DTCoreText

  1. 我的podfile:
  2. platform :iOS
    pod 'DTCoreText'
    

    ^引用因为某些原因编辑不会让我把代码放在那里。

    1. Other Linker Flags-OjbC -all_load

    2. Linked Frameworks

    3. Project

    4. 我得到一长串错误:

      Undefined symbols for architecture x86_64:
        "_htmlCreatePushParserCtxt", referenced from:
            -[DTHTMLParser parse] in libPods-DTFoundation.a(DTHTMLParser.o)
        "_htmlCtxtUseOptions", referenced from:
            -[DTHTMLParser parse] in libPods-DTFoundation.a(DTHTMLParser.o)
        "_htmlFreeParserCtxt", referenced from:
            -[DTHTMLParser dealloc] in libPods-DTFoundation.a(DTHTMLParser.o)
        "_htmlParseDocument", referenced from:
            -[DTHTMLParser parse] in libPods-DTFoundation.a(DTHTMLParser.o)
        "_xmlDetectCharEncoding", referenced from:
            -[DTHTMLParser parse] in libPods-DTFoundation.a(DTHTMLParser.o)
        "_xmlParseCharEncoding", referenced from:
            -[DTHTMLParser parse] in libPods-DTFoundation.a(DTHTMLParser.o)
        "_xmlSAX2GetColumnNumber", referenced from:
            -[DTHTMLParser columnNumber] in libPods-DTFoundation.a(DTHTMLParser.o)
        "_xmlSAX2GetLineNumber", referenced from:
            -[DTHTMLParser lineNumber] in libPods-DTFoundation.a(DTHTMLParser.o)
        "_xmlSAX2GetPublicId", referenced from:
            -[DTHTMLParser publicID] in libPods-DTFoundation.a(DTHTMLParser.o)
        "_xmlSAX2GetSystemId", referenced from:
            -[DTHTMLParser systemID] in libPods-DTFoundation.a(DTHTMLParser.o)
        "_xmlSAX2InitHtmlDefaultSAXHandler", referenced from:
            -[DTHTMLParser initWithData:encoding:] in libPods-DTFoundation.a(DTHTMLParser.o)
        "_xmlStopParser", referenced from:
            -[DTHTMLParser abortParsing] in libPods-DTFoundation.a(DTHTMLParser.o)
      ld: symbol(s) not found for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      

      这是我第一次尝试使用Cocoapod,我可能在这里犯了一个noob错误

      如果从项目运行的链接框架中删除DTFoundation.a和DTCoreText.a,但我收到以下错误:

      -[NSConcreteMutableAttributedString initWithHTMLData:documentAttributes:]: unrecognized selector sent to instance 
      

      使用他们的示例代码:

      #import "DTCoreText.h"
      
      NSString *html = @"<p>Some Text</p>";
      NSData *data = [html dataUsingEncoding:NSUTF8StringEncoding];
      
      NSAttributedString *attrString = [[NSAttributedString alloc] initWithHTMLData:data
                                                                 documentAttributes:NULL];
      NSLog(@"%@", attrString);
      

      当我使用podfile更新了Jon Suggested并删除了旧配置/链接器标志时出现此错误:

      [!] The `**** [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-****/Pods-****.debug.xcconfig'. This can lead to problems with the CocoaPods installation
          - Use the `$(inherited)` flag, or
          - Remove the build settings from the target.
      
      [!] The `**** [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-****/Pods-****.release.xcconfig'. This can lead to problems with the CocoaPods installation
          - Use the `$(inherited)` flag, or
          - Remove the build settings from the target.
      

      如何重置这些?或者有没有办法告诉它覆盖它?

0 个答案:

没有答案