我在几个版本中都没有弄乱我的 OSX 应用程序的框架引用,但出于某种原因,Apple 决定拒绝我的最新版本,因为我缺少引用。这是他们给我的唯一信息:
The app references frameworks which are missing. This may lead to unexpected bugs or undefined behavior. The missing frameworks are
'/Applications/MyApp.app/Contents/MacOS/MyApp' links against (missing, Relative): '@rpath/libavcodec.dylib'
'/Applications/MyApp.app/Contents/MacOS/MyApp' links against (missing, Relative): '@rpath/libavformat.dylib'
'/Applications/MyApp.app/Contents/MacOS/MyApp' links against (missing, Relative): '@rpath/libavutil.dylib'
这对我来说没有意义,因为我有一个构建阶段用于将 .dylib 文件复制到
Libraries
。子路径,我可以在 /Contents/MacOS/Libraries
下看到我的应用程序包中的 .dylib 文件.我的应用程序的运行时搜索路径设置为
LD_RUNPATH_SEARCH_PATHS = @rpath @rpath/Libraries @loader_path/Libraries @executable_path/../Frameworks
SDK 框架设置为 10.8,我的部署目标是 10.6.8。
有任何想法吗?不幸的是,苹果不会给我任何额外的信息。
提前致谢!
最佳答案
这是我从 Apple Developer Technical Support 得到的回复:
This error is a limitation of our review tools to resolve the @rpath relative install path at runtime specifically if the dylibs are installed into an unspecified sub-directory in the app bundle's /Contents/ directory. We don't typically run into the issue because most developers put their dylibs into the app bundle's /Contents/Framework or directly into the /Contents/MacOS/ folders -OR- specify the sub-directory as part of the relative path.
These relative install name paths are documented at: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/dyld.1.html.
Although we recommend that developers use the Frameworks folder (via the '@executable_path/../Frameworks/' install name path) for dylibs you may also use the MacOS folder (via the '@executable_path/' or '@rpath/') install name path).
Note: The @rpath you used would have been resolved by our review tools had it included the 'Libraries' sub-directory path: '@rpath/Libraries/'.
解决方法是将 ffmpeg dylib 移出
Libraries
。文件夹并进入 Frameworks
文件夹。
关于objective-c - 应用被拒绝,因为缺少引用的框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16260088/