Skip to content

Commit

Permalink
[visionOS] Fix Storage SDK build on Xcode 15 beta 6 (#11667)
Browse files Browse the repository at this point in the history
In Xcode 15 beta 6, `#if os(iOS)` no longer evaluates to true when building for visionOS.

Note: `TARGET_OS_IOS` continues to be defined so Objective-C code is unchanged.
  • Loading branch information
andrewheard authored Aug 9, 2023
1 parent 0e183e0 commit df56264
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion FirebaseStorage/Sources/Internal/StorageUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ import Foundation
import MobileCoreServices
#elseif os(macOS) || os(watchOS)
import CoreServices
#endif
#endif // os(iOS) || os(tvOS)

// swift(>=5.9) implies Xcode 15+
// Need to have this Swift version check to use os(visionOS) macro, VisionOS support.
// TODO: Remove this check and add `os(visionOS)` to the `os(iOS) || os(tvOS)` conditional above
// when Xcode 15 is the minimum supported by Firebase.
#if swift(>=5.9)
#if os(visionOS)
import MobileCoreServices
#endif // os(visionOS)
#endif // swift(>=5.9)

class StorageUtils {
internal class func defaultRequestForReference(reference: StorageReference,
Expand Down

0 comments on commit df56264

Please sign in to comment.