Skip to content

Commit a9405f0

Browse files
committed
Updated tests, imports, and README to better reflect environment compatibility
1 parent d91f8a2 commit a9405f0

38 files changed

Lines changed: 103 additions & 185 deletions

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ var package = Package(
101101
// Ensure the `TestScoping` feature is available when builds are made with older versions of Swift.
102102
// This is included by default within Swift 6.1, or Xcode 16.3+, so this allows these test features
103103
// to be backported to older compiler versions.
104-
#if swift(<6.1)
104+
#if swift(<6.1) || !canImport(SwiftTesting)
105105
package.dependencies.append(.package(url: "https://github.com/apple/swift-testing", from: "6.1.1"))
106106
for target in package.targets {
107107
if target.name.contains(/Test/) {
@@ -110,7 +110,7 @@ for target in package.targets {
110110
}
111111
#endif
112112

113-
#if canImport(UIKit) || canImport(AppKit)
113+
#if canImport(AuthenticationServices) && canImport(UIKit) || canImport(AppKit)
114114
package.targets.append(contentsOf: [
115115
.target(name: "BrowserSignin",
116116
dependencies: [

Package@swift-5.10.swift

Lines changed: 0 additions & 125 deletions
This file was deleted.

README.md

Lines changed: 48 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,36 @@ This library uses semantic versioning and follows Okta's [Library Version Policy
3838

3939
The latest release can always be found on the [releases page][github-releases].
4040

41+
### Version Compatibility
42+
43+
A variety of Swift versions and environments are supported, including:
44+
45+
| Name | Version |
46+
| ---- | ------- |
47+
| [Xcode](#xcode) | 16.0 or later |
48+
| [Swift](#swift) | 5.10, 6.0+ |
49+
| [Swift Toolchain](#swift) | 6.0+ |
50+
| Environments | [Apple](#apple-platforms), [Linux](#linux) _(experimental)_ |
51+
52+
> [!TIP]
53+
> For more information, please see the [SDK support policy details](#support-policy) below.
54+
55+
### Supported Platforms
56+
57+
All Apple platform targets are supported, with every attempt made to avoid dropping older OS versions unneccessarily.
58+
59+
| Platform | Minimum Supported | Best-Effort |
60+
| ----------- | ----------------- | ----------- |
61+
| iOS | 15.0 | 13.0 |
62+
| tvOS | 15.0 | 13.0 |
63+
| watchOS | 8.0 | 7.0 |
64+
| visionOS | 1.0 | 1.0 |
65+
| macCatalyst | 15.0 | 13.0 |
66+
| macOS | 12.0 | 10.15 |
67+
68+
> [!TIP]
69+
> For more details, please read below on our [approach to Apple Platform version support](#apple-platforms).
70+
4171
## Need help?
4272

4373
If you run into problems using the SDK, you can:
@@ -84,12 +114,14 @@ Several key features and capabilities are introduced with this library, with som
84114
| ------- |
85115
| Simple OIDC web-based sign in |
86116
| Credential management (secure storage, retrieval, etc) |
87-
| Multi-token handling (store and use tokens for multiple users, scopes, etc) |
117+
| Multi-user token handling (store and use tokens for multiple users, scopes, etc) |
88118
| Authorization Code Flow |
89119
| Native SSO / Token Exchange Flow |
90120
| Device Authorization Grant Flow |
91121
| JWT Authorization Grant Flow |
92122
| Resource Owner Flow |
123+
| Okta's DirectAuth Flow |
124+
| Okta's IDX InteractionCode Flow |
93125
| Simplified JWT parsing and handling |
94126
| Streamlined authorization of URLSession requests using credential tokens |
95127
| Many extension points for customizability, monitoring, and tracking |
@@ -430,38 +462,36 @@ This policy defines the extent of the support for Xcode, Swift, and platform (iO
430462

431463
### Xcode
432464

433-
The only supported versions of Xcode are those that can be currently used to submit apps to the App Store. Once a Xcode version becomes unsupported, dropping support for it will not be considered a breaking change, and will be done in a minor release.
465+
Xcode 16 or later, as these are the [minimum requirements for submission to the Apple App Store][apple-app-store-requirements].
466+
467+
Our support Only Xcode versions supported by the App Store supported versions of Xcode are those that can be currently used to submit apps to the App Store. Once a Xcode version becomes unsupported, dropping support for it will not be considered a breaking change, and will be done in a minor release.
434468

435469
### Swift
436470

437-
The minimum supported Swift version is 5.10, which is the version shipped with the oldest-supported Xcode version. Once a Swift 5 minor becomes unsupported, dropping support for it will not be considered a breaking change, and will be done in a minor release.
471+
This library is designed for Swift 6 and above, with compatibility for Swift 5.10, though this requires the use of the Swift 6 Toolchain. The minimum supported Swift version is 5.10, which is the version shipped with the oldest-supported Xcode version. Once a Swift 5 minor becomes unsupported, dropping support for it will not be considered a breaking change, and will be done in a minor release.
438472

439473
This library supports Swift 6, with full support for Strict Concurrency.
440474

441-
### Platforms
475+
### Environments
442476

443-
Only the last 4 major platform versions are officially supported, unless there are platform limitations that limit our ability to support older versions.
477+
Though the primary target for this SDK is Apple and its various platforms, other deployment environments are supported in either a limited or experimental capacity.
444478

445-
| Platform | Supported | Best-Effort |
446-
| ----------- | --------- | ----------- |
447-
| iOS | 15.0 | 13.0 |
448-
| tvOS | 15.0 | 13.0 |
449-
| watchOS | 8.0 | 7.0 |
450-
| visionOS | 1.0 | 1.0 |
451-
| macCatalyst | 15.0 | 13.0 |
452-
| macOS | 12.0 | 10.15 |
479+
#### Apple Platforms
480+
481+
Only the last 4 major platform versions are officially supported, unless there are platform limitations that limit our ability to support older versions.
453482

454483
Once a platform version becomes unsupported, dropping support for it will not be considered a breaking change and will be done in a minor release. For example, iOS 15 will cease to be supported when iOS 19 is released, and might be dropped in a minor release in the future.
455484

456485
In the case of macOS, the yearly named releases are considered a major platform version for this Policy, regardless of the actual version numbers.
457486

458487
> *Note:* Older OS versions are supported in a best-effort manner. Unless there are API limitations that prevent the SDK from working effectively on older OS versions, the minimum requirements will not be changed.
459488
460-
<details>
489+
#### Linux
461490

462-
<summary>Linux Compatibility</summary>
491+
This SDK is tested with Ubuntu 24.04 to ensure compatibility with Linux environments, though it's important to note that only Swift 6.0 and above is supported there.
463492

464-
Linux support is experimental. Compatibility with Linux considered is best-effort and is not officially supported. Ubuntu is included as a test target for all Continuous Integration tests, and every effort is taken to ensure its continued compatibility.
493+
> [!CAUTION]
494+
> Linux support is experimental. Compatibility with Linux considered is best-effort and is not officially supported at this time. Every effort is taken to ensure its continued compatibility, and Continuous Integration tests are used to assert that all tests pass before updates are merged.
465495
466496
Some features are not yet supported in Linux, including but not limited to:
467497

@@ -472,9 +502,7 @@ Some features are not yet supported in Linux, including but not limited to:
472502
| JWT Validation | The Linux-compatible crypto libraries have not yet been integrated into JWT validation |
473503
| PKCE | PKCE key and signature generation has not been implemented in Linux yet |
474504

475-
</details>
476-
477-
### Legacy SDK support
505+
### Legacy SDK version support
478506

479507
The okta-oidc-ios SDK is considered legacy, and all new feature development is made to okta-mobile-swift. The legacy SDKs only receive critical bug and security fixes, so it's advisable for developers to migrate to this new SDK.
480508

@@ -532,3 +560,4 @@ We are happy to accept contributions and PRs! Please see the [contribution guide
532560
[okta-library-versioning]: https://developer.okta.com/code/library-versions
533561
[support-policy]: #support-policy
534562
[migration-1x]: MIGRATION.md#migrating-from-okta-client-sdk-1x
563+
[apple-app-store-requirements]: https://developer.apple.com/news/upcoming-requirements/?id=02212025a

Sources/AuthFoundation/Network/APIClient.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Foundation
1414

15-
#if os(Linux) || os(Android)
15+
#if canImport(FoundationNetworking)
1616
import FoundationNetworking
1717
#endif
1818

Sources/AuthFoundation/Network/APIClientError.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Foundation
1414

15-
#if os(Linux) || os(Android)
15+
#if canImport(FoundationNetworking)
1616
import FoundationNetworking
1717
#endif
1818

Sources/AuthFoundation/Network/APIRequest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Foundation
1414

15-
#if os(Linux) || os(Android)
15+
#if canImport(FoundationNetworking)
1616
import FoundationNetworking
1717
#endif
1818

Sources/AuthFoundation/Network/Internal/FormDataExtensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Foundation
1414

15-
#if os(Linux) || os(Android)
15+
#if canImport(FoundationNetworking)
1616
import FoundationNetworking
1717
#endif
1818

Sources/AuthFoundation/Network/URLSessionProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Foundation
1414

15-
#if os(Linux) || os(Android)
15+
#if canImport(FoundationNetworking)
1616
import FoundationNetworking
1717
#endif
1818

Sources/AuthFoundation/OAuth2/OAuth2Client.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Foundation
1414

15-
#if os(Linux) || os(Android)
15+
#if canImport(FoundationNetworking)
1616
import FoundationNetworking
1717
#endif
1818

Sources/AuthFoundation/Requests/KeysRequest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Foundation
1414

15-
#if os(Linux) || os(Android)
15+
#if canImport(FoundationNetworking)
1616
import FoundationNetworking
1717
#endif
1818

0 commit comments

Comments
 (0)