将库添加到IOS应用程序会导致可怕的构建失败

将库添加到IOS应用程序会导致可怕的构建失败,第1张

概述我正在尝试将Apptentive添加到 IOS应用程序中.已经有相当多的外部库使用,如Admob和Google分析. 我跟着this guide跟着这封信,但我无法让它融为一体.看到下面讨厌的失败信息: Undefined symbols for architecture armv7: "_kCTUnderlineStyleAttributeName", referenced from: 我正在尝试将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 armv7clang: 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指南引用:

In order to use ApptentiveConnect,your project must link against the
following frameworks:

CoreData CoreText CoreGraphics CoreTelephony Foundation QuartzCore StoreKit SystemConfiguration UIKit

总结

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

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

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1007058.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存