NeuraSDK Class Reference

Inherits from NSObject
Declared in NeuraSDK.h

Overview

NeuraSDK API Version 4.X

Shared Instance

  shared

shared class property

@property (class, nonatomic, readonly, nonnull) NeuraSDK *shared

Discussion

shared class property

The same as [NeuraSDK sharedInstance]. This is just a convenience class property for shorter syntax under Swift 3.0+

Declared In

NeuraSDK.h

+ sharedInstance

The shared instance of the SDK. Must be placed in the AppDelegate on applicationDidFinishLaunchingWithOptions

+ (nullable NeuraSDK *)sharedInstance

Discussion

The shared instance of the SDK. Must be placed in the AppDelegate on applicationDidFinishLaunchingWithOptions

Declared In

NeuraSDK.h

  isSupportedDevice

Is the device supprted by Neura SDK? (iPhone 5s and above only) On an unsupported device, Neura will be disabled.

@property (atomic, readonly) BOOL isSupportedDevice

Discussion

Is the device supprted by Neura SDK? (iPhone 5s and above only) On an unsupported device, Neura will be disabled.

The SDK will not do anything on an unsupported device and authentication attempts will fail. Best practice is to not attempt authentication at all on an unsupported device.

Declared In

NeuraSDK.h

Application identifiers

  appUID

the App UID from the Neura dev site

@property (atomic, strong, nullable, readonly) NSString *appUID

Discussion

the App UID from the Neura dev site

Declared In

NeuraSDK.h

  appSecret

the App Secret from the Neura dev site

@property (atomic, strong, nullable, readonly) NSString *appSecret

Discussion

the App Secret from the Neura dev site

Declared In

NeuraSDK.h

  externalId

the External Id which is set by the developer for additional user identifier

@property (nonatomic, readwrite, nullable) NExternalId *externalId

Discussion

the External Id which is set by the developer for additional user identifier

Declared In

NeuraSDK.h

– setAppUID:appSecret:

Use to Identification the app.

- (void)setAppUID:(nonnull NSString *)appUID appSecret:(nonnull NSString *)appSecret

Parameters

appUID

the App UID from the Neura dev site

appSecret

the App Secret from the Neura dev site.

Discussion

Use to Identification the app.

Declared In

NeuraSDK.h

SDK Info

– getVersion

get the sdk version

- (nullable NSString *)getVersion

Return Value

version string

Discussion

get the sdk version

Declared In

NeuraSDK.h

Authentication

– authenticationState

Get the current authentication state. See: NeuraAuthState for all possible values and meaning.

- (NeuraAuthState)authenticationState

Return Value

NeuraAuthState of the current authentication state.

Discussion

Get the current authentication state. See: NeuraAuthState for all possible values and meaning.

Declared In

NeuraSDK.h

– isAuthenticated

Returns true if the app was already authenticated successfully (access token was already received successfully)

- (BOOL)isAuthenticated

Return Value

BOOL - YES if already authenticated and appToken is available. NO otherwise.

Discussion

Returns true if the app was already authenticated successfully (access token was already received successfully)

Declared In

NeuraSDK.h

– appToken

Access token that can be used when communicating with Neura’s public rest API.

- (nullable NSString *)appToken

Return Value

NSString - the access token as string.

Discussion

Access token that can be used when communicating with Neura’s public rest API.

Declared In

NeuraSDK.h

– accessToken

Access token that can be used when communicating with Neura’s public rest API.

- (nullable NSString *)accessToken

Return Value

NSString - the access token as string.

Discussion

Access token that can be used when communicating with Neura’s public rest API.

Declared In

NeuraSDK.h

– neuraUserId

The (API) unique identifier of the Neura user.

- (nullable NSString *)neuraUserId

Return Value

A string with the unique Neura identifier for this authenticated user. Will return nil if the user is not signed in / authenticated.

Discussion

The (API) unique identifier of the Neura user.

Declared In

NeuraSDK.h

– logoutWithCallback:

Use to logout from Neura

- (void)logoutWithCallback:(nonnull NeuraLogoutCallback)callback

Parameters

callback

callbak NeuraLogoutCallback returning the NeuraLogoutResult.

