Managed Apex Considerations for Package Subscribers

As you use managed Apex, keep these considerations in mind.
  • If a package developer deprecates a global Apex identifier in a managed package, you can only reference that identifier if you specify a package version between the creation and the deprecation of the identifier. Identifiers include global Apex methods, classes, exceptions, enums, interfaces, properties, and class variables. This behavior applies to both static and dynamic references, such as identifiers accessed with the Type.forName() method, the instanceof keyword, and the ApexTypeImplementor object.
  • Similarly, if a package developer deletes a schema from a managed package, you can only reference the schema in Apex if you specify a package version before the deletion of the schema. This behavior applies to both static and dynamic references, such as objects and fields accessed with Schema.describe() methods.