Skip to content

Commit e10fb4e

Browse files
committed
Mark Bundle.unload as unsupported
Since NSBundle's unload mechanism is a Mach-specific concept, which is not relevant on non-Darwin platforms, mark it as deprecated and change the unavailability macro so that they are distinguishable from implementations that are not yet available.
1 parent 8615f82 commit e10fb4e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Foundation/Bundle.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ open class Bundle: NSObject {
7777
open var isLoaded: Bool {
7878
return CFBundleIsExecutableLoaded(_bundle)
7979
}
80-
open func unload() -> Bool { NSUnimplemented() }
80+
@available(*,deprecated,message:"Not available on non-Darwin platforms")
81+
open func unload() -> Bool { NSUnsupported() }
8182

8283
open func preflight() throws {
8384
var unmanagedError:Unmanaged<CFError>? = nil

0 commit comments

Comments
 (0)