Unfortunately, this is not possible for third-party applications.
What the calendar app does is limited to apps provided by Apple with elevated rights. This probably requires access to APIs that are private and not publicly documented. If you used them, your application will not pass Apple verification.
source share