---
title: "init(_:_:_:)"
framework: swiftdata
role: symbol
role_heading: Initializer
path: "swiftdata/schema/version-swift.struct/init(_:_:_:)"
---

# init(_:_:_:)

Initializes a version struct with the provided components of a semantic version.

## Declaration

```swift
init(_ major: Int, _ minor: Int, _ patch: Int)
```

## Parameters

- `major`: The major version number.
- `minor`: The minor version number.
- `patch`: The patch version number.

## Discussion

Discussion note: major >= 0 && minor >= 0 && patch >= 0.
