Rya*_*nJM 20 xcode linker-errors flurry testflight cocoapods
我正在升级我的项目以使用Cocoapods,当我尝试为iOS设备或模拟器构建项目时,我得到:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_TestFlight", referenced from:
objc-class-ref in PhotoPreviewViewController.o
"_OBJC_CLASS_$_Flurry", referenced from:
objc-class-ref in MyAppDelegate.o
objc-class-ref in InitialSetupViewController.o
objc-class-ref in InitialDownloadViewController.o
objc-class-ref in HistoryViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)
(当然,架构不同)
在"Link Binary With Libraries"下libPods.a是黑色的,所以我认为那里没有任何问题.它也正在对它们进行自动完成,所以我不确定为什么它在编译时没有找到它们.
有什么建议?
qua*_*tym 70
以下对我有用:
在构建设置中,不要覆盖"其他链接器标志".如果是粗体,选择它并按退格键,它应该恢复到正常状态.如果它没有修复,删除所有标志,删除并重新安装Pods,这应该修复它.
Tom*_*man 22
由于某些原因,libTestFlight.aCocoapods 不包含在TestFlight目标中.因此,要解决此问题,每次运行时pod install,您必须:
Pods-TestFlightSDK在Pods.xcodeproj项目中打开目标Build Phases标签页libTestFlight.a到Link Binary With Libraries下拉列表libTestFlight.a可以在您的[$SRCROOT]/Pods/TestFlightsSDK文件夹中找到.

用Flurry做同样的事情,你很高兴去!
2014年5月1日更新
看起来"缺少库集成"是使用--no-integrate标志的症状(例如,pod install --no-integrate).
为了让生活更轻松,我编写了一个脚本,可以在运行后自动添加库 pod (update|install) --no-integrate
根据需要进行调整,并将其添加到您的底部Podfile:
# Use post_install to automatically include required libraries
post_install do |installer_representation|
installer_representation.project.targets.each do |target|
if target.name == 'Pods-TestFlightSDK'
libFile = installer_representation.project.new_file('TestFlightSDK/libTestFlight.a')
end
if target.name == 'Pods-Brightcove-Player-SDK'
libFile = installer_representation.project.new_file('Brightcove-Player-SDK/Library/libBCOVPlayerSDK.a')
end
unless libFile.nil?
puts " - Adding %s to %s Frameworks Build Phases" % [libFile, target.name]
target.frameworks_build_phase.add_file_reference(libFile)
end
end
end
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9273 次 |
| 最近记录: |