我正在尝试将 Apptentive 添加到 IOS 应用程序。已经使用了相当多的外部库,例如 Admob 和 Google Analytics。
我关注了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 指南:
In order to use ApptentiveConnect, your project must link against the following frameworks:
CoreData
CoreText
CoreGraphics
CoreTelephony
Foundation
QuartzCore
StoreKit
SystemConfiguration
UIKit
关于ios - 将库添加到 IOS 应用程序会导致可怕的构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18401544/
当我使用Bundler时,是否需要在我的Gemfile中将其列为依赖项?毕竟,我的代码中有些地方需要它。例如,当我进行Bundler设置时:require"bundler/setup" 最佳答案 没有。您可以尝试,但首先您必须用鞋带将自己抬离地面。 关于ruby-我需要将Bundler本身添加到Gemfile中吗?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/4758609/
我有一个ModularSinatra应用程序,我正在尝试将Bootstrap添加到应用程序中。get'/bootstrap/application.css'doless:"bootstrap/bootstrap"end我在views/bootstrap中有所有less文件,包括bootstrap.less。我收到这个错误:Less::ParseErrorat/bootstrap/application.css'reset.less'wasn'tfound.Bootstrap.less的第一行是://CSSReset@import"reset.less";我尝试了所有不同的路径格式,但它
我已经构建了一些serverspec代码来在多个主机上运行一组测试。问题是当任何测试失败时,测试会在当前主机停止。即使测试失败,我也希望它继续在所有主机上运行。Rakefile:namespace:specdotask:all=>hosts.map{|h|'spec:'+h.split('.')[0]}hosts.eachdo|host|begindesc"Runserverspecto#{host}"RSpec::Core::RakeTask.new(host)do|t|ENV['TARGET_HOST']=hostt.pattern="spec/cfengine3/*_spec.r
这里有一个很好的答案解释了如何在Ruby中下载文件而不将其加载到内存中:https://stackoverflow.com/a/29743394/4852737require'open-uri'download=open('http://example.com/image.png')IO.copy_stream(download,'~/image.png')我如何验证下载文件的IO.copy_stream调用是否真的成功——这意味着下载的文件与我打算下载的文件完全相同,而不是下载一半的损坏文件?documentation说IO.copy_stream返回它复制的字节数,但是当我还没有下
我正在尝试解析一个文本文件,该文件每行包含可变数量的单词和数字,如下所示:foo4.500bar3.001.33foobar如何读取由空格而不是换行符分隔的文件?有什么方法可以设置File("file.txt").foreach方法以使用空格而不是换行符作为分隔符? 最佳答案 接受的答案将slurp文件,这可能是大文本文件的问题。更好的解决方案是IO.foreach.它是惯用的,将按字符流式传输文件:File.foreach(filename,""){|string|putsstring}包含“thisisanexample”结果的
当谈到运行时自省(introspection)和动态代码生成时,我认为ruby没有任何竞争对手,可能除了一些lisp方言。前几天,我正在做一些代码练习来探索ruby的动态功能,我开始想知道如何向现有对象添加方法。以下是我能想到的3种方法:obj=Object.new#addamethoddirectlydefobj.new_method...end#addamethodindirectlywiththesingletonclassclass这只是冰山一角,因为我还没有探索instance_eval、module_eval和define_method的各种组合。是否有在线/离线资
1.错误信息:Errorresponsefromdaemon:Gethttps://registry-1.docker.io/v2/:net/http:requestcanceledwhilewaitingforconnection(Client.Timeoutexceededwhileawaitingheaders)或者:Errorresponsefromdaemon:Gethttps://registry-1.docker.io/v2/:net/http:TLShandshaketimeout2.报错原因:docker使用的镜像网址默认为国外,下载容易超时,需要修改成国内镜像地址(首先阿里
我正在尝试在Rails上安装ruby,到目前为止一切都已安装,但是当我尝试使用rakedb:create创建数据库时,我收到一个奇怪的错误:dyld:lazysymbolbindingfailed:Symbolnotfound:_mysql_get_client_infoReferencedfrom:/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundleExpectedin:flatnamespacedyld:Symbolnotfound:_mysql_get_client_infoReferencedf
我需要一个非常简单的字符串验证器来显示第一个符号与所需格式不对应的位置。我想使用正则表达式,但在这种情况下,我必须找到与表达式相对应的字符串停止的位置,但我找不到可以做到这一点的方法。(这一定是一种相当简单的方法……也许没有?)例如,如果我有正则表达式:/^Q+E+R+$/带字符串:"QQQQEEE2ER"期望的结果应该是7 最佳答案 一个想法:你可以做的是标记你的模式并用可选的嵌套捕获组编写它:^(Q+(E+(R+($)?)?)?)?然后你只需要计算你获得的捕获组的数量就可以知道正则表达式引擎在模式中停止的位置,你可以确定匹配结束
我正在尝试在配备ARMv7处理器的SynologyDS215j上安装ruby2.2.4或2.3.0。我用了optware-ng安装gcc、make、openssl、openssl-dev和zlib。我根据README中的说明安装了rbenv(版本1.0.0-19-g29b4da7)和ruby-build插件。.这些是随optware-ng安装的软件包及其版本binutils-2.25.1-1gcc-5.3.0-6gconv-modules-2.21-3glibc-opt-2.21-4libc-dev-2.21-1libgmp-6.0.0a-1libmpc-1.0.2-1libm