mirror of
https://github.com/RevenueCat/purchases-ios
synced 2026-11-11 22:55:55 +05:45
* Remove M1 base image + test with installing simulator runtime on xcode 14.3.1 * Comment out other jobs for testing * Added SnapshotTestingStub Package.swift for Swift 5.8 when running on CircleCI with Xcode 14.3.1 * Re-add rosetta step for iOS 13 simulators * Fix compilation errors targeting iOS 13 because of SKTesting API not being available * Reverting temporary commenting out CircleCI jobs * Removed iOS 13 test support since it was only used for generating snapshots, which failed * Removed M1 specific Mint dependency from CircleCI config * Simplified CircleCI config by removing macos 12.6 executer since it's no longer used * Remove last mention of old macos executor * Removed the validate Package.swift file for Swift 5.7 build step * Removed iOS 14 test from default build and run * Removed support for Swift 5.7 and removed related Swift version checks
49 lines
1.5 KiB
Swift
49 lines
1.5 KiB
Swift
//
|
|
// Copyright RevenueCat Inc. All Rights Reserved.
|
|
//
|
|
// Licensed under the MIT License (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// https://opensource.org/licenses/MIT
|
|
//
|
|
// DebugViewSheetPresentation.swift
|
|
//
|
|
// Created by Nacho Soto on 5/30/23.
|
|
|
|
#if DEBUG && (os(iOS) || os(macOS) || VISION_OS)
|
|
|
|
import SwiftUI
|
|
|
|
@available(iOS 16.0, macOS 13.0, *)
|
|
extension View {
|
|
|
|
@ViewBuilder
|
|
func bottomSheet(
|
|
presentationDetents: Set<PresentationDetent>,
|
|
isPresented: Binding<Bool>,
|
|
largestUndimmedIdentifier: PresentationDetent = .large,
|
|
cornerRadius: CGFloat,
|
|
interactiveDismissDisabled: Bool = false,
|
|
@ViewBuilder content: @escaping () -> some View
|
|
) -> some View {
|
|
self
|
|
.sheet(isPresented: isPresented) {
|
|
let result = content()
|
|
.presentationDetents(presentationDetents)
|
|
.presentationDragIndicator(.automatic)
|
|
.interactiveDismissDisabled(interactiveDismissDisabled)
|
|
|
|
if #available(iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4, *) {
|
|
result
|
|
.presentationCornerRadius(cornerRadius)
|
|
.presentationBackgroundInteraction(.enabled(upThrough: largestUndimmedIdentifier))
|
|
} else {
|
|
result
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif
|