I have a framework with installation directory @rpath and app with runpath search path @loader_path/../Frameworks which uses this framework.

After building I have My.app and My.framework in Build/Products/Debug directory and I don't copy My.framework into My.app bundle.

If I run My.app from Xcode it runs and loads framework from Build/Products/Debug directory. If I run my app from Finder it can't load the framework as expected.

Does Xcode set runtime search path and how? DYLD_LIBRARY_PATH?

有帮助吗?

解决方案

Yes, Xcode sets both DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH to point to your built product directory when it runs your application.

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