simon.d
simon.d

Reputation: 2531

App rejected because referenced frameworks are missing

I haven't messed with my OSX app's framework references in several releases, yet for some reason Apple decided to rejected my latest version because I had missing references. Here was the only info they gave me:

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'

This doesn't make sense to me because I have a Build Phase for copying the .dylib files to the Libraries subpath, and I can see the .dylib files in my app package under /Contents/MacOS/Libraries.

My app's Runtime Search Path is set to LD_RUNPATH_SEARCH_PATHS = @rpath @rpath/Libraries @loader_path/Libraries @executable_path/../Frameworks

The SDK framework is set for 10.8 and my deploy target is 10.6.8.

Any ideas? Unfortunately Apple won't give me any additional information to go on.

Thanks in advance!

Upvotes: 4

Views: 602

Answers (1)

simon.d
simon.d

Reputation: 2531

This was the response I got from 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/'.

The fix was to move the ffmpeg dylibs out of a Libraries folder and into the Frameworks folder.

Upvotes: 3

Related Questions