Permutive_iOS v1.4.0 Documentation

Protocol Trigger​Provider​Protocol

@objc(PermutiveTriggerProviderProtocol)
public protocol TriggerProviderProtocol  

Interface for Trigger Provider instances. Objective C support prevents generics.

TriggerProviderProtocol TriggerProviderProtocol TriggerProvider TriggerProvider TriggerProvider->TriggerProviderProtocol TriggerProviderImplementation TriggerProviderImplementation TriggerProviderImplementation->TriggerProviderProtocol

Types Conforming to Trigger​Provider​Protocol

TriggerProvider

Class which confirms to TriggerProviderProtocol and creates instances of TriggerActions.

Requirements

action(bool​For:​action:​)

func action(boolFor queries: Set<Int>, action: @escaping (_ query: Int, _ result: Bool) -> Void) -> TriggerAction? 

Creates a TriggerAction for a Bool result and the given segments

Parameters

queries Set<Int>

The query ids.

action @escaping (_ query:​ Int, _ result:​ Bool) -> Void

An escaping closure to be performed when any of the provided segments change their value.

query

The query number which triggered.

result

The updated value of the segment.

Returns

An optional TriggerAction instance

action(int​For:​action:​)

func action(intFor queries: Set<Int>, action: @escaping (_ query: Int, _ result: Int) -> Void) -> TriggerAction? 

Creates a TriggerAction for a Int result and the given segments

Parameters

queries Set<Int>

The query ids.

action @escaping (_ query:​ Int, _ result:​ Int) -> Void

An escaping closure to be performed when any of the provided segments change their value.

query

The query number which triggered.

result

The updated value of the segment.

Returns

An optional TriggerAction instance

action(int64For:​action:​)

func action(int64For queries: Set<Int>, action: @escaping (_ query: Int, _ result: Int64) -> Void) -> TriggerAction? 

Creates a TriggerAction for a Int64 result and the given segments

Parameters

queries Set<Int>

The query ids.

action @escaping (_ query:​ Int, _ result:​ Int64) -> Void

An escaping closure to be performed when any of the provided segments change their value.

query

The query number which triggered.

result

The updated value of the segment.

Returns

An optional TriggerAction instance

action(float​For:​action:​)

func action(floatFor queries: Set<Int>, action: @escaping (_ query: Int, _ result: Float) -> Void) -> TriggerAction? 

Creates a TriggerAction for a Float result and the given segments

Parameters

queries Set<Int>

The query ids.

action @escaping (_ query:​ Int, _ result:​ Float) -> Void

An escaping closure to be performed when any of the provided segments change their value.

query

The query number which triggered.

result

The updated value of the segment.

Returns

An optional TriggerAction instance

action(double​For:​action:​)

func action(doubleFor queries: Set<Int>, action: @escaping (_ query: Int, _ result: Double) -> Void) -> TriggerAction? 

Creates a TriggerAction for a Double result and the given segments

Parameters

queries Set<Int>

The query ids.

action @escaping (_ query:​ Int, _ result:​ Double) -> Void

An escaping closure to be performed when any of the provided segments change their value.

query

The query number which triggered.

result

The updated value of the segment.

Returns

An optional TriggerAction instance

action(dictionary​For:​action:​)

func action(dictionaryFor queries: Set<Int>, action: @escaping (_ query: Int, _ result: [AnyHashable: Any]) -> Void) -> TriggerAction? 

Creates a TriggerAction for a Dictionary<AnyHashable: AnyHashable> result and the given segments

Parameters

queries Set<Int>

The query ids.

action @escaping (_ query:​ Int, _ result:​ [Any​Hashable:​ Any]) -> Void

An escaping closure to be performed when any of the provided segments change their value.

query

The query number which triggered.

result

The updated value of the segment.

Returns

An optional TriggerAction instance

action​Update​For​User​Identity(action:​)

func actionUpdateForUserIdentity(action: @escaping (String) -> Void) -> TriggerAction? 

Creates a TriggerAction for an user identity change

Parameters

action @escaping (String) -> Void

An escaping closure to be performed when the user identity changed

Returns

An optional TriggerAction instance