Discussion

Use to logout from Neura

Declared In

NeuraSDK.h

– authenticateWithRequest:callback:

Use to authenticate the app. There are a few possible authentication flows and configurations. @see: NeuraAuthenticationRequest for more details.

- (void)authenticateWithRequest:(nullable NeuraBaseAuthenticationRequest *)request callback:(nonnull NeuraAuthenticateCallback)callback

Parameters

request

(optional) NeuraAuthenticationRequest the authentication configuration object. Pass nil to use the default configuration.

callback

NeuraAuthenticateCallback returning a NeuraAuthenticationResult object.

Discussion

Use to authenticate the app. There are a few possible authentication flows and configurations. @see: NeuraAuthenticationRequest for more details.

Declared In

NeuraSDK.h

– getEventsListWithCallback:

test

- (void)getEventsListWithCallback:(nonnull NeuraEventsListResultCallback)callback

Parameters

callback

dsdfgsdfg

Discussion

test

Declared In

NeuraSDK.h

Subscriptions (declarative)

– requireSubscriptionsToEvents:method:

This API can be used to declare what events you want your app to be subscribed to and let the SDK manage the subscriptions for you. Calling this method ( at least once ) will prevent you from calling addSubscription / removeSubscription directly.

- (void)requireSubscriptionsToEvents:(nonnull NSArray<NSString*> *)eventNames method:(NSubscriptionMethod)method

Parameters

eventNames

A list of event names you want your app to subscribe to.

method

Method of the subscription (See NSubscription for more details).

Discussion

This API can be used to declare what events you want your app to be subscribed to and let the SDK manage the subscriptions for you. Calling this method ( at least once ) will prevent you from calling addSubscription / removeSubscription directly.

Declared In

NeuraSDK.h

– requireSubscriptionsToEvents:method:webhookId:

This API can be used to declare what events you want your app to be subscribed to and let the SDK manage the subscriptions for you. Calling this method ( at least once ) will prevent you from calling addSubscription / removeSubscription directly.

- (void)requireSubscriptionsToEvents:(nonnull NSArray<NSString*> *)eventNames method:(NSubscriptionMethod)method webhookId:(NSString *_Nullable)webhookId

Parameters

eventNames

A list of event names you want your app to subscribe to.

method

Method of the subscription (See NSubscription for more details).

webhookId

(optional) The identifier of the related webhook.

Discussion

This API can be used to declare what events you want your app to be subscribed to and let the SDK manage the subscriptions for you. Calling this method ( at least once ) will prevent you from calling addSubscription / removeSubscription directly.

Declared In

NeuraSDK.h

– getRequiredSubscriptionsStatus

Use this to see the status of subscriptions to events you declared the app should subscribe to using the requireSubscriptionsToEvents: method. Subsribing to events happens asynchronously in the background by a subscriptions manager of the SDK. You can use this method at any time to see the current status of the subscriptions.

- (NSArray<NSubscriptionStatus*> *_Nonnull)getRequiredSubscriptionsStatus

Return Value

An array of NSubscriptionStatus objects describing the current status of subscriptions to the events you declared your app require to be subscribed to.

Discussion

Use this to see the status of subscriptions to events you declared the app should subscribe to using the requireSubscriptionsToEvents: method. Subsribing to events happens asynchronously in the background by a subscriptions manager of the SDK. You can use this method at any time to see the current status of the subscriptions.

Declared In

NeuraSDK.h

– manageSubscriptionsManually

If you called the declarative requireSubscriptionsToEvents method, the SDK will manage subscriptions for you and you’ll not be able to manually subscribe to events directly. Call this method if you want to start handling subscriptions manually using the addSubscription: and removeSubscription: methods. Calling this method will cause the SDK to forget the list of moments you declared you are interested to subscribe to using the requireSubscriptionsToEvents method.

- (void)manageSubscriptionsManually

Discussion

If you called the declarative requireSubscriptionsToEvents method, the SDK will manage subscriptions for you and you’ll not be able to manually subscribe to events directly. Call this method if you want to start handling subscriptions manually using the addSubscription: and removeSubscription: methods. Calling this method will cause the SDK to forget the list of moments you declared you are interested to subscribe to using the requireSubscriptionsToEvents method.

