Page 1 of 1

Objective-C documentation, whats it mean?

Posted: Tue Nov 29, 2022 5:08 pm
by Simon Knight
Hi,

I am struggling with binding LCB script to a Objective-C method of the EventKit.

The instance method requestAccessToEntityType:completion: is documented here: https://developer.apple.com/documentati ... guage=objc

The method description contains reference to a Completion Handler which I understand to be a pointer to a block of code that gets run once the method completes. Clicking on the link on the documentation page EKEventStoreRequestAccessCompletionHandler opens a new page that describes a Type Alias : https://developer.apple.com/documentati ... guage=objc

The description of the block is "The signature for a block that EventKit calls when requesting access to event and reminder data"

Code: Select all

typedef void (^EKEventStoreRequestAccessCompletionHandler)(BOOL granted, NSError *error);
The type description lists two parameters granted and *error.
I am unclear as what is meant by the term signature. Does it mean that whatever block of code defined as the completion handler must accept the two parameters 'granted' and '*error' ?

Re: Objective-C documentation, whats it mean?

Posted: Thu Dec 01, 2022 10:18 am
by Simon Knight
I have managed to get the syntax correct but am still have issues which deserve a different thread.

S