Skip to content

Commit 917fe7e

Browse files
committed
Fix FormatUtils imports for SwiftPM
1 parent 0bde352 commit 917fe7e

File tree

1 file changed

+5
-0
lines changed
  • packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation

1 file changed

+5
-0
lines changed

packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/FormatUtils.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
// Import Objectice-C part of the implementation when SwiftPM is used.
6+
#if canImport(camera_avfoundation_objc)
7+
import camera_avfoundation_objc
8+
#endif
9+
510
enum FormatUtils {
611
// Returns frame rate supported by format closest to targetFrameRate.
712
private static func bestFrameRate(for format: FLTCaptureDeviceFormat, targetFrameRate: Double)

0 commit comments

Comments
 (0)