【问题标题】:Build failed after remove Testflight删除 Testflight 后构建失败
【发布时间】:2015-01-09 10:48:42
【问题描述】:

我是 ios 开发的菜鸟。我有一个项目,我需要从中删除 testflight 库。我一直在评论有关 Testflight 的所有引用行,但现在我得到了“_TFLog”的下一个错误,但我不知道如何解决它。

Undefined symbols for architecture armv7:
  "_TFLog", referenced from:
      -[BibliotecaViewController loadCategories] in BibliotecaViewController-49994DBCE4C92E5B.o
      -[ViewController viewDidLoad] in ViewController.o
      -[ViewController alertView:clickedButtonAtIndex:] in ViewController.o
      -[ViewController checkUpdatesLocally] in ViewController.o
      -[ViewController productsRequest:didReceiveResponse:] in ViewController.o
      -[ViewController request:didFailWithError:] in ViewController.o
      -[ViewController completedPurchaseTransaction:] in ViewController.o
      ...
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我需要做什么?

P.D.:对不起我的英语,谢谢!

【问题讨论】:

  • 在代码中搜索 TFLog 并注释/删除这些行。
  • 谢谢,我已经注意到了。在我的项目 *-Prefix.pch 中,我删除了下一行:#define NSLog(FORMAT, ...) TFLog((@"%s [Line %d] " FORMAT )、PRETTY_FUNCTION、LINE、##__VA_ARGS__)
  • 所以@lupatus 方式不适合你?

标签: ios objective-c xcode testflight


【解决方案1】:

当您导入标头但未链接到库时,这是一个常见错误。

您通常通过在build phases->link Binary with Library 的部分或build settings->Search Paths->Library Search Paths 的部分中添加库来解决它

但在你的情况下,你不想使用TFLog。所以首先在整个项目中搜索TFLog(cmd+shift+F)并删除相关行并尝试重建您的项目。

【讨论】:

    【解决方案2】:

    在项目中,*-Prefix.pch文件中,需要删除下一行:

    #define NSLog(FORMAT, ...) TFLog((@"%s [Line %d] " FORMAT), PRETTY_FUNCTION, LINE, ##__VA_ARGS__)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-21
      • 1970-01-01
      相关资源
      最近更新 更多