iPhone 应用程序构建失败,并显示“dyld:未加载库:/System/[...]”错误?为什么?
出于我自己的原因,而不是为了应用程序商店,我在 iPhone 应用程序中引用了 Apple 私有框架 Apple80211。我从早期版本的 iPhone SDK 中获取了该框架。
我添加了“现有框架”,验证了框架的绝对路径,
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/PrivateFrameworks/Apple80211.framework
并尝试构建应用程序。
但构建(到设备)失败并出现错误
dyld: Library not loaded: /System/Library/PrivateFrameworks/Apple80211.framework/Apple80211
引用自:/var/mobile/Applications/3691587D-87AF-44EA-A505-F73D17F39B3B/iWire2.app/iWire2 原因:未找到图像
我无法弄清楚为什么 Xcode 会在 /System 路径中查找库(而不是使用框架列表中给出的路径)或如何更改该行为。
我尝试了在此处和其他地方找到的类似(且相同)情况的技巧:
- 删除 xcodeproj 捆绑包中的 myusername.* 文件
- 删除构建目录
- 清理所有目标
- 启动新项目
结果始终相同。
如何将这个(或一个)框架添加到 iPhone 项目中并让 Xcode 至少查看位于我指向的位置的库而不是 /System 中的位置?
For my own reasons and not for the app store I am referencing the Apple private framework Apple80211 in an iPhone app. I got the framework from an earlier version of the iPhone SDK.
I added the "existing framework", verified that that absolute path to the framework is
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/PrivateFrameworks/Apple80211.framework
and tried to build the app.
But the build (to device) fails with the error
dyld: Library not loaded: /System/Library/PrivateFrameworks/Apple80211.framework/Apple80211
Referenced from: /var/mobile/Applications/3691587D-87AF-44EA-A505-F73D17F39B3B/iWire2.app/iWire2
Reason: image not found
I cannot figure out why Xcode would look for the library in a /System path (instead of using the path given in the frameworks list) or how to change that behaviour.
I tried the tricks I found here and elsewhere for similar (and identical) sitiations:
- Delete the myusername.* files in the xcodeproj bundle
- Delete the build directory
- Clean all targets
- Start new project
Result is always the same.
How can I add this (or a) framework to an iPhone project AND get Xcode to at least look at the library located where I point to rather than a location in /System?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试使用文本编辑器打开项目文件,找到该库的记录,并检查其中存储的确切路径。可能 XCode 在其中添加了一些定义。
You can try to open project file with text editor, found records for that library, and check which exact path is stored there. Probably, XCode added some defines inside it.