Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update feature/v2 with develop #1234

Merged
merged 94 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
9f29f64
REPLAY-1448 Add stepper recorder
maciejburda Mar 6, 2023
5369f9b
REPLAY-1448 Add custom UIStepper wireframes
maciejburda Mar 7, 2023
8bdba29
REPLAY-1448 Add button custom font color for disabled
maciejburda Mar 7, 2023
b340509
stop data collection note
rtrieu Mar 7, 2023
8cbbe23
Merge pull request #1195 from DataDog/rtrieu/docs-4984-ios
rtrieu Mar 7, 2023
18df2ab
REPLAY-1448 Add tests
maciejburda Mar 7, 2023
9516c8e
Note about how to stop collecting geolocation data
rtrieu Mar 7, 2023
6aa1fe4
Merge pull request #1196 from DataDog/rtrieu/docs-4984-ios
rtrieu Mar 7, 2023
bedcecb
REPLAY-1448 Refactor to shape elements
maciejburda Mar 8, 2023
7f68e4f
REPLAY-1448 Refactor to generic frame calculation
maciejburda Mar 8, 2023
c6bdb34
REPLAY-1448 Fix linter issues
maciejburda Mar 8, 2023
a0b8aab
Update to version 2.2.4 of testing framework
Mar 9, 2023
95de6c6
update image
rtrieu Mar 9, 2023
ea88f4a
Merge pull request #1203 from DataDog/rtrieu/update-application-detai…
rtrieu Mar 9, 2023
6b2b8ad
Merge pull request #1202 from DataDog/nachoBonafonte/update-to-testin…
Mar 10, 2023
29da304
REPLAY-1448
maciejburda Mar 10, 2023
9c78109
Merge pull request #1194 from DataDog/maciey/REPLAY-1448-uistepper
maciejburda Mar 10, 2023
e37bd0b
REPLAY-1330 Add snapshot tests for `UIDatePicker`
ncreated Mar 8, 2023
4f96587
REPLAY-1330 Record `UIDatePickers`
ncreated Mar 10, 2023
2878276
RUMM-2872 Initial work for stopping sessions
fuzzybinary Mar 10, 2023
c4c76fd
Replaces Mobile Vitals image, updates text and links
rtrieu Mar 11, 2023
86e76e9
REPLAY-1347 Proper image classification
maciejburda Mar 8, 2023
341ea8f
REPLAY-1347 Fix unit tests
maciejburda Mar 8, 2023
ddb3468
REPLAY-1347
maciejburda Mar 10, 2023
2b38dbc
REPLAY-1347
maciejburda Mar 10, 2023
1c4b5ef
REPLAY-1347
maciejburda Mar 10, 2023
f3cdddf
REPLAY-1347
maciejburda Mar 10, 2023
36efe90
REPLAY-1347
maciejburda Mar 13, 2023
dba1444
full size image
rtrieu Mar 14, 2023
f575c72
[RUMM-2997] Send a crash to both RUM and Logging features
plousada Mar 14, 2023
412f5fa
RUMM-2872 Update RUM protocol schema
fuzzybinary Mar 20, 2023
4686c79
RUMM-2872 Add session restart logic to ApplicationScope
fuzzybinary Mar 20, 2023
6cf09ca
Change initial sample collecting
maciejburda Mar 21, 2023
682c340
REPLAY-1330 CR feedback - update SnapshotTest deployment target to iO…
ncreated Mar 21, 2023
236555d
REPLAY-1330 CR feedback - ignore `_UICutoutShadowView` uniformly in a…
ncreated Mar 21, 2023
c539ee6
REPLAY-1347
maciejburda Mar 21, 2023
4911a71
Merge pull request #1204 from DataDog/ncreated/REPLAY-1330-support-da…
ncreated Mar 21, 2023
3557423
REPLAY-1457 Enhance `UISwitch` element masking
ncreated Mar 21, 2023
dfbcee6
REPLAY-1460 Enhance `UIStepper` element masking
ncreated Mar 21, 2023
ad2f290
Rework logic to only use a single message on the message BUS
plousada Mar 22, 2023
93db921
RUMM-2872 Add integration tests for stopped sessions
fuzzybinary Mar 21, 2023
076b87a
RUMM-2872 Restart last known view on a new session
fuzzybinary Mar 22, 2023
baf4efc
RUMM-3107 Silence unused warning
maxep Mar 22, 2023
aed4164
Merge pull request #1220 from DataDog/maxep/RUMM-3107/silence-warning
maxep Mar 23, 2023
ca8e152
Merge pull request #1217 from DataDog/ncreated/REPLAY-1457-improve-sw…
ncreated Mar 23, 2023
a06a4ab
Merge pull request #1218 from DataDog/ncreated/REPLAY-1460-improve-st…
ncreated Mar 23, 2023
9a9c9d2
Merge pull request #1216 from DataDog/maciey/vital-info-sampler-crash
maciejburda Mar 23, 2023
9995341
Merge pull request #1206 from DataDog/rtrieu/docs-4882-mobile-vitals-…
maxep Mar 23, 2023
fb2d2e1
Merge pull request #1209 from DataDog/plousada/RUMM-2997/send-crash-t…
plousada Mar 23, 2023
d55fb90
Update CHANGELOG.md
maciejburda Mar 23, 2023
be47215
Bumped version to 1.17.0
maciejburda Mar 23, 2023
b9102f7
Update CHANGELOG.md
maciejburda Mar 23, 2023
046151a
Update Tests/DatadogIntegrationTests/Scenarios/RUM/RUMCommonAsserts.s…
fuzzybinary Mar 23, 2023
9977a3d
REPLAY-1347
maciejburda Mar 24, 2023
b61526a
REPLAY-1347
maciejburda Mar 24, 2023
f7e7fe4
REPLAY-1347 Linter fix
maciejburda Mar 24, 2023
a088954
Merge pull request #1223 from DataDog/release/1.17.0
maciejburda Mar 24, 2023
b6ca7ab
Update CHANGELOG.md
maxep Mar 24, 2023
3280592
Merge pull request #1225 from DataDog/maxep-patch-1
maxep Mar 24, 2023
068dfd5
Merge pull request #1200 from DataDog/maciey/REPLAY-1347-improve-imag…
maciejburda Mar 27, 2023
bac90a0
REPLAY-1459 Add convenience api for time and byte size
maciejburda Mar 24, 2023
36dfa6f
REPLAY-1459 Add performance preset override
maciejburda Mar 24, 2023
05547e3
REPLAY-1459 Add tests
maciejburda Mar 24, 2023
d883fdb
REPLAY-1459 PR fixes
maciejburda Mar 24, 2023
caf3da8
REPLAY-1459 Fix tests build
maciejburda Mar 24, 2023
64a7702
REPLAY-1459 PR fixes
maciejburda Mar 27, 2023
5dc8f75
REPLAY-1459 Fix linting
maciejburda Mar 27, 2023
d557b44
REPLAY-1459 Update test
maciejburda Mar 27, 2023
0a9a67c
REPLAY-1459 Change signature to non-optional
maciejburda Mar 27, 2023
05a8278
RUMM-2872 Apply code review feedback
fuzzybinary Mar 27, 2023
5a657d8
Merge pull request #1219 from DataDog/jward/RUMM-2872-manually-end-se…
fuzzybinary Mar 27, 2023
c8a6288
REPLAY-1459 PR fixes
maciejburda Mar 28, 2023
5fbc41d
Merge pull request #1224 from DataDog/maciey/REPLAY-1459-session-repl…
maciejburda Mar 28, 2023
5e6329c
REPLAY-1345
maciejburda Mar 13, 2023
f7cb74b
REPLAY-1345
maciejburda Mar 21, 2023
d5a8510
REPLAY-1345 WIP
maciejburda Mar 28, 2023
dc04eb2
REPLAY-1345 Improve algorithm
maciejburda Mar 28, 2023
b41cac0
REPLAY-1345 Update max size value to use new semantics
maciejburda Mar 28, 2023
d3c6758
REPLAY-1345 Improve docs
maciejburda Mar 28, 2023
8a34b32
REPLAY-1345 Improvements
maciejburda Mar 28, 2023
ff06c26
REPLAY-1421 Use better fallback value for font definition in text wir…
ncreated Mar 29, 2023
033c617
Merge pull request #1229 from DataDog/ncreated/REPLAY-1421-enhance-fo…
ncreated Mar 29, 2023
8d7a75a
REPLAY-1345 PR fixes
maciejburda Mar 30, 2023
e9a9b13
Merge pull request #1228 from DataDog/maciey/REPLAY-1345-image-scalin…
maciejburda Mar 30, 2023
fbe5bf3
Upgrade to Framer 1.0.0
ncreated Mar 29, 2023
b7e33e6
REPLAY-1465 Enable image view snapshotting
maciejburda Mar 30, 2023
3598a49
REPLAY-1465 Add snapshot tests for images
maciejburda Mar 30, 2023
86b5628
Merge pull request #1230 from DataDog/ncreated+maciey/REPLAY-1465-uii…
maciejburda Mar 30, 2023
5ccc03c
Merge branch 'develop' into maxep/merge-develop-v2
maxep Mar 31, 2023
0a2ffb9
Bumped version to 1.17.0
maxep Apr 3, 2023
759d185
REPLAY-1459 Session replay custom limits
maxep Apr 3, 2023
d6bc473
RUMM-2997 Send a crash to both RUM and Logging features
maxep Apr 3, 2023
df307bf
RUMM-2872 Allow users to manually end a RUM session
maxep Apr 3, 2023
9969b08
Fix SPM dependencies
maxep Apr 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Unreleased

