I'm running an app that uses EAAccessoryManager, which should only be available via the ExternalAccessory framework. Yet it compiles and runs without ExternalAccessory being included in the list of frameworks to link. Nor is it loaded into Xcode by any other targets. How is this possible? I'm mystified.

I'm curious because I have another project that loads a static library that also references EAAccessoryManager, and in that case, the app won't compile, exiting with the error Undefined symbols for architecture i386. This is more what I expect. What can account for the difference?

有帮助吗?

解决方案 2

In Build Settings, in the “Apple LLVM 5.1 – Languages – Modules” section, “Link Frameworks Automatically” is enabled:

enter image description here

This is a new feature I never noticed before discovered while reading this post on @import (thanks @RhythmicFistman for the hint!). When I change that setting to “No”, I get the linker errors I expect.

其他提示

Could be a linker build setting rather than a link build phase.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top