Declared In

NeuraSDK.h

Subscriptions (explicit)

– getSubscriptionsListWithCallback:

Get a list of current subscriptions.

- (void)getSubscriptionsListWithCallback:(nonnull NeuraSubscriptionsListCallback)callback

Discussion

Get a list of current subscriptions.

Declared In

NeuraSDK.h

– addSubscription:callback:

Subscribe to an event using a NSubscription object.

- (void)addSubscription:(nonnull NSubscription *)subscription callback:(nonnull NeuraAddSubscriptionCallback)callback

Parameters

subscription

NSubscription object. Must provide eventName and identifier. webHookId is optional.

callback

NeuraAddSubscriptionCallback - a callback returning the result of this subscribe request.

Discussion

Subscribe to an event using a NSubscription object.

Declared In

NeuraSDK.h

– removeSubscription:callback:

Remove subscription (given a NSubscription object)

- (void)removeSubscription:(nonnull NSubscription *)subscription callback:(nonnull NeuraRemoveSubscriptionCallback)callback

Parameters

subscription

NSubscription - the subscription object.

callback

NeuraRemoveSubscriptionCallback - a callback returning the result of this remove subscription request.

Discussion

Remove subscription (given a NSubscription object)

Declared In

NeuraSDK.h

– removeSubscriptionWithIdentifier:callback:

Remove subscription (given a subscription identifier)

- (void)removeSubscriptionWithIdentifier:(nonnull NSString *)identifier callback:(nonnull NeuraRemoveSubscriptionCallback)callback

Parameters

identifier

NSString - the unique subscription identifier.

callback

NeuraRemoveSubscriptionCallback - a callback returning the result of this remove subscription request.

Discussion

Remove subscription (given a subscription identifier)

Declared In

NeuraSDK.h

Feedback

– sendFeedbackForEventId:feedback:callback:

Send feedback for an event.

- (void)sendFeedbackForEventId:(nonnull NSString *)neuraID feedback:(NFeedbackType)feedback callback:(nonnull NeuraEventFeedbackCallback)callback

Parameters

neuraID

The id of the event.

feedback

NFeedbackType the type of the feedback (positive, negative, ack)

callback

NeuraEventFeedbackCallback callback

Discussion

Send feedback for an event.

Declared In

NeuraSDK.h

– addPlace:withCallback:

Add a place with the provided properties.

- (void)addPlace:(nonnull NPlace *)place withCallback:(nonnull NeuraAddPlaceCallback)callback

Parameters

place

NPlace object. Must provide label. latitude, longitude, address and name are optional

callback

NeuraAddPlaceCallback - a callback returning the NeuraAddPlaceResult.

Discussion

Add a place with the provided properties.

Declared In

NeuraSDK.h

– removePlace:withCallback:

Remove a place with the neuraId of a place. It is only possible to remove place nodes that were added using the addPlace:withCallback: API. On attempt to remove nodes not added with the addPlace:withCallback: API, an error is returned.

- (void)removePlace:(nonnull NSString *)neuraId withCallback:(nonnull NeuraRemovePlaceCallback)callback

Parameters

neuraId

NSString the identifier of the place node to remove.

callback

NeuraRemovePlaceCallback - a callback returning the NeuraRemovePlaceResult.

Discussion

Remove a place with the neuraId of a place. It is only possible to remove place nodes that were added using the addPlace:withCallback: API. On attempt to remove nodes not added with the addPlace:withCallback: API, an error is returned.

Declared In

NeuraSDK.h

User

– getUserSituationForTimeStamp:contextual:callback:

Get a collection of states for a user at a given timestamp.

- (void)getUserSituationForTimeStamp:(nonnull NSDate *)timeStamp contextual:(BOOL)contextual callback:(nonnull NeuraGetUserSituationCallback)callback

Parameters

timeStamp

Required. The timestamp for when you want to get the user’s situation

contextual

In order to get more data about the situation, like previous and next situations. Default: false

callback

NeuraGetUserSituationCallback - a callback returning the NeuraGetUserSituationResult

Discussion

Get a collection of states for a user at a given timestamp.

See Also

Declared In

NeuraSDK.h

– getSemanticDaySummaryForDate:callback:

Get the user’s wellness information for a single day.

- (void)getSemanticDaySummaryForDate:(nonnull NSDate *)date callback:(nonnull NeuraGetInsightInfoCallback)callback

Parameters

date

Required. The date for the day you’ll get the daily summary for

callback

callback NeuraGetInsightInfoCallback - a callback returning the NeuraGetInsightInfoResult

Discussion

Get the user’s wellness information for a single day.

See Also

Declared In

NeuraSDK.h

– getSleepProfileForStartDate:endDate:callback:

Get the user’s sleep information during a period of time.

- (void)getSleepProfileForStartDate:(nonnull NSDate *)startDate endDate:(nonnull NSDate *)endDate callback:(nonnull NeuraGetInsightInfoCallback)callback

Parameters

startDate

Required. Day of beginning of the sleep information

endDate

Required. Day of end of the sleep information inclusive

callback

callback NeuraGetInsightInfoCallback - a callback returning the NeuraGetInsightInfoResult

Discussion

Get the user’s sleep information during a period of time.

See Also

Declared In

NeuraSDK.h

– getWellnessLifestyleProfileForStartDate:endDate:callback:

Get the user’s wellness information during a period of time.

- (void)getWellnessLifestyleProfileForStartDate:(nonnull NSDate *)startDate endDate:(nonnull NSDate *)endDate callback:(nonnull NeuraGetInsightInfoCallback)callback

Parameters

startDate

Required. Day of beginning of the sleep information

endDate

Required. Day of end of the wellness information inclusive

callback

callback NeuraGetInsightInfoCallback - a callback returning the NeuraGetInsightInfoResult

Discussion

Get the user’s wellness information during a period of time.

See Also

Declared In

NeuraSDK.h

– getActivityProfileAtPlaceForTimeStamp:resources:callback:

Get the user’s activity information for the place he was at the provided timestamp.

- (void)getActivityProfileAtPlaceForTimeStamp:(nonnull NSDate *)timeStamp resources:(nonnull NSArray<NSString*> *)resources callback:(nonnull NeuraGetInsightInfoCallback)callback

Parameters

timeStamp

Required. The timestamp for when you want to get the user’s activity

resources

Required. Array containing the type of data you want to receive. Possible resources are steps and calories. The array Must contain at least one

callback

callback NeuraGetInsightInfoCallback - a callback returning the NeuraGetInsightInfoResult

Discussion

Get the user’s activity information for the place he was at the provided timestamp.

See Also

Declared In

NeuraSDK.h

– simulateEvent:callback:

Simulate an event. (sends a fake event, simulating a detection of a Neura event)

- (void)simulateEvent:(NEventName)name callback:(void ( ^ _Nullable ) ( NeuraAPIResult *_Nullable result ))callback

Parameters

name

NEventName the name of the event.

callback

NeuraAPIResult callback with success/failure.

Discussion

Simulate an event. (sends a fake event, simulating a detection of a Neura event)

Declared In

NeuraSDK.h

– placesServiceState

The running state of the integrated places service.

- (NeuraPlacesServiceState)placesServiceState

Return Value

NeuraPlacesServiceState

Discussion

The running state of the integrated places service.

Declared In

NeuraSDK.h

– collectDataForBGFetchWithResult:

Call this from your application:performFetchWithCompletionHandler: in app delegate. This will allow NeuraSDK to initiate data collection as a background fetch of your app.

- (void)collectDataForBGFetchWithResult:(void ( ^ _Nonnull ) ( UIBackgroundFetchResult ))resultHandler

Parameters

resultHandler

UIBackgroundFetchResult indicating if data collection gathered new data or not.

Discussion

Call this from your application:performFetchWithCompletionHandler: in app delegate. This will allow NeuraSDK to initiate data collection as a background fetch of your app.

The responsibility of calling this method and calling the completion handler with a UIBackgroundFetchResult is left to you the developer, in case your app implements its own background fetches functionality.

Declared In

NeuraSDK.h

Engagement Api

– tagEngagementAttempt:value:instanceId:error:

This API is aimed to improve user engagement, using it will generate a detailed engagement report that focuses on who the user is, and what the user does. For each feature you monitor (up to 10 features), use the attempt as the base call to tag every trigger the feature creates in the app. It can be a notification or in app pop up etc.

- (BOOL)tagEngagementAttempt:(NSString *)featureName value:(nullable NSString *)value instanceId:(nullable NSString *)instanceId error:(NSError **)error

Parameters

featureName

Mandatory. The name that will be displayed in the insights dashboard, the feature to monitor. Can contain only alphanumeric (a-z, A-Z, 0-9) and ‘_’, ‘-’ characters

value

Optional. Describes specific value of feature. For example: the A/B test is divided to blue and red buttons, use the value to set which group of the test it is

instanceId

Optional. Describes specific instance of engagement incase there is need to bind between several engagement instances.

error

validation error if invalid paramaters provided

Return Value

false if an error occured.

Discussion

This API is aimed to improve user engagement, using it will generate a detailed engagement report that focuses on who the user is, and what the user does. For each feature you monitor (up to 10 features), use the attempt as the base call to tag every trigger the feature creates in the app. It can be a notification or in app pop up etc.

The next step is to tag the user’s respone to the engagement attempt. Follow https://dev.theneura.com/pages/how-to-use-engagement-api/ for more information on which action should you use in tagEngagementFeature

Declared In

NeuraSDK.h

– tagEngagementFeature:action:error:

This API is aimed to improve user engagement, using it will generate a detailed engagement report that focuses on who the user is, and what the user does. Call this method to measure the result of the engagement attempt. For example: if the user converted to a pying customer, use NEngagementFeatureActionSuccess.

- (BOOL)tagEngagementFeature:(NSString *)featureName action:(NEngagementFeatureAction)action error:(NSError **)error

Parameters

featureName

Mandatory. The name that will be displayed in the insights dashboard, the feature to monitor. Can contain only alphanumeric (a-z, A-Z, 0-9) and ‘_’, ‘-’ characters

action

The type of the action the user performed.

error

validation error if invalid paramaters provided

Return Value

The type of the action the user performed.

Discussion

This API is aimed to improve user engagement, using it will generate a detailed engagement report that focuses on who the user is, and what the user does. Call this method to measure the result of the engagement attempt. For example: if the user converted to a pying customer, use NEngagementFeatureActionSuccess.

Follow https://dev.theneura.com/pages/how-to-use-engagement-api/ for more information on which action should you use in tagEngagementFeature

Declared In

NeuraSDK.h

– tagEngagementFeature:action:value:instanceId:error:

This API is aimed to improve user engagement, using it will generate a detailed engagement report that focuses on who the user is, and what the user does. Call this method to measure the result of the engagement attempt. For example: if the user converted to a pying customer, use NEngagementFeatureActionSuccess.

- (BOOL)tagEngagementFeature:(NSString *)featureName action:(NEngagementFeatureAction)action value:(nullable NSString *)value instanceId:(nullable NSString *)instanceId error:(NSError **)error

Parameters

featureName

Mandatory. The name that will be displayed in the insights dashboard, the feature to monitor. Can contain only alphanumeric (a-z, A-Z, 0-9) and ‘_’, ‘-’ characters

action

The type of the action the user performed.

value

Optional. Describes specific value of feature. For example: the A/B test is divided to blue and red buttons, use the value to set which group of the test it is

instanceId

Optional. Describes specific instance of engagement incase there is need to bind between several engagement instances.

error

validation error if invalid paramaters provided

Return Value

false if an error occured.

Discussion

This API is aimed to improve user engagement, using it will generate a detailed engagement report that focuses on who the user is, and what the user does. Call this method to measure the result of the engagement attempt. For example: if the user converted to a pying customer, use NEngagementFeatureActionSuccess.

Follow https://dev.theneura.com/pages/how-to-use-engagement-api/ for more information on which action should you use in tagEngagementFeature

Declared In

NeuraSDK.h

Permissions Api

– requestAlwaysLocationAuthorization

Call this when you want the location authrozation prompt to appear.

- (void)requestAlwaysLocationAuthorization

Discussion

Call this when you want the location authrozation prompt to appear.

1) Inform the user about the gained value of agreeing to the ALWAYS authorization, using your own UI, before showing the system prompt. 2) Do this as part of your “user priming” UI flow (on boarding etc) before authenticating to Neura. 3) The prompt will be shown after Neura authentication, if it wasn’t shown by you before that point in time, but for getting the highest conversion rates possible, it is recommended to do the above.

Declared In

NeuraSDK.h

– requestMotionAuthorization

Call this when you want the motion authrozation prompt to appear. 1) Inform the user about the gained value of agreeing to the prompt, using your own UI, before showing the system prompt. 2) Do this as part of your “user priming” UI flow (on boarding etc) before authenticating to Neura. 3) The prompt will be shown after Neura authentication, if it wasn’t shown by you before that point in time, but for getting the highest conversion rates possible, it is recommended to do the above.

- (void)requestMotionAuthorization

Discussion

Call this when you want the motion authrozation prompt to appear. 1) Inform the user about the gained value of agreeing to the prompt, using your own UI, before showing the system prompt. 2) Do this as part of your “user priming” UI flow (on boarding etc) before authenticating to Neura. 3) The prompt will be shown after Neura authentication, if it wasn’t shown by you before that point in time, but for getting the highest conversion rates possible, it is recommended to do the above.

Declared In

NeuraSDK.h

– trackOnce:

Calling this causes the Neura SDK to do a single sample of current user’s situation. It will collect raw data on all available channels, store it and sync to Neura’s servers if required.

- (void)trackOnce:(void ( ^ _Nonnull ) ( UIBackgroundFetchResult result , BOOL success , NSError *_Nullable error ))resultHandler

Parameters

resultHandler

UIBackgroundFetchResult

Discussion

Calling this causes the Neura SDK to do a single sample of current user’s situation. It will collect raw data on all available channels, store it and sync to Neura’s servers if required.

You can use this method if you want to implement data collection on content-available push sent using your own servers. User must be authenticated before calling this method.

By default this method is disabled and will return immediately with the error “trackOnce isn’t allowed for this user”. (Enabling use of this method can be configured on Neura’s server)

Important: When used in app delegate’s didReceiveRemoteNotification, it is your responsibility to call the fetchCompletionHandler when trackOnce finishes and calls the resultHandler.

Declared In

NeuraSDK.h

User Attributes Api

– getUserAttribute:

Returned user attributes information provided by Neura’s server API.

- (void)getUserAttribute:(NeuraUserAttributesCallback _Nonnull)callback

Parameters

callback

NeuraUserAttributesCallback returning a NeuraUserAttributesResult object contain NSDicitinary with the user attributes values

Discussion

Returned user attributes information provided by Neura’s server API.

Declared In

NeuraSDK.h

– setUserAttribute:boolValue:

Sets or adds user attribute to a given bool value.

- (BOOL)setUserAttribute:(NSString *_Nonnull)name boolValue:(BOOL)value

Parameters

name

The name of the user attribute to set. Should contain 1 to 32 alphanumeric characters. The “neura_” prefix are reserved and should not be used for user attribute names.

value

The value of the user attribute. value is int

Discussion

Sets or adds user attribute to a given bool value.

Declared In

NeuraSDK.h

– setUserAttribute:intValue:

Sets or adds user attribute to a given int value.

- (BOOL)setUserAttribute:(NSString *_Nonnull)name intValue:(int)value

Parameters

name

The name of the user attribute to set. Should contain 1 to 32 alphanumeric characters. The “neura_” prefix are reserved and should not be used for user attribute names.

value

The value of the user attribute. value is int

Discussion

Sets or adds user attribute to a given int value.

Declared In

NeuraSDK.h

– setUserAttribute:doubleValue:

Sets or adds user attribute to a given double value.

- (BOOL)setUserAttribute:(NSString *_Nonnull)name doubleValue:(double)value

Parameters

name

The name of the user attribute to set. Should contain 1 to 32 alphanumeric characters. The “neura_” prefix are reserved and should not be used for user attribute names.

value

The value of the user attribute. value is int

Discussion

Sets or adds user attribute to a given double value.

Declared In

NeuraSDK.h

– setUserAttribute:stringValue:

Sets or adds user attribute to a given String value.

- (BOOL)setUserAttribute:(NSString *_Nonnull)name stringValue:(NSString *_Nonnull)value

Parameters

name

The name of the user attribute to set. Should contain 1 to 32 alphanumeric characters. The “neura_” prefix are reserved and should not be used for user attribute names.

value

The value of the user attribute. value is NSString

Discussion

Sets or adds user attribute to a given String value.

Declared In

NeuraSDK.h

– setUserAttribute:dateValue:

Sets or adds user attribute to a given date value.

- (BOOL)setUserAttribute:(NSString *_Nonnull)name dateValue:(NSDate *_Nonnull)value

Parameters

name

The name of the user attribute to set. Should contain 1 to 32 alphanumeric characters. The “neura_” prefix are reserved and should not be used for user attribute names.

value

The value of the user attribute. value is NSDate

Discussion

Sets or adds user attribute to a given date value.

Declared In

NeuraSDK.h

– setUserAttribute:string:

Sets or adds user attribute to a given Array of Strings value.

- (BOOL)setUserAttribute:(NSString *_Nonnull)name string:(NSArray<NSString*> *_Nonnull)values

Parameters

name

The name of the user attribute to set. Should contain 1 to 32 alphanumeric characters. The “neura_” prefix are reserved and should not be used for user attribute names.

values

The values to be added the user attributes. value is NSArray of NSStrings

Discussion

Sets or adds user attribute to a given Array of Strings value.

Declared In

NeuraSDK.h

– setUserAttribute:numeric:

Sets or adds user attribute to a given Array of Numeric values.

- (BOOL)setUserAttribute:(NSString *_Nonnull)name numeric:(NSArray<NSNumber*> *_Nonnull)values

Parameters

name

The name of the user attribute to set. Should contain 1 to 32 alphanumeric characters. The “neura_” prefix are reserved and should not be used for user attribute names.

values

The values to be added the user attributes. value is NSArray of NSNumber. Can contain Array of int bool or double

Discussion

Sets or adds user attribute to a given Array of Numeric values.

Declared In

NeuraSDK.h

– setUserAttribute:dates:

Sets or adds user attribute to a given Array of dates values.

- (BOOL)setUserAttribute:(NSString *_Nonnull)name dates:(NSArray<NSDate*> *_Nonnull)values

Parameters

name

The name of the user attribute to set. Should contain 1 to 32 alphanumeric characters. The “neura_” prefix are reserved and should not be used for user attribute names.

values

The values to be added the user attributes. value is NSArray of NSDate.

Discussion

Sets or adds user attribute to a given Array of dates values.

Declared In

NeuraSDK.h

– disableMotionAuthorization

Caliing this method will cancel the coreMotion usage in the sdk

- (void)disableMotionAuthorization

Discussion

Caliing this method will cancel the coreMotion usage in the sdk

Declared In

NeuraSDK.h

– enableMotionAuthorization

Caliing this method will bring back the coreMotion usage in the sdk

- (void)enableMotionAuthorization

Discussion

Caliing this method will bring back the coreMotion usage in the sdk

Declared In

NeuraSDK.h

– disableBGLocationTracking

Caliing this method will disable location tracking in the background

- (void)disableBGLocationTracking

Discussion

Caliing this method will disable location tracking in the background

Declared In

NeuraSDK.h

– enableBGLocationTracking:

Caliing this method will enable location tracking in the background

- (void)enableBGLocationTracking:(NSNumber *_Nullable)frequency

Parameters

frequency

limit the amount of location tracking per day

Discussion

Caliing this method will enable location tracking in the background

Declared In

NeuraSDK.h

– isMissingDataForEvent:

Use to check if the event has all the required data

- (BOOL)isMissingDataForEvent:(nullable NSString *)eventName

Parameters

eventName

event to check if all the require fields exists.

Return Value

false if the event has all the require data in it

Discussion

Use to check if the event has all the required data

Declared In

NeuraSDK.h