Добавление библиотеки в приложение IOS вызывает ужасный сбой сборки
Я пытаюсь добавить Apptentive в приложение IOS. Уже используется немало внешних библиотек, таких как Admob и Google Analytics.
Я следовал этому руководству к письму, но просто не могу смешать его. Вот ужасное сообщение об ошибке ниже:
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 дня, и я схожу с ума.
Этап: если я выполняю те же самые шаги в более легком проекте, он прекрасно собирается, поэтому я предполагаю, что есть какой-то конфликт. Я просто не знаю, как это решить.
1 ответ
Вы не добавили некоторые фреймворки в проект. (По-видимому, CoreText
а также CoreTelephony
)
Для того, как это сделать, смотрите Как "добавить существующие фреймворки" в Xcode 4?
Цитата из Apptentive путеводителя:
Чтобы использовать ApptentiveConnect, ваш проект должен ссылаться на следующие структуры:
CoreData
CoreText
CoreGraphics
CoreTelephony
Фонд
QuartzCore
StoreKit
Конфигурация системы
UIKit