# Versioning

All Sudo Platform SDKs conform to the following versioning rules:

{% hint style="info" %}
Sudo Platform SDK versioning rules borrow some ideas from semantic versioning but are not identical. The deviation from semantic versioning exists mainly to ease the consumption of each SDK and its dependencies and allowing mocking of public APIs for unit testing.
{% endhint %}

## Major Version

The major version is incremented when there is a breaking update to an existing public API or an existing public API is removed.

> Example: Updating an existing API.

{% tabs %}
{% tab title="Diff" %}

```diff
+ public func doSomething(param1: String)
- public func doSomething(param1: String, param2: Boolean)
```

{% endtab %}
{% endtabs %}

> Example: Removing an existing API.

{% tabs %}
{% tab title="Diff" %}

```diff
- public func doSomething(param1: String)
```

{% endtab %}
{% endtabs %}

The major version will also be incremented if any API change is made to a public protocol or interface the SDK expects the consumer to implement for production code. This does not include any protocol or interface that is provided for mocking.

For iOS SDKs,  the major version will not be incremented when a new enumeration value is added e.g. a new error enumeration value. Instead, a new enumeration value will result in incrementing the minor version. It is expected that applications using a switch statement to handle an enumeration should include a default case to prevent the new enumeration value causing compilation errors.&#x20;

## Minor Version

{% hint style="danger" %}
A minor version change should not break any production code but if you are implementing any public protocol or interface provided for unit testing then you may need to provide mock implementation for the new API added.
{% endhint %}

The minor version is incremented when a new API is added.

> Example: Adding a new API.

{% tabs %}
{% tab title="Diff" %}

```diff
+ public func doMore(param1: Int)
```

{% endtab %}
{% endtabs %}

## Patch Version

The patch version is incremented when a change is introduced that does not impact any public API. For example, a fix is made to an internal function.


---

# 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.sudoplatform.com/development/versioning.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.
