错误:
dyld:未加载库:@executable_path /../ Frameworks / n.framework / n 参考自:/Users/hunterp/Library/Developer/CoreSimulator/Devices//data/Containers/Bundle/Application//Demo.app/Demo 原因:未找到图像
我在此stackoverflow问题中跟踪了每个答案:iOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 Beta
AND heres我的构建设置:
答案 0 :(得分:4)
我怀疑您的构建设置中存在其他错误,因为您的错误消息包含目录之间的无关斜线
/Users/hunterp/Library/Developer/CoreSimulator/Devices//data/Containers/Bundle/Application//Demo.app/Demo Reason: image not found
^^ ^^
(当我格式化为代码时,语法突出显示很好地指出;))
在搜索框架时,有可能当它上传一个目录(带有..)时,它解析其中一个//
并不像你期望的那样。
我检查您的标题,框架和库搜索路径,查找包含不需要的斜杠的条目,特别是如果它们引用$(BUILDDIR)/
1 或类似的
1。我无法记住实际的环境变量
答案 1 :(得分:1)
我认为错误
dyld:未加载库:@executable_path /../ Frameworks / n.framework / n ...
显示Runpath搜索路径设置为“@executable_path /../ Frameworks” 转到“构建设置” - >“运行路径搜索路径”,删除“@executable_path /../ Frameworks”(如果存在),然后添加“@ executable_path / Frameworks”。
答案 2 :(得分:1)
尝试选择executable_path并按Delete
也可以尝试使用“库搜索路径”和“页眉搜索路径”
如果您有2个目标,请尝试编辑您的pod文件:
target :MainTarget, :exclusive => true do
link_with ['Target1']
pod 'SomePod'
end
target :SecondTarget, :exclusive => true do
link_with ['Target2']
pod 'SomePod'
end
并在终端中运行:pod update