문제

uFunction ::CFBundleLoadExecutable returns me FALSE after trying to loading compiled bundle. When I tried to use function ::CFBundleLoadExecutableAndReturnError instead the error I got was:

CFBundleExecutableLoadError = -2002

The reason string is: The bundle is damage or missing necessary resources

The suggesting is: Try to reinstall the bundle.

As you can see, this is an extremely helpful information. Maybe someone can suggest a better way to understand what is the problem with the bundle? Thanks!

Update: If I launch an application through XCode - everything works. (Even if it is Release compilation). But if I run application from Menu / Command Line - CFBundleExecutableLoadError fails :(

도움이 되었습니까?

해결책

I found a problem eventually. There was a dependency in the bundle's DLL on one of the libraries, which name was changed during the Post-Build stage by install_name_tool. install_name_tool location was changed in Xcode 4.6, so this step was missing, therefore bundle's dll looked for the wrong library in wrong location.

I guess giving error like "Library XXXXX in missing" is too much for Apple....

Hope it will help someone someday.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top