https://github.com/miyako/4d-plugin-ical-v3
Updated version of iCal API
https://github.com/miyako/4d-plugin-ical-v3
4d-plugin
Last synced: 10 months ago
JSON representation
Updated version of iCal API
- Host: GitHub
- URL: https://github.com/miyako/4d-plugin-ical-v3
- Owner: miyako
- License: mit
- Created: 2020-03-17T00:52:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-29T03:31:56.000Z (almost 2 years ago)
- Last Synced: 2025-06-16T10:53:02.428Z (about 1 year ago)
- Topics: 4d-plugin
- Language: C
- Homepage:
- Size: 10.4 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README


[](LICENSE)


See [4d-utility-sign-app](https://github.com/miyako/4d-utility-sign-app) on how to enable the plugin in 4D.
Alternatively use [4d-class-build-application](https://github.com/miyako/4d-class-build-application) to modify 4D entitlements.
# 4d-plugin-ical-v3
Updated version of iCal API
[miyako.github.io](https://miyako.github.io/2020/03/17/4d-plugin-ical-v3.html)
### Remarks
You must first call ``iCal_Request_permisson`` to ask permission from the user to access their calendar. It is an asynchronous call, which means that in the first instance, it will always return ``{"success":false}``. Later, after the user has granted permission, you might get ``{"success":true}``.
* If the main app (4D) does not have the required ``Info.plist`` property, the following error might be returned.
```json
{
"success":false,
"errorMessage":"NScalendarUsageDescription is missing in app info.plist"
}
```
* If the main app (4D) does not have the required codesigning entitlements, the following error might be returned.
```json
{
"success":false,
"errorMessage":"com.apple.security.personal-information.calendars is missing in app entitlement"
}
```
or
```json
{
"success":false,
"errorMessage":"com.apple.security.personal-information.calendars is set to false in app entitlement"
}
```
If the main app (4D) has the required ``Info.plist`` property as well as codesigning entitlement, and the user has not yet been asked for these permissions for the current application, up to 3 dialogs might be presented, one after the other.



**Note**: The plugin does not need access Reminder or Contacts. However the underlying API will prompt the requests.
The system will only display the dialogs once per application session, and never if the user has already denied the same request.
You can reset security settings from Terminal.
```sh
tccutil reset Reminders com.4d.4d
tccutil reset AddressBook com.4d.4d
tccutil reset Calendar com.4d.4d
```
After the dialog has been presented, one of the following status will be returned.
```json
{
"success":true
}
```
```json
{
"success":false,
"errorMessage":"permission denied"
}
```
```json
{
"success":false,
"errorMessage":"permission restricted"
}
```
```json
{
"success":false,
"errorMessage":"permission not determined"
}
```