XCode framework Problem

Started by
4 comments, last by guvidu 17 years, 1 month ago
Hy there! Can you guys tell me how can i make xcode compile the application so that it looks for the frameworks in app/Resources/Frameworks ?? I have managed to make it copy the framework to the app folder but it still looks for them to Library/Frameworks. Thanks!
Advertisement
You have to manually change the paths for the frameworks, and you do that with the command line tool "install_name_tool".

You use "otool -L MyApp.app/Contents/MacOS/MyApp" to list all frameworks referenced by the app, and then change them with install_name_tool like this: "install_name_tool -change /Users/me/Library/Frameworks/theFramework.framework/theFramework @executable_path/../Frameworks/theframework.framework MyApp.app/Contents/MacOS/MyApp".
Thanks!. I Managed to make what you sad but still it doesnt work - it still looks on Library/Frameworks but when using otool-L is shows @executable_path/..//Frameworks/Ogg.framework
Oops, I missed the binary in the framework, "install_name_tool -change /Users/me/Library/Frameworks/theFramework.framework/theFramework @executable_path/../Frameworks/theFramework.framework/theFramework MyApp.app/Contents/MacOS/MyApp" is the correct usage, you have to enter the binaries of the frameworks.

If this doesn't help, can you please show me the exact output of otool -L?

And note that this looks for the framework in MyApp.app/Contents/Frameworks/ and not MyApp.app/Contents/Resources/Frameworks/
Well actualy i did it with the bynary of the framework - but still didnt load - i will send what the console output tommorow cause i dont have the pc with the program now. Thanks!
Thanks for the help - it work - the problem was that one of my framework was looking for an other framework in Library/Frameworks so i will have to change the bynary for that framework with your method and everything will be ok . Thanks for the help!

This topic is closed to new replies.

Advertisement