# SENTOptions

### platformURL

The Sentiance platform URL. Use this only if you are migrating from an older SDK version (5.x)

```objectivec
@property (nonatomic, copy, nullable) NSString *platformUrl;
```

### isAppSessionDataCollectionAllowed

Informs whether app session data collection is enabled.

If enabled, the SDK may collect additional sensor and location data when the app is in the foreground (i.e visible to the user). This data may get uploaded to the Sentiance Platform.

```objectivec
@property (nonatomic) BOOL isAppSessionDataCollectionAllowed;
```

### registerBackgroundTaskIdentifiers

Set to NO to prevent the SDK from registering its own background task identifiers during initialization.

By default, this is set to YES. You should set it to NO only when initializing the SDK outside of your app delegate’s `application:didFinishLaunchingWithOptions:launchOptions:` method, as registering tasks outside of this method can cause iOS to terminate your app.

### appCrashedOnPreviousLaunch

This value is supplied when initializing an instance of `SENTOptions`. A boolean value of true indicates that the app crashed during its previous lifecycle, while a value of false indicates that it did not. If no value was set during SENTOptions initialization, this property will be nil.

```objective-c
@property (nonatomic, strong, readonly, nullable) NSNumber *appCrashedOnPreviousLaunch;
```

### initFor:initPurpose:

Returns a SENTOptions object that is used when initializing the SDK

```objective-c
- (instancetype)initFor:(SENTOptionsInitPurpose)initPurpose;
```

<table><thead><tr><th width="337">Parameter</th><th></th></tr></thead><tbody><tr><td>initPurpose</td><td>The purpose for which the <code>SENTOptions</code> object is being created. When initializing the SDK during app launch from within the app delegate, specify <a href="/pages/MubfRVxQcJjB0z0tFurQ">SENTOptionsInitPurposeAppLaunch</a>. When initializing the SDK outside of the app delegate, use <a href="/pages/MubfRVxQcJjB0z0tFurQ">SENTOptionsInitPurposeDelayedSdkInitialization</a>. The latter will make sure that the SDK initialization skips certain actions that should only be done during app startup (e.g. registering background task identifiers).</td></tr></tbody></table>

### initFor:initPurpose :appCrashedOnPreviousLaunch;

Returns a SENTOptions object that is used when initializing the SDK

<pre class="language-objective-c"><code class="lang-objective-c"><strong>- (instancetype)initFor:(SENTOptionsInitPurpose)initPurpose appCrashedOnPreviousLaunch:(BOOL)appCrashedOnPreviousLaunch;
</strong></code></pre>

<table><thead><tr><th width="337">Parameter</th><th></th></tr></thead><tbody><tr><td>initPurpose</td><td>The purpose for which the <code>SENTOptions</code> object is being created. When initializing the SDK during app launch from within the app delegate, specify <a href="/pages/MubfRVxQcJjB0z0tFurQ">SENTOptionsInitPurposeAppLaunch</a>. When initializing the SDK outside of the app delegate, use <a href="/pages/MubfRVxQcJjB0z0tFurQ">SENTOptionsInitPurposeDelayedSdkInitialization</a>. The latter will make sure that the SDK initialization skips certain actions that should only be done during app startup (e.g. registering background task identifiers).</td></tr><tr><td>appCrashedOnPreviousLaunch</td><td>Indicates whether the app crashed during its previous lifecycle. If you monitor crashes, for example using a third party crash reporting library, you can pass the crash status through this parameter. The Sentiance SDK uses this information to detect instability during startup and may take appropriate measures to stabilize the situation.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sentiance.com/important-topics/sdk/api-reference/ios/sentoptions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
