mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
macos reachability
This commit is contained in:
parent
492a91377a
commit
6a41527153
27
submodules/MetalEngine/Package.swift
Normal file
27
submodules/MetalEngine/Package.swift
Normal file
@ -0,0 +1,27 @@
|
||||
// swift-tools-version:5.5
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "MetalEngine",
|
||||
products: [
|
||||
// Products define the executables and libraries a package produces, and make them visible to other packages.
|
||||
.library(
|
||||
name: "MetalEngine",
|
||||
targets: ["MetalEngine"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(name: "ShelfPack", path: "../Utils/ShelfPack"),
|
||||
// Dependencies declare other packages that this package depends on.
|
||||
// .package(url: /* package url */, from: "1.0.0"),
|
||||
],
|
||||
targets: [
|
||||
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
||||
// Targets can depend on other targets in this package, and on products in packages this package depends on.
|
||||
.target(
|
||||
name: "MetalEngine",
|
||||
dependencies: [.product(name: "ShelfPack", package: "ShelfPack", condition: nil)],
|
||||
path: "Sources/MetalEngine"),
|
||||
]
|
||||
)
|
@ -1,8 +1,12 @@
|
||||
import Foundation
|
||||
import Metal
|
||||
import UIKit
|
||||
import IOSurface
|
||||
|
||||
#if os(iOS)
|
||||
import Display
|
||||
import UIKit
|
||||
#endif
|
||||
|
||||
import IOSurface
|
||||
import ShelfPack
|
||||
|
||||
public final class Placeholder<Resolved> {
|
||||
|
@ -84,7 +84,7 @@ private final class WrappedLegacyReachability: NSObject {
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOSApplicationExtension 12.0, iOS 12.0, OSX 10.14, *)
|
||||
@available(iOSApplicationExtension 12.0, iOS 12.0, OSX 13.0, *)
|
||||
private final class PathMonitor {
|
||||
private let queue: Queue
|
||||
private let monitor: NWPathMonitor
|
||||
@ -133,7 +133,7 @@ private final class PathMonitor {
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOSApplicationExtension 12.0, iOS 12.0, OSX 10.14, *)
|
||||
@available(iOSApplicationExtension 12.0, iOS 12.0, OSX 13.0, *)
|
||||
private final class SharedPathMonitor {
|
||||
static let queue = Queue()
|
||||
static let impl = QueueLocalObject<PathMonitor>(queue: queue, generate: {
|
||||
@ -149,7 +149,7 @@ public enum Reachability {
|
||||
}
|
||||
|
||||
public static var networkType: Signal<NetworkType, NoError> {
|
||||
if #available(iOSApplicationExtension 12.0, iOS 12.0, OSX 10.14, *) {
|
||||
if #available(iOSApplicationExtension 12.0, iOS 12.0, OSX 13.0, *) {
|
||||
return Signal { subscriber in
|
||||
let disposable = MetaDisposable()
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit fa2e53f5da9b9653ab47169a922fb6c82847134a
|
||||
Subproject commit 8f41ea265404dea86f2444a47343993ccdc3a64e
|
27
submodules/Utils/ShelfPack/Package.swift
Normal file
27
submodules/Utils/ShelfPack/Package.swift
Normal file
@ -0,0 +1,27 @@
|
||||
// swift-tools-version:5.5
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "ShelfPack",
|
||||
products: [
|
||||
// Products define the executables and libraries a package produces, and make them visible to other packages.
|
||||
.library(
|
||||
name: "ShelfPack",
|
||||
targets: ["ShelfPack"]),
|
||||
],
|
||||
dependencies: [
|
||||
// Dependencies declare other packages that this package depends on.
|
||||
// .package(url: /* package url */, from: "1.0.0"),
|
||||
],
|
||||
targets: [
|
||||
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
||||
// Targets can depend on other targets in this package, and on products in packages this package depends on.
|
||||
.target(
|
||||
name: "ShelfPack",
|
||||
dependencies: [],
|
||||
path: ".",
|
||||
publicHeadersPath: "PublicHeaders"),
|
||||
]
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user