Let's say I've a managed/un-managed package to be installed in an Org. I want the Application to have an optional dependency on Omni-Channel feature.
Right now, we have referred the omni channel objects in the classes and hence we get error when trying to install the package without the Omni Channel Enabled in a Salesforce Org.
My question is, at this point, does Salesforce allow optional dependency while installation?
I mean either not to throw the error during the installation but at the time actual controller is referred or to hide the usage by checking while installing the package.
I understand that this is similar to compile time error where the actual object/class is not available for the user in the environment.
Thanks in Advance!