---
title: "upToNextMajor(from:)"
framework: swift-package-manager
role: symbol
role_heading: Type Method
path: "swift-package-manager/documentation/packagedescription/package/dependency/requirement-swift.enum/uptonextmajor(from:)"
---

# upToNextMajor(from:)

A source control requirement bounded to the given version’s major version number.

## Declaration

```swift
static func upToNextMajor(from version: Version) -> Package.Dependency.Requirement
```

## Parameters

- `version`: The minimum version for the version range.

## Return Value

Return Value A source control requirement instance.

## Discussion

Discussion Returns a requirement for a version range, starting at the given minimum version and going up to but not including the next major version. This is the recommended version requirement.