# 1.17.0 / 23-03-2023
- [BUGFIX] Fix crash in `VitalInfoSampler`. See [#1216][] (Thanks [@cltnschlosser][])
- [IMPROVEMENT] Fix Xcode analysis warning. See [#1220][]
- [BUGFIX] Send crashes to both RUM and Logs. See [#1209][]

# 1.16.0 / 02-03-2023
- [IMPROVEMENT] Always create an ApplicationLaunch view on session initialization. See [#1160][]
- [BUGFIX] Remove the data race caused by sampling on the RUM thread. See [#1177][] (Thanks [@cltnschlosser][])
Expand Down Expand Up @@ -438,6 +443,9 @@
[#1160]: https://github.com/DataDog/dd-sdk-ios/pull/1160
[#1177]: https://github.com/DataDog/dd-sdk-ios/pull/1177
[#1188]: https://github.com/DataDog/dd-sdk-ios/pull/1188
[#1209]: https://github.com/DataDog/dd-sdk-ios/pull/1209
[#1216]: https://github.com/DataDog/dd-sdk-ios/pull/1216
[#1220]: https://github.com/DataDog/dd-sdk-ios/pull/1220
[@00fa9a]: https://github.com/00FA9A
[@britton-earnin]: https://github.com/Britton-Earnin
[@hengyu]: https://github.com/Hengyu
Expand Down
54 changes: 54 additions & 0 deletions Datadog/Datadog.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion DatadogInternal.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "DatadogInternal"
s.version = "1.16.0"
s.version = "1.17.0"
s.summary = "Datadog Internal Package. This module is not for public use."

s.homepage = "https://www.datadoghq.com"
Expand Down
7 changes: 7 additions & 0 deletions DatadogInternal/Sources/DatadogFeature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public protocol DatadogFeature {
/// The `FeatureMessageReceiver` defines an interface for Feature to receive any message
/// from a bus that is shared between Features registered in a core.
var messageReceiver: FeatureMessageReceiver { get }

/// (Optional) `PerformancePresetOverride` allows overriding certain performance presets if needed.
var performanceOverride: PerformancePresetOverride? { get }
}


Expand All @@ -52,3 +55,7 @@ public protocol DatadogRemoteFeature: DatadogFeature {
/// The request will be transported by `DatadogCore`.
var requestBuilder: FeatureRequestBuilder { get }
}

extension DatadogFeature {
public var performanceOverride: PerformancePresetOverride? { nil }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2019-Present Datadog, Inc.
*/

import Foundation

/// An extension for FixedWidthInteger that provides a convenient API for
/// converting numeric values into different units of data storage, such as
/// bytes, kilobytes, megabytes, and gigabytes.
public extension FixedWidthInteger {
/// A private property that represents the base unit (1024) used for
/// converting between data storage units.
private var base: Self { 1_024 }

/// A property that converts the given numeric value into kilobytes.
var KB: Self { return self.multipliedReportingOverflow(by: base).partialValue }

/// A property that converts the given numeric value into megabytes.
var MB: Self { return self.KB.multipliedReportingOverflow(by: base).partialValue }

/// A property that converts the given numeric value into gigabytes.
var GB: Self { return self.MB.multipliedReportingOverflow(by: base).partialValue }

/// A helper property that returns the current value as a direct representation in bytes.
var bytes: Self { return self }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2019-Present Datadog, Inc.
*/

import Foundation

/// An extension for TimeInterval that provides a more semantic and expressive
/// API for converting time representations into TimeInterval's default unit: seconds.
public extension TimeInterval {
/// A helper property that returns the current value as a direct representation in seconds.
var seconds: TimeInterval { return TimeInterval(self) }

/// A property that converts the given number of minutes into seconds.
/// In case of overflow, TimeInterval.greatestFiniteMagnitude is returned.
var minutes: TimeInterval { return self.multiplyOrClamp(by: 60) }

/// A property that converts the given number of hours into seconds.
/// In case of overflow, TimeInterval.greatestFiniteMagnitude is returned.
var hours: TimeInterval { return self.multiplyOrClamp(by: 60.minutes) }

/// A property that converts the given number of days into seconds.
/// In case of overflow, TimeInterval.greatestFiniteMagnitude is returned.
var days: TimeInterval { return self.multiplyOrClamp(by: 24.hours) }

/// A private helper method for multiplying the TimeInterval value by a factor
/// and clamping the result to prevent overflow. If the multiplication results in
/// overflow, the greatest finite magnitude value of TimeInterval is returned.
///
/// - Parameter factor: The multiplier to apply to the time interval.
/// - Returns: The multiplied time interval, clamped to the greatest finite magnitude if necessary.
private func multiplyOrClamp(by factor: TimeInterval) -> TimeInterval {
guard factor != 0 else {
return 0
}
let multiplied = TimeInterval(self) * factor
if multiplied / factor != TimeInterval(self) {
return TimeInterval.greatestFiniteMagnitude
}
return multiplied
}
}

/// An extension for FixedWidthInteger that provides a more semantic and expressive
/// API for converting time representations into TimeInterval's default unit: seconds.
public extension FixedWidthInteger {
/// A helper property that returns the current value as a direct representation in seconds.
var seconds: TimeInterval { return TimeInterval(self) }

/// A property that converts the given numeric value of minutes into seconds.
/// In case of overflow, TimeInterval.greatestFiniteMagnitude is returned.
var minutes: TimeInterval {
let (result, overflow) = self.multipliedReportingOverflow(by: 60)
return overflow ? TimeInterval.greatestFiniteMagnitude : TimeInterval(result)
}

/// A property that converts the given numeric value of hours into seconds.
/// In case of overflow, TimeInterval.greatestFiniteMagnitude is returned.
var hours: TimeInterval {
let (result, overflow) = self.multipliedReportingOverflow(by: Self(60.minutes))
return overflow ? TimeInterval.greatestFiniteMagnitude : TimeInterval(result)
}

/// A property that converts the given numeric value of days into seconds.
/// In case of overflow, TimeInterval.greatestFiniteMagnitude is returned.
var days: TimeInterval {
let (result, overflow) = self.multipliedReportingOverflow(by: Self(24.hours))
return overflow ? TimeInterval.greatestFiniteMagnitude : TimeInterval(result)
}
}
31 changes: 31 additions & 0 deletions DatadogInternal/Sources/Storage/PerformancePresetOverride.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2019-Present Datadog, Inc.
*/

import Foundation

/// `PerformancePresetOverride` is a public structure that allows you to customize
/// performance presets by setting optional limits. If the limits are not provided, the default values from
/// the `PerformancePreset` object will be used.
public struct PerformancePresetOverride {
/// An optional value representing the maximum allowed file size in bytes.
/// If not provided, the default value from the `PerformancePreset` object is used.
public let maxFileSize: UInt64?

/// An optional value representing the maximum allowed object size in bytes.
/// If not provided, the default value from the `PerformancePreset` object is used.
public let maxObjectSize: UInt64?

/// Initializes a new `PerformancePresetOverride` instance with the provided
/// maximum file size and maximum object size limits.
///
/// - Parameters:
/// - maxFileSize: The maximum allowed file size in bytes, or `nil` to use the default value from `PerformancePreset`.
/// - maxObjectSize: The maximum allowed object size in bytes, or `nil` to use the default value from `PerformancePreset`.
public init(maxFileSize: UInt64?, maxObjectSize: UInt64?) {
self.maxFileSize = maxFileSize
self.maxObjectSize = maxObjectSize
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2019-Present Datadog, Inc.
*/

import XCTest
@testable import DatadogInternal

final class FixedWidthIntegerConvenienceTests: XCTestCase {
func test_Bytes() {
let value: Int = 1_000
XCTAssertEqual(value.bytes, 1_000)
}

func test_Kilobytes() {
let value: Int = 1
XCTAssertEqual(value.KB, 1_024)
}

func test_Megabytes() {
let value: Int = 1
XCTAssertEqual(value.MB, 1_048_576)
}

func test_Gigabytes() {
let value: Int = 1
XCTAssertEqual(value.GB, 1_073_741_824)
}

func test_OverflowKilobytes() {
let value = UInt64.max / 1_024
XCTAssertEqual(value.KB, UInt64.max &- 1_023)
}

func test_OverflowMegabytes() {
let value = UInt64.max / (1_024 * 1_024)
XCTAssertEqual(value.MB, UInt64.max &- 1_048_575)
}

func test_OverflowGigabytes() {
let value = UInt64.max / (1_024 * 1_024 * 1_024)
XCTAssertEqual(value.GB, UInt64.max &- 1_073_741_823)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2019-Present Datadog, Inc.
*/

import XCTest
@testable import Datadog

final class TimeIntervalConvenienceTests: XCTestCase {
func test_Seconds() {
XCTAssertEqual(TimeInterval(30).seconds, 30)
XCTAssertEqual(Int(30).seconds, 30)
}

func test_Minutes() {
XCTAssertEqual(TimeInterval(2).minutes, 120)
XCTAssertEqual(Int(2).minutes, 120)
}

func test_Hours() {
XCTAssertEqual(TimeInterval(3).hours, 10_800)
XCTAssertEqual(Int(2).minutes, 120)
}

func test_Days() {
XCTAssertEqual(TimeInterval(1).days, 86_400)
XCTAssertEqual(Int(2).minutes, 120)
}

func test_Overflow() {
let timeInterval = TimeInterval.greatestFiniteMagnitude
XCTAssertEqual(timeInterval.minutes, TimeInterval.greatestFiniteMagnitude)
XCTAssertEqual(timeInterval.hours, TimeInterval.greatestFiniteMagnitude)
XCTAssertEqual(timeInterval.days, TimeInterval.greatestFiniteMagnitude)

let integerTimeInterval = Int.max
XCTAssertEqual(integerTimeInterval.minutes, TimeInterval.greatestFiniteMagnitude)
XCTAssertEqual(integerTimeInterval.hours, TimeInterval.greatestFiniteMagnitude)
XCTAssertEqual(integerTimeInterval.days, TimeInterval.greatestFiniteMagnitude)
}
}
2 changes: 1 addition & 1 deletion DatadogLogs.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "DatadogLogs"
s.version = "1.16.0"
s.version = "1.17.0"
s.summary = "Datadog Logs Module."

s.homepage = "https://www.datadoghq.com"
Expand Down
2 changes: 1 addition & 1 deletion DatadogLogs/Sources/Feature/MessageReceivers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal enum LoggingMessageKeys {
static let log = "log"

/// The key references a crash message.
static let crash = "crash-log"
static let crash = "crash"

/// The key references a browser log message.
static let browserLog = "browser-log"
Expand Down
2 changes: 1 addition & 1 deletion DatadogSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "DatadogSDK"
s.module_name = "Datadog"
s.version = "1.16.0"
s.version = "1.17.0"
s.summary = "Official Datadog Swift SDK for iOS."

s.homepage = "https://www.datadoghq.com"
Expand Down
2 changes: 1 addition & 1 deletion DatadogSDKAlamofireExtension.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "DatadogSDKAlamofireExtension"
s.module_name = "DatadogAlamofireExtension"
s.version = "1.16.0"
s.version = "1.17.0"
s.summary = "An Official Extensions of Datadog Swift SDK for Alamofire."

s.homepage = "https://www.datadoghq.com"
Expand Down
2 changes: 1 addition & 1 deletion DatadogSDKCrashReporting.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "DatadogSDKCrashReporting"
s.module_name = "DatadogCrashReporting"
s.version = "1.16.0"
s.version = "1.17.0"
s.summary = "Official Datadog Crash Reporting SDK for iOS."

s.homepage = "https://www.datadoghq.com"
Expand Down
2 changes: 1 addition & 1 deletion DatadogSDKObjc.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "DatadogSDKObjc"
s.module_name = "DatadogObjc"
s.version = "1.16.0"
s.version = "1.17.0"
s.summary = "Official Datadog Objective-C SDK for iOS."

s.homepage = "https://www.datadoghq.com"
Expand Down
2 changes: 1 addition & 1 deletion DatadogSDKSessionReplay.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "DatadogSDKSessionReplay"
s.module_name = "DatadogSessionReplay"
s.version = "1.16.0"
s.version = "1.17.0"
s.summary = "Official Datadog Session Replay SDK for iOS. This module is currently in beta - contact Datadog to request a try."

s.homepage = "https://www.datadoghq.com"
Expand Down
18 changes: 13 additions & 5 deletions DatadogSessionReplay/SRSnapshotTests/SRHost/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}

var keyWindow: UIWindow? {
return UIApplication.shared
.connectedScenes
.compactMap { $0 as? UIWindowScene }
.first { scene in scene.windows.contains { window in window.isKeyWindow } }?
.keyWindow
if #available(iOS 15.0, *) {
return UIApplication.shared
.connectedScenes
.compactMap { $0 as? UIWindowScene }
.first { scene in scene.windows.contains { window in window.isKeyWindow } }?
.keyWindow
} else {
let application = UIApplication.value(forKeyPath: #keyPath(UIApplication.shared)) as? UIApplication // swiftlint:disable:this unsafe_uiapplication_shared
return application?
.connectedScenes
.flatMap { ($0 as? UIWindowScene)?.windows ?? [] }
.first { $0.isKeyWindow }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dd_logo.jpg",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading