Is this a supported configuration for Mac sandboxed applications as well as Mac App Store applications?
Dynamically link to a dylib in /usr/local/lib/ that may or may not be codesigned, and may or may not have been installed by a third party.
The documentation tells me how to load dylibs from this location, but it's not altogether clear whether or not this is supported in the mixed scenario I describe above. This is the use case I'm trying to resolve:
I currently have a MAS app that is statically bound to a Unix library in the application bundle. It's worked well this way since 2003!
However my strategy is (tentatively) this: I would redeploy this as a dynamic library and use it pretty much as in, in the application bundle, unless a newer version of the dylib is found in the standard system location (/usr/local/lib/).
The thing is, this is a standard Unix tool that can be built by users with cmake or even installed via homebrew, and so there's no guarantee that I can ensure that it's codesigned, let alone codesigned with my keys. I simply want to make it possible for the non-developer user to allow use of his own dylib if present.
Is the scenario above likely to work with sandboxing? MAS won't reject dynamic instead of static libraries (as iPhone App Store seems to do)?
As for technically making it happen, I plan to check userDefaults (user wants this behavior), check that the library exists at the path, and use dlopen with the appropriate path (app path or /usr/local/lib/).
Thanks.