mirror of
https://github.com/RevenueCat/purchases-ios
synced 2026-11-11 22:55:55 +05:45
`Xcode` doesn't allow customizing the header (looks like maybe it worked at some point but not anymore: https://stackoverflow.com/questions/67614785/changing-the-default-header-comment-license-in-swift-package). At least this adds the license to all the initial files in the package.
29 lines
833 B
Swift
29 lines
833 B
Swift
//
|
|
// Copyright RevenueCat Inc. All Rights Reserved.
|
|
//
|
|
// Licensed under the MIT License (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// https://opensource.org/licenses/MIT
|
|
//
|
|
// VersionDetector.swift
|
|
//
|
|
// Created by Nacho Soto on 8/17/23.
|
|
|
|
import Foundation
|
|
|
|
enum VersionDetector {
|
|
|
|
static let iOS15: Bool = {
|
|
return Self.isAtLeast(version: 15) && !Self.isAtLeast(version: 16)
|
|
}()
|
|
|
|
private static func isAtLeast(version: Int) -> Bool {
|
|
return ProcessInfo.processInfo.isOperatingSystemAtLeast(.init(majorVersion: version,
|
|
minorVersion: 0,
|
|
patchVersion: 0))
|
|
}
|
|
|
|
}
|