> For the complete documentation index, see [llms.txt](https://docs.contextsdk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.contextsdk.com/other/changelog.md).

# Changelog

Track ContextSDK latest updates, new features, and fixes in our changelog.

### \[Android] 2.0.2 - 2026-11-02

**Generic**

* `ContextSDK.setup` returns whether this call activated ContextSDK with a valid license key. Only the first call takes effect; any later call logs a warning and is ignored. See [Getting Started](/basics/getting-started.md)
* ContextSDK observes every `Activity` in your app by itself from `setup` on, including activities from other libraries, such as an ad network's full-screen ad, which don't end the session while they're in front. See [Getting Started](/basics/getting-started.md)
* The SDK builds into apps on Kotlin 2.0 or later and doesn't raise your app's `kotlin-stdlib` or `kotlinx-coroutines` versions. See [Minimum SDK Requirements](/other/minimum-sdk-requirements.md)
* The SDK declares the `android.permission.INTERNET` permission in its own manifest, so it merges into your app automatically. If your app's manifest removes the permission, the SDK logs a warning once at setup
* `ContextSDK.globalCustomSignals` and `ContextSDK.setUserId` work before `ContextSDK.setup`, for example from an `androidx.startup` initializer. See [Global Signals](/context-decision/advanced/custom-signals.md#global-signals) and [Tracking the User ID](/context-decision/advanced/tracking-the-user-id.md)
* Your custom models can ship with your app, so they're available offline from the first launch: add the `contextsdk/flow_models/` folder we send you to your app's `src/main/assets/`. See [Model Distribution Methods](/context-decision/advanced/model-distribution-methods.md)
* Passing `null` from Java or Unity for a parameter that isn't nullable in Kotlin throws `IllegalArgumentException` naming that parameter, before ContextSDK changes anything. The Unity bindings log an error instead of throwing
* `ContextSDK.fetchContext` and `ContextSDK.instantContext` take an optional `durationS`. Leave it out to collect for as long as the flow's custom model asks for, or 3 seconds while the flow has no model. Available in both `com.contextsdk:contextsdk` and `com.contextsdk:contextsdk-adtech`. See [Capturing Context](/context-decision/logging-conversions.md#capturing-context)
* Every `fetchContext` callback runs on the main thread, including the placeholder context handed back before `setup`: immediately when you call from the main thread, otherwise posted to it
* Add `ContextSDK.cancelContextCallback(flowName)` function to stop a pending `fetchContext` callback from firing, for example when the user navigates away from the screen that asked for it. Available in both `com.contextsdk:contextsdk` and `com.contextsdk:contextsdk-adtech`. See [Cancelling a Pending Context](/context-decision/logging-conversions.md#cancelling-a-pending-context)
* Add `createdAt` (milliseconds since the Unix epoch) and `alreadyLogged` to `RealWorldContext`. Available in both `com.contextsdk:contextsdk` and `com.contextsdk:contextsdk-adtech`. See [Checking a Context](/context-decision/logging-conversions.md#checking-a-context)
* Add `modelOutputs` and `sensorDataStatus` to `RealWorldContext`: every score the flow's model produced, by output name (`null` when no model ran), and whether the motion window behind the context was `COMPLETE`, `INCOMPLETE` or `UNAVAILABLE`. Available in both `com.contextsdk:contextsdk` and `com.contextsdk:contextsdk-adtech`, where `modelOutputs` is always `null`, and in Unity on Android. See [Reading Model Outputs](/context-decision/logging-conversions.md#reading-model-outputs)
* Add `wasForcedUpsell` to `RealWorldContext`: `true` when `shouldUpsell` is `true` although the flow's model did not pick the moment. Available in both `com.contextsdk:contextsdk` and `com.contextsdk:contextsdk-adtech`. See [Tracking Forced Upsells](/context-decision/advanced/analytics-and-reporting.md#tracking-forced-upsells)
* Flows honour the timing configuration ContextSDK delivers for them, as on iOS: a flow can be configured to show its prompt at least once per window, at most once per window, or both. `shouldUpsell` reflects it
* Add `ContextSDK.currentAppliedCustomModelVersion()` function that returns the version of the custom models applied in your app, or `"calibration"` while there are none. Available in both `com.contextsdk:contextsdk` and `com.contextsdk:contextsdk-adtech`. See [Tracking OTA Model Rollouts](/context-decision/advanced/analytics-and-reporting.md#tracking-ota-model-rollouts)
* Add `ContextSDK.getCustomModel(flowName)` function (`com.contextsdk:contextsdk` only) that returns whether a flow runs a custom model or the control group on this installation, or `null` while it has neither. See [Analytics & Reporting](/context-decision/advanced/analytics-and-reporting.md#tracking-a-b-test-segmentation)
* Add `ContextSDK.setDecisionsEnabled(enabled)` function (`com.contextsdk:contextsdk` only) to turn ContextSDK's decisions off, for example for your own A/B test: every flow then runs as control and `shouldUpsell` is always `true`. The setting lasts until the app's process ends. See [Custom A/B Test Segmentation](/context-decision/advanced/custom-ab-test-segmentation.md)
* Add `ContextSDK.setABTestInformation(testName, cohortName)` function and `defaultABTestInformation` configuration option to send us the A/B test and cohort each installation is in, as on iOS. Available in `com.contextsdk:contextsdk` only. See [Custom A/B Test Segmentation](/context-decision/advanced/custom-ab-test-segmentation.md#step-2-send-us-your-cohort-information)
* Add `RealWorldContext.logRevenueOutcome` and `RealWorldContext.logRevenueOutcomeIfNotLoggedYet` to log revenue, such as an ad impression or a purchase, as a `RevenueEvent`. Available in both `com.contextsdk:contextsdk` and `com.contextsdk:contextsdk-adtech`. See [Revenue Outcomes](/context-decision/revenue-outcomes.md)

**Unity**

* Unity games can use ContextSDK on Android with the core Android SDK (`com.contextsdk:contextsdk`): use the latest [`ContextSDKBinding.cs`](https://storage.googleapis.com/de73e410-context-sdk-releases/unity/latest/ContextSDKBinding.cs) and call `ContextSDKBinding.SetupWithAPIBackend` as on iOS. See [Getting Started](/basics/getting-started.md)
* Unity games can use the AdTech SDK on Android (`com.contextsdk:contextsdk-adtech`): use the latest [AdTech `ContextSDKBinding.cs`](https://storage.googleapis.com/de73e410-context-sdk-releases/unity/latest/adtech/ContextSDKBinding.cs) and call `ContextSDKBinding.SetupWithAPIKey`
* `ContextSDKBinding.SetGlobalCustomSignal(id, null)` removes the global signal, on Android as on iOS
* **Breaking (Unity):** `ContextSDKBinding.Calibrate` and `ContextSDKBinding.Optimize` are removed from both Unity bindings (core and AdTech) this release publishes. Replace `Calibrate(flowName, callback, customSignals, maxDelay)` and `Optimize(flowName, callback, customSignals, maxDelay)` with `FetchContext(flowName, callback, customSignals, maxDelay)`, `Optimize` without a `maxDelay` with `FetchContext(flowName, callback)`, and either one with a `maxDelay` of `0` with `InstantContext(flowName)`, which returns the `Context` instead of calling back. See [Capturing Context](/context-decision/logging-conversions.md#capturing-context) and [Instant Context](/context-decision/logging-conversions.md#instant-context)
* **Breaking (Unity):** `ContextSDKBinding.InstantContext` and `ContextSDKBinding.FetchContext` now take `int? duration = null`, and leaving the duration out no longer means 3 seconds: it now collects for as long as the flow's custom model asks for, or 3 seconds while the flow has no model, as the native SDKs do. Pass `duration: 3` where you need a fixed 3-second window. See [Capturing Context](/context-decision/logging-conversions.md#capturing-context)
* **Breaking (Unity):** `ContextSDKBinding.OnApplicationPause` and `ContextSDKBinding.OnApplicationResume` are removed from both Unity bindings, as ContextSDK observes your app's activities by itself. Delete your calls to them

**Ad Tech**

* Add `ContextSDK.goldenSignals` function that returns the Golden Signals for an ad request instantly, as a `Map<String, Any>`. See [Golden Signals](/adtech/golden-signals.md)
* Add callback based `ContextSDK.fetchGoldenSignals` to allow waiting for a full sensor window, reporting a `GoldenSignalsStatus` (`OK`, `TIMEOUT` or `SENSOR_UNAVAILABLE`) alongside the signals. It calls back on the main thread, also when called before `setupWithApiKey`. See [Golden Signals](/adtech/golden-signals.md)
* Both methods accept custom signals for that one call, on top of `ContextSDK.globalCustomSignals`
* `ContextSDK.setupWithApiKey` returns whether the API key is activated for your app. Only the first call takes effect, like `ContextSDK.setup`. See [Golden Signals](/adtech/golden-signals.md)
* The on-device models behind your Golden Signals can ship with your app, so their outputs are available from the first launch: we add them to the `contextsdk/flow_models/` folder you put in your app's `src/main/assets/`. See [Model Distribution Methods](/context-decision/advanced/model-distribution-methods.md)

### \[iOS] 5.17.0 - 2026-08-14

**Generic**

* **Breaking:** the minimum iOS deployment target is now **iOS 16** (previously iOS 14). This is required by the on-device Core ML models the SDK now ships with. Apps that must keep an iOS 14 deployment target should stay on 5.16.0 - see [Minimum SDK Requirements](/other/minimum-sdk-requirements.md)
* Add new `ContextManager.setUserId(_:)` function to set the user ID once for all ContextSDK products, or pass `nil` to clear it on sign-out. The value is stored on the device, so it's still there on the next app start. See [Tracking the User ID](/context-decision/advanced/tracking-the-user-id.md)
* Add new `ContextManager.fetchCurrentActivity` function that runs our on-device activity recognition models on demand and returns the probability that the user is walking, in transit, sitting and more, with a second overload to score only the activities you ask for. This API isn't part of the default build, [get in touch](/other/help.md) if you'd like it enabled for your app. See [Activity Recognition](/advanced/activity-recognition.md)
* Add new `sessionTimeoutSeconds` configuration option to change how long the app has to stay in the background before events are grouped into a new session. It defaults to 5 minutes, so brief background and foreground transitions (like pulling down the notification shade) keep the same session. See [Custom Configuration](/advanced/custom-configuration.md)
* Custom signals whose ID can't be used, or whose numeric value is `NaN` or infinite, are now reported in the console once per signal ID instead of being dropped silently

**Ad Tech**

* Add new callback based `ContextManager.fetchGoldenSignals` to allow waiting for sensor data to be available
* Add support for passing custom signals directly into the golden signals call in addition to the global signals
* Golden signals are now backed by OTA delivered CoreML models allowing them to be evolved over time
* Golden signals now expose the outputs of those models: scores under `m_` keys, moment embeddings as `[Float]` vectors with the model version under the matching `mv_` key. See [Golden Signals](/adtech/golden-signals.md)

**ContextPush:**

* Fix a crash in the host app when a push payload contained a `NaN` or infinite signal value
* `ContextPush.setUserId(_:)` is now deprecated in favor of `ContextManager.setUserId(_:)`. Existing calls keep working, and for push you only need to provide the device token via `ContextPush.setDeviceToken(_:)`

**Extension Build**

* Add new `uploadsEnabled` parameter to `ContextManager.setupForExtension` to stop an extension from uploading events itself. Events are still recorded and are uploaded the next time the app launches
* Reduce the memory footprint of the notification service extension by optimizing how data is shared to the main app

### \[iOS] 5.16.0 - 2026-05-05

**Generic**

* Add new `ContextManager.didReceiveMemoryWarning()` function to release memory that is no longer strictly required

**ContextPush:**

* Add support for notification service extensions to track generic events in a lifecycle safe way

### \[iOS] 5.15.0 - 2026-03-31

**ContextPush:**

* Add influenced open tracking to measure when users open the app after receiving a push notification
* Add richer context signals to push payloads for improved delivery optimization
* Add Swift Package Manager support for the notification service extension as a separate target

### \[iOS] 5.14.1 - 2026-02-12

* Fixes the `ABTestInformation` not having an initializer

### \[iOS] 5.14.0 - 2026-01-29

**ContextPush:**

* Add notification service extension support for confirmed delivery tracking
* Add API to customize notification content before delivery
* Bug fixes and performance improvements

**ContextDecision & ContextPush:**

* Introduce adaptive thresholds that automatically adjust based on your app's outcomes and user behavior for improved performance over time

### \[iOS] 5.13.0 - 2025-11-06

**ContextPush**:

* This includes the new Hybrid Mode, increasing the number of opportunities we get to deliver push notifications

**AdTech**:

* New AdTech capabilities

### \[iOS] 5.12.0 - 2025-10-30

* New AdTech capabilities

### \[iOS] 5.11.0 - 2025-10-02

* Adds new `Context.wasForcedUpsell` flag to indicate if the current upsell was triggered in a bad moment.

### \[iOS] 5.10.1 - 2025-09-03

* Add 34 new motion signals that require only 0.01s of data
* Add new APIs to better support customers' AB testing systems

### \[iOS] 5.9.0 - 2025-08-07

* Add support for revenue tracking for StoreKit 1
* Improve ContextPush background time handling
* Update Unity binding

### \[iOS] 5.8.0 - 2025-07-24

* Added 43 new motion signals for more precise context detection

### \[iOS] 5.7.0 - 2025-07-18

* Introducing Cooldowns, allowing you to control a minimum and maximum number of prompts shown in a given time period
* Improvements on handling disabled push permissions

### \[iOS] 5.6.1 - 2025-06-16

* Add support for logging revenue data from Unity
* Add support for manually putting ContextSDK into control mode in Unity

### \[iOS] 5.6.0 - 2025-05-30

* Improve ContextPush performance
* Verify maximum length of `flowName` (500 chars)
* Add additional internet geolocation signals

### \[iOS] 5.5.0 - 2025-04-29

* Add new [ContextManager.registerContextObserver](https://context-sdk.github.io/docs-ios/documentation/contextsdk/contextmanager/registercontextobserver\(flowname:callbackonfirstgoodmoment:\)) method to get a callback when it's a good moment to show a prompt
  * Learn more in [Listening for Good Moments](https://docs.contextsdk.com/context-decision/advanced/listening-for-good-moments)
* Remove an Xcode console warning when using the SDK in a background thread
* Improve frequency of event flushing during development so it's easier to test

### \[iOS] 5.4.0 - 2025-03-13

* Add [enableInstantContext](https://context-sdk.github.io/docs-ios/documentation/contextsdk/configuration/enableinstantcontext) configuration for improved battery savings, especially when using only ContextPush
* Improve error output in the Xcode console

### \[iOS] 5.3.1 - 2025-02-21

* Expose properties on the [ContextModelInformation](https://context-sdk.github.io/docs-ios/documentation/contextsdk/contextmodelinformation) struct

### \[iOS] 5.3.0 - 2025-02-06

* Add support for sending images in context-aware push notifications
* Add new context signals
* Add [ContextManager.getCustomModel(for:)](https://context-sdk.github.io/docs-ios/documentation/contextsdk/contextmanager/getcustommodel\(for:\)) to check if a custom model was rolled out for a specific flow

### \[iOS] 5.2.1 - 2025-01-28

* Add initializer for [RevenueEvent](https://context-sdk.github.io/docs-ios/documentation/contextsdk/revenueevent) to support [logRevenueOutcome(from:outcome:)](https://context-sdk.github.io/docs-ios/documentation/contextsdk/context/logrevenueoutcome\(from:outcome:\)-49ixv) with a `RevenueEvent` object

### \[iOS] 5.2.0 - 2025-01-22

* Add [context.logRevenueOutcomeIfNotLoggedYet](https://context-sdk.github.io/docs-ios/documentation/contextsdk/context/logrevenueoutcomeifnotloggedyet\(from:outcome:\)-257dv) to track in-app purchase and subscription revenue

### \[iOS] 5.1.0 - 2025-01-22

* Add [context.logRevenueOutcome(from:outcome:)](https://context-sdk.github.io/docs-ios/documentation/contextsdk/context/logrevenueoutcome\(from:outcome:\)-43krq) to track in-app purchase and subscription revenue
* Improve efficiency of push-related network requests
* Improve internal detection of app launch reason

### \[iOS] 5.0.0 - 2025-01-21

* Launch ContextPush product — see [How ContextPush Works](https://docs.contextsdk.com/basics/how-context-push-works) for details
* Remove deprecated methods:
  * `ContextManager.checkIfGoodMomentForPushNotification` → use ContextPush instead
  * `ContextManager.deliverNotificationIfGoodMoment` → use ContextPush instead
  * `ContextManager.requestATTrackingAuthorizationForCalibration` → discontinued
  * `ContextManager.requestATTrackingAuthorizationIfGoodMoment` → discontinued
  * `ContextManager.requestATTTrackingAuthorization` → discontinued
  * `context.logAttAuthStatus` → discontinued
  * `defaultLogSender` property → discontinued

### \[iOS] 4.8.0 - 2024-12-03

* Add support for logging multiple outcomes on a single `Context` object

### \[iOS] 4.7.1 - 2024-11-13

* Fix crash affecting users on iOS 15
* Improve documentation

### \[iOS] 4.7.0 - 2024-10-15

* Enable custom models to make decisions based on custom signals
* Add new context signals
* Prevent "Duplicate signal IDs found" from being logged when using `ContextManager.recentContext`

### \[iOS] 4.6.0 - 2024-09-30

* Add new signals
* Add Flutter support

### \[iOS] 4.5.1 - 2024-09-12

* Prepare for future releases

### \[iOS] 4.5.0 - 2024-08-14

* Add new accelerometer signals
* Add signals related to session duration

### \[iOS] 4.4.3 - 2024-08-01

* Bugfix release

### \[iOS] 4.4.2 - 2024-08-01

* Bugfix release

### \[iOS] 4.4.1 - 2024-07-31

* Add additional context signals

### \[iOS] 4.4.0 - 2024-07-29

* Add `cancelContextCallback` method
* Fix crash when creating contexts from multiple threads
* Preserve `recentContext` when app enters background
* Improve documentation

### \[iOS] 4.3.1 - 2024-07-08

* Remove async/await from the codebase to simplify backporting on iOS 13/14
* Fix crash caused by incorrect async backport linking

### \[iOS] 4.3.0 - 2024-06-03

* Add support for specifying a `maxDelay` when using `ContextManager.optimize(...)`

### \[iOS] 4.2.2 - 2024-05-21

* Fix issue where custom signals could be lost when using `ContextManager.optimize(...)`

### \[iOS] 4.2.0 - 2024-05-13

* Add support for React Native

### \[iOS] 4.1.2 - 2024-05-08

* Fix crash related to non-thread-safe cache access

### \[iOS] 4.1.1 - 2024-05-02

* Add `PrivacyInfo.xcprivacy` file for upcoming Apple requirements
* Add additional accelerometer signals
* Add basic Objective-C support
* Improve integration robustness

### \[iOS] 4.0.2 - 2024-04-12

* Add `ContextManager.recentContext(customModel: .customModelName)` to retrieve context for a specific custom model
* Add warnings for potential integration issues
* Improve accelerometer sensor handling
* Disable `CallKit` in calibration mode builds to avoid app rejections

### \[iOS] 4.0.0 - 2024-03-07

* Add support for OTA custom model updates (configurable)
* Remove `Context.customModelName` property
* Change `CustomModel` enum to `String`
* Add optional error reporting to backend to improve stability
* Convert `ContextManager.sdkVersion` from property to method
* Replace `context.appendCustomSignals()` with `context.appendOutcomeMetadata()`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.contextsdk.com/other/changelog.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
