iPhone application build fails with "dyld: Library not loaded: /System/[...]" error? Why?
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?
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.
精彩评论