File tree 2 files changed +14
-8
lines changed
2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,14 @@ import CoreFoundation
12
12
open class Bundle : NSObject {
13
13
private var _bundle : CFBundle !
14
14
15
+ internal static var _supportsFHSStyle : Bool {
16
+ #if DEPLOYMENT_RUNTIME_OBJC
17
+ return false
18
+ #else
19
+ return _CFBundleSupportsFHSBundles ( )
20
+ #endif
21
+ }
22
+
15
23
private static var _mainBundle : Bundle = {
16
24
return Bundle ( cfBundle: CFBundleGetMainBundle ( ) )
17
25
} ( )
Original file line number Diff line number Diff line change @@ -43,18 +43,16 @@ class BundlePlayground {
43
43
44
44
static var allApplicable : [ Layout ] {
45
45
let layouts : [ Layout ] = [ . flat, . fhsInstalled, . fhsFreestanding ]
46
-
47
- #if DEPLOYMENT_RUNTIME_OBJC
48
- let supportsFHS = false
49
- #else
50
- let supportsFHS = _CFBundleSupportsFHSBundles ( )
51
- #endif
52
-
53
- if supportsFHS {
46
+
47
+ #if NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT
48
+ if Bundle . _supportsFHSStyle {
54
49
return layouts
55
50
} else {
56
51
return layouts. filter { !$0. isFHS }
57
52
}
53
+ #else
54
+ return layouts. filter { !$0. isFHS }
55
+ #endif
58
56
}
59
57
var isFHS : Bool {
60
58
return self == . fhsInstalled || self == . fhsFreestanding
You can’t perform that action at this time.
0 commit comments