CKAnalyticsListener Protocol Reference

Conforms to NSObject
Declared in CKAnalyticsListener.h

Overview

This protocol is being used by the infrastructure to collect data about the component tree life cycle.

– willBuildComponentTreeWithScopeRoot:buildTrigger:stateUpdates: required method

Called before the component tree creation.

- (void)willBuildComponentTreeWithScopeRoot:(CKComponentScopeRoot *)scopeRoot buildTrigger:(BuildTrigger)buildTrigger stateUpdates:(const CKComponentStateUpdateMap &)stateUpdates

Parameters

buildTrigger

The build trigger (new tree, state update, props updates) for this component tree creation.

stateUpdates

The state updates map for the component tree creation.

scopRoot

Scope root for component tree. Use that to identify tree between will/didBuild.

Declared In

CKAnalyticsListener.h

– didBuildComponentTreeWithScopeRoot:buildTrigger:stateUpdates:component: required method

Called after the component tree creation.

- (void)didBuildComponentTreeWithScopeRoot:(CKComponentScopeRoot *)scopeRoot buildTrigger:(BuildTrigger)buildTrigger stateUpdates:(const CKComponentStateUpdateMap &)stateUpdates component:(CKComponent *)component

Parameters

buildTrigger

The build trigger (new tree, state update, props updates) for this component tree creation.

stateUpdates

The state updates map for the component tree creation.

component

Root component for created tree

scopRoot

Scope root for component tree. Use that to identify tree between will/didBuild

Declared In

CKAnalyticsListener.h

– willLayoutComponentTreeWithRootComponent:buildTrigger: required method

Called before component tree layout.

- (void)willLayoutComponentTreeWithRootComponent:(CKComponent *)component buildTrigger:(CK : : Optional<BuildTrigger>)buildTrigger

Parameters

component

The root component that was laid out.

buildTrigger

The build trigger that caused the layout computaion Can be CK::none, in case that the layout was computed due to a re-layout measurment.

Discussion

Please not that this callback can be called on the same component from different threads in undefined order, for instance: ThreadA, willLayout Component1 ThreadB, willLayout Component1 ThreadA, didLayout Component1 ThreadB, didLayout Component1 To identify matching will/didLayout events between callbacks, please use Thread id and Component id

Declared In

CKAnalyticsListener.h

– didLayoutComponentTreeWithRootComponent: required method

Called after component tree layout.

- (void)didLayoutComponentTreeWithRootComponent:(CKComponent *)component

Parameters

component

The root component that was laid out.

Discussion

Please not that this callback can be called on the same component from different threads in undefined order, for instance: ThreadA, willLayout Component1 ThreadB, willLayout Component1 ThreadA, didLayout Component1 ThreadB, didLayout Component1 To identify matching will/didLayout events between callbacks, please use Thread id and Component id

Declared In

CKAnalyticsListener.h

– willMountComponentTreeWithRootComponent: required method

Called before/after mounting a component tree

- (void)willMountComponentTreeWithRootComponent:(CKComponent *)component

Parameters

component

Root component for mounted tree

Declared In

CKAnalyticsListener.h

– shouldCollectMountInformationForRootComponent: required method

Called before mounting a component tree.

- (BOOL)shouldCollectMountInformationForRootComponent:(CKComponent *)component

Discussion

If returns YES, an extra information will be collected during the mount process. The extra information will be provided back in didMountComponentTreeWithRootComponent callback.

Declared In

CKAnalyticsListener.h

– willCollectAnimationsFromComponentTreeWithRootComponent: required method

Called before/after collecting animations from a component tree.

- (void)willCollectAnimationsFromComponentTreeWithRootComponent:(CKComponent *)component

Parameters

component

Root component for the tree that is about to be mounted.

Declared In

CKAnalyticsListener.h

– didReuseNode:inScopeRoot:fromPreviousScopeRoot: required method

Called after a component tree’s node has been reused

- (void)didReuseNode:(id<CKTreeNodeProtocol>)node inScopeRoot:(CKComponentScopeRoot *)scopeRoot fromPreviousScopeRoot:(CKComponentScopeRoot *)previousScopeRoot

Parameters

node

The tree node that has been reused.

scopeRoot

Scope root for component tree.

previousScopeRoot

The previous scope root of the component tree

Discussion

Warning: A node is only reused if conforming to the render protocol.

Declared In

CKAnalyticsListener.h

– systraceListener required method

Provides a systrace listener. Can be nil if systrace is not enabled.

- (id<CKSystraceListener>)systraceListener

Declared In

CKAnalyticsListener.h

– debugAnalyticsListener required method

Provides a debug analytics listener listener. Can be nil.

- (id<CKDebugAnalyticsListener>)debugAnalyticsListener

Declared In

CKAnalyticsListener.h