> For the complete documentation index, see [llms.txt](https://developers-apps-in-toss.toss.im/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers-apps-in-toss.toss.im/documentation/common/network-environment/version.md).

# 버전

### 1. 토스앱 버전 가져오기 (`getTossAppVersion`)

`getTossAppVersion` 함수는 토스 앱 버전을 가져와요. 예를 들어, `5.206.0`과 같은 형태로 반환돼요. 토스 앱 버전을 로그로 남기거나, 특정 기능이 특정 버전 이상에서만 실행될 때 사용돼요.

**시그니처**

```typescript
function getTossAppVersion(): string;
```

**반환값**

* string

  토스 앱 버전

**예제**

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

```js
import { getTossAppVersion } from '@apps-in-toss/web-framework';

const tossAppVersion = getTossAppVersion();
```

{% endtab %}

{% tab title="React" %}

```tsx
import { getTossAppVersion } from '@apps-in-toss/web-framework';
import { Text } from '@toss/tds-mobile';

function TossAppVersionPage() {
  const tossAppVersion = getTossAppVersion();

  return <Text>{tossAppVersion}</Text>;
}
```

{% endtab %}

{% tab title="React Native" %}

```tsx
import { getTossAppVersion } from '@apps-in-toss/framework';
import { Text } from '@toss/tds-react-native';

function TossAppVersionPage() {
  const tossAppVersion = getTossAppVersion();

  return <Text>{tossAppVersion}</Text>;
}
```

{% endtab %}
{% endtabs %}

***

### 2. 앱 최소 버전 확인하기 (`isMinVersionSupported`)

이 함수는 현재 실행 중인 토스 앱의 버전이 파라미터로 전달된 최소 버전 요구사항을 충족하는지 확인해요. 특정 기능이 최신 버전에서만 동작할 때, 사용자에게 앱 업데이트를 안내할 수 있어요.

**시그니처**

```typescript
function isMinVersionSupported(minVersions: {
  android: `${number}.${number}.${number}` | 'always' | 'never';
  ios: `${number}.${number}.${number}` | 'always' | 'never';
}): boolean;
```

**파라미터**

* **minVersions** · 필수 · `Object`

  플랫폼별 최소 버전 요구사항을 지정하는 객체예요.

  * **minVersions.android** · 필수 · `(`${number}.${number}.${number} `| &#39;always&#39; | &#39;never&#39;)`

    안드로이드 플랫폼의 최소 버전 요구사항이에요.
  * **minVersions.ios** · 필수 · `(`${number}.${number}.${number} `| &#39;always&#39; | &#39;never&#39;)`

    iOS 플랫폼의 최소 버전 요구사항이에요.

**반환값**

* boolean

  현재 앱 버전이 최소 버전 이상이면 true, 그렇지 않으면 false를 반환해요.

**예제**

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

```js
import { isMinVersionSupported } from '@apps-in-toss/web-framework';

const isSupported = isMinVersionSupported({
  android: '1.2.0',
  ios: '1.3.0',
});
```

{% endtab %}

{% tab title="React" %}

```tsx
import { isMinVersionSupported } from '@apps-in-toss/web-framework';
import { Text } from '@toss/tds-mobile';

function VersionCheck() {
  const isSupported = isMinVersionSupported({
    android: '1.2.0',
    ios: '1.3.0',
  });

  return <div>{!isSupported && <Text>최신 버전으로 업데이트가 필요해요.</Text>};
}
```

{% endtab %}

{% tab title="React Native" %}

```tsx
import { isMinVersionSupported } from '@apps-in-toss/framework';
import { Text } from '@toss/tds-react-native';
import { View } from 'react-native';

function VersionCheck() {
  const isSupported = isMinVersionSupported({
    android: '1.2.0',
    ios: '1.3.0',
  });

  return <View>{!isSupported && <Text>최신 버전으로 업데이트가 필요해요.</Text>}</View>;
}
```

{% endtab %}
{% endtabs %}


---

# 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 dynamically by asking a question.

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

```
GET https://developers-apps-in-toss.toss.im/documentation/common/network-environment/version.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
