HTML5   发布时间:2022-04-27  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了将库添加到IOS应用程序会导致可怕的构建失败大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试将Apptentive添加IOS应用程序中.已经有相当多的外部库使用,如Admob和Google分析.

我跟着this guide跟着这封信,但我无法让它融为一体.看到下面讨厌的失败信息:

Undefined symbols for architecture armv7:
  "_kCTUnderlinestyleAttributename",referenced from:
      -[ATTTTAttributedLabel commonInit] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTFontCopyName",referenced from:
      ___NSAttributedStringByScalingFontSize_block_invoke in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTFontGetSize",referenced from:
      ___NSAttributedStringByScalingFontSize_block_invoke in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_kCTForegroundColorFromContextAttributename",referenced from:
      _NSAttributedStringBySetTingColorFromContext in libApptentiveConnect.a(TTTAttributedLabel.o)
      ___NSAttributedStringBySetTingColorFromContexT_Block_invoke in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTFramesetterSuggestFrameSizeWithConsTraints",referenced from:
      -[ATTTTAttributedLabel textRectForBounds:limitedTonumberOfLines:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel sizeThatFits:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTFontGetUnderlineThickness",referenced from:
      -[ATTTTAttributedLabel drawStrike:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTLineGetGlyphRuns",referenced from:
      -[ATTTTAttributedLabel drawBACkground:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawStrike:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTFrameGetLineOrigins",referenced from:
      -[ATTTTAttributedLabel characterIndexAtPoint:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawBACkground:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawStrike:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTRunGetTypographicBounds",referenced from:
      -[ATTTTAttributedLabel drawBACkground:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawStrike:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTRunGetStringRange",referenced from:
      -[ATTTTAttributedLabel drawBACkground:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawStrike:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTLineGetOffsetForStringIndex",referenced from:
      -[ATTTTAttributedLabel drawBACkground:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawStrike:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTLineCreateTruncatedLine",referenced from:
      -[ATTTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTLineDraw",referenced from:
      -[ATTTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_kCAGravityResizeAspect",referenced from:
      -[ATFilemessageCell layoutSubviews] in libApptentiveConnect.a(ATFilemessageCell.o)
      -[ATFilemessageCell setCurrentImage:] in libApptentiveConnect.a(ATFilemessageCell.o)
  "_CTFramesetterCreateFrame",referenced from:
      -[ATTTTAttributedLabel characterIndexAtPoint:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel sizeThatFits:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_kCTFontAttributename",referenced from:
      ___65-[ATmessageCenterViewController tableView:cellForRowATindexPath:]_block_invoke in libApptentiveConnect.a(ATmessageCenterViewController.o)
      ___65-[ATmessageCenterViewController tableView:cellForRowATindexPath:]_block_invoke666 in libApptentiveConnect.a(ATmessageCenterViewController.o)
      ___65-[ATmessageCenterViewController tableView:cellForRowATindexPath:]_block_invoke685 in libApptentiveConnect.a(ATmessageCenterViewController.o)
      _NSAttributedStringAttributesFromLabel in libApptentiveConnect.a(TTTAttributedLabel.o)
      _NSAttributedStringByScalingFontSize in libApptentiveConnect.a(TTTAttributedLabel.o)
      ___NSAttributedStringByScalingFontSize_block_invoke in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTFrameGetLines",referenced from:
      -[ATTTTAttributedLabel characterIndexAtPoint:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawBACkground:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawStrike:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel sizeThatFits:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_kCTFontPostScriptNameKey",referenced from:
      ___NSAttributedStringByScalingFontSize_block_invoke in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTFramesetterCreateWithAttributedString",referenced from:
      -[ATTTTAttributedLabel framesetter] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawTexTinRect:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTLineGetTypographicBounds",referenced from:
      -[ATTTTAttributedLabel characterIndexAtPoint:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawBACkground:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawStrike:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTLineGetStringIndexForPosition",referenced from:
      -[ATTTTAttributedLabel characterIndexAtPoint:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTLineGetStringRange",referenced from:
      -[ATTTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel sizeThatFits:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_kCTSuperscriptAttributename",referenced from:
      -[ATTTTAttributedLabel drawStrike:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_kCTParagraphStyleAttributename",referenced from:
      -[ATTTTAttributedLabel commonInit] in libApptentiveConnect.a(TTTAttributedLabel.o)
      _NSAttributedStringAttributesFromLabel in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_kCTForegroundColorAttributename",referenced from:
      ___65-[ATmessageCenterViewController tableView:cellForRowATindexPath:]_block_invoke666 in libApptentiveConnect.a(ATmessageCenterViewController.o)
      -[ATTTTAttributedLabel commonInit] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawStrike:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      _NSAttributedStringAttributesFromLabel in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawTexTinRect:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      ___NSAttributedStringBySetTingColorFromContexT_Block_invoke in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTLineGetPenOffsetForFlush",referenced from:
      -[ATTTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTRunGetAttributes",referenced from:
      -[ATTTTAttributedLabel drawBACkground:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      -[ATTTTAttributedLabel drawStrike:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTParagraphStyleCreate",referenced from:
      -[ATTTTAttributedLabel commonInit] in libApptentiveConnect.a(TTTAttributedLabel.o)
      _NSAttributedStringAttributesFromLabel in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTFontCreateWithName",referenced from:
      ___65-[ATmessageCenterViewController tableView:cellForRowATindexPath:]_block_invoke in libApptentiveConnect.a(ATmessageCenterViewController.o)
      ___65-[ATmessageCenterViewController tableView:cellForRowATindexPath:]_block_invoke666 in libApptentiveConnect.a(ATmessageCenterViewController.o)
      ___65-[ATmessageCenterViewController tableView:cellForRowATindexPath:]_block_invoke685 in libApptentiveConnect.a(ATmessageCenterViewController.o)
      -[ATTTTAttributedLabel drawStrike:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
      _NSAttributedStringAttributesFromLabel in libApptentiveConnect.a(TTTAttributedLabel.o)
      ___NSAttributedStringByScalingFontSize_block_invoke in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_CTLineCreateWithAttributedString",referenced from:
      -[ATTTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in libApptentiveConnect.a(TTTAttributedLabel.o)
  "_OBJC_CLASS_$_CTTelephonyNetworkInfo",referenced from:
      objc-class-ref in libApptentiveConnect.a(ATLegacyRecord.o)
      objc-class-ref in libApptentiveConnect.a(ATDeviceInfo.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command Failed with exit code 1 (use -v to see invocation)

出了什么问题,我该如何解决?现在已经2天了,我疯了.

eta:如果我在一个更轻量级的项目中遵循完全相同的步骤,它构建得很好,所以我猜测存在某种冲突.我只是不知道如何解决它.

解决方法

您还没有为项目添加一些框架. (据推测,CoreText和CoreTelephony)

有关如何执行此操作,请参阅How to “add existing frameworks” in Xcode 4?

Apptentive指南引用:

@H_673_30@

大佬总结

以上是大佬教程为你收集整理的将库添加到IOS应用程序会导致可怕的构建失败全部内容,希望文章能够帮你解决将库添加到IOS应用程序会导致可怕的构建失败所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。