TextileDelegate

@protocol TextileDelegate <NSObject>

Protocol that can be implemented in order to receive callbacks from Textile about events of interest

  • Called when the Textile node is started successfully

    Declaration

    Objective-C

    - (void)nodeStarted;

    Swift

    optional func nodeStarted()
  • Called when the Textile node fails to start

    Declaration

    Objective-C

    - (void)nodeFailedToStartWithError:(nonnull NSError *)error;

    Swift

    optional func nodeFailedToStartWithError(_ error: Error)

    Parameters

    error

    The error describing the failure

  • Called when the Textile node is successfully stopped

    Declaration

    Objective-C

    - (void)nodeStopped;

    Swift

    optional func nodeStopped()
  • Called when the Textile node fails to stop

    Declaration

    Objective-C

    - (void)nodeFailedToStopWithError:(nonnull NSError *)error;

    Swift

    optional func nodeFailedToStopWithError(_ error: Error)

    Parameters

    error

    The error describing the failure

  • Called when the Textile node comes online

    Declaration

    Objective-C

    - (void)nodeOnline;

    Swift

    optional func nodeOnline()
  • Called when the node is scheduled to be stopped in the future

    Declaration

    Objective-C

    - (void)willStopNodeInBackgroundAfterDelay:(NSTimeInterval)seconds;

    Swift

    optional func willStopNodeInBackground(afterDelay seconds: TimeInterval)

    Parameters

    seconds

    The amount of time the node will run for before being stopped

  • Called when the scheduled node stop is cancelled, the node will continue running

    Declaration

    Objective-C

    - (void)canceledPendingNodeStop;

    Swift

    optional func canceledPendingNodeStop()
  • Called when the Textile node receives a notification

    Declaration

    Objective-C

    - (void)notificationReceived:(id)notification;

    Swift

    optional func notificationReceived(_ notification: Any!)

    Parameters

    notification

    The received notification

  • Called when any thread receives an update

    Declaration

    Objective-C

    - (void)threadUpdateReceived:(nonnull NSString *)threadId
                            data:(nonnull FeedItemData *)feedItemData;

    Swift

    optional func threadUpdateReceived(_ threadId: String, data feedItemData: FeedItemData)

    Parameters

    threadId

    The id of the thread being updated

    feedItemData

    The thread update

  • Called when a new thread is successfully added

    Declaration

    Objective-C

    - (void)threadAdded:(nonnull NSString *)threadId;

    Swift

    optional func threadAdded(_ threadId: String)

    Parameters

    threadId

    The id of the newly added thread

  • Called when a thread is successfully removed

    Declaration

    Objective-C

    - (void)threadRemoved:(nonnull NSString *)threadId;

    Swift

    optional func threadRemoved(_ threadId: String)

    Parameters

    threadId

    The id of the removed thread

  • Called when a peer node is added to the user account

    Declaration

    Objective-C

    - (void)accountPeerAdded:(nonnull NSString *)peerId;

    Swift

    optional func accountPeerAdded(_ peerId: String)

    Parameters

    peerId

    The id of the new account peer

  • Called when an account peer is removed from the user account

    Declaration

    Objective-C

    - (void)accountPeerRemoved:(nonnull NSString *)peerId;

    Swift

    optional func accountPeerRemoved(_ peerId: String)

    Parameters

    peerId

    The id of the removed account peer

  • Called when any query is complete

    Declaration

    Objective-C

    - (void)queryDone:(nonnull NSString *)queryId;

    Swift

    optional func queryDone(_ queryId: String)

    Parameters

    queryId

    The id of the completed query

  • Called when any query fails

    Declaration

    Objective-C

    - (void)queryError:(nonnull NSString *)queryId error:(nonnull NSError *)error;

    Swift

    optional func queryError(_ queryId: String, error: Error)

    Parameters

    queryId

    The id of the failed query

    error

    The error describing the failure

  • Called when there is a message query result available

    Declaration

    Objective-C

    - (void)pubsubQueryResult:(nonnull NSString *)queryId
                      message:(nonnull NSString *)message
                    messageId:(nonnull NSString *)messageId;

    Swift

    optional func pubsubQueryResult(_ queryId: String, message: String, messageId: String)

    Parameters

    queryId

    The id of the corresponding query

    message

    The message text

    messageId

    The id of the message

  • Called when there is a thread query result available

    Declaration

    Objective-C

    - (void)clientThreadQueryResult:(nonnull NSString *)queryId thread:(id)thread;

    Swift

    optional func clientThreadQueryResult(_ queryId: String, thread: Any!)

    Parameters

    queryId

    The id of the corresponding query

    thread

    A thread query result

  • Called when there is a contact query result available

    Declaration

    Objective-C

    - (void)contactQueryResult:(nonnull NSString *)queryId contact:(id)contact;

    Swift

    optional func contactQueryResult(_ queryId: String, contact: Any!)

    Parameters

    queryId

    The id of the corresponding query

    contact

    A contact query result

  • Called when there is a cafe sync group status update

    Declaration

    Objective-C

    - (void)syncUpdate:(id)status;

    Swift

    optional func syncUpdate(_ status: Any!)

    Parameters

    status

    Object containing information about a cafe sync group

  • Called when a cafe sync group is complete

    Declaration

    Objective-C

    - (void)syncComplete:(id)status;

    Swift

    optional func syncComplete(_ status: Any!)

    Parameters

    status

    Object containing information about a cafe sync group

  • Called when a cafe sync group fails

    Declaration

    Objective-C

    - (void)syncFailed:(id)status;

    Swift

    optional func syncFailed(_ status: Any!)

    Parameters

    status

    Object containing information about a cafe sync group