File tree Expand file tree Collapse file tree
Sources/SystemExtensionKit Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55// Created by CodingIran on 2023/9/25.
66//
77
8+ import Foundation
89import SystemExtensions
910
1011public extension SystemExtensionKit {
@@ -121,6 +122,18 @@ public extension SystemExtensionKit {
121122 }
122123}
123124
125+ public extension Bundle {
126+ var extensionMachServiceName : String ? {
127+ guard
128+ let networkExtensionKeys = object ( forInfoDictionaryKey: " NetworkExtension " ) as? [ String : Any ] ,
129+ let machServiceName = networkExtensionKeys [ " NEMachServiceName " ] as? String
130+ else {
131+ return nil
132+ }
133+ return machServiceName
134+ }
135+ }
136+
124137// MARK: - OSSystemExtensionError Code Description
125138
126139extension OSSystemExtensionError . Code : CustomStringConvertible {
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ import SystemExtensions
1212#error("SystemExtensionKit doesn't support Swift versions below 5.5.")
1313#endif
1414
15- /// Current SystemExtensionKit version 2.0.4 . Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate.
16- public let version = " 2.0.4 "
15+ /// Current SystemExtensionKit version 2.0.5 . Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate.
16+ public let version = " 2.0.5 "
1717
1818public let SystemExtension = SystemExtensionKit . shared
1919
You can’t perform that action at this time.
0 commit comments