From f2b806741cca7e22c09c5fffb9ccb3965152b4e4 Mon Sep 17 00:00:00 2001 From: AJ Lauer Barinov <102617203+andrewjl-mux@users.noreply.github.com> Date: Thu, 3 Aug 2023 14:21:07 -0700 Subject: [PATCH 1/7] Remove UIKit dependency (#90) Replace use of UIDevice and use a different non-UIKit source --- .../Reporting/Reporter.swift | 67 ++++++++++++++----- 1 file changed, 51 insertions(+), 16 deletions(-) diff --git a/Sources/MuxUploadSDK/InternalUtilities/Reporting/Reporter.swift b/Sources/MuxUploadSDK/InternalUtilities/Reporting/Reporter.swift index 99697543..1d48317d 100644 --- a/Sources/MuxUploadSDK/InternalUtilities/Reporting/Reporter.swift +++ b/Sources/MuxUploadSDK/InternalUtilities/Reporting/Reporter.swift @@ -6,7 +6,36 @@ // import Foundation -import UIKit + +fileprivate func processInfoOperationSystemVersion() -> String { + let version = ProcessInfo().operatingSystemVersion + return "\(version.majorVersion).\(version.minorVersion).\(version.patchVersion)" +} + +fileprivate func posixModelName() -> String { + var systemName = utsname() + uname(&systemName) + return withUnsafePointer(to: &systemName.machine) { + $0.withMemoryRebound(to: CChar.self, capacity: 1) { + ptr in String.init(validatingUTF8: ptr) + } + } ?? "Unknown" +} + +fileprivate func inferredPlatformName() -> String { + let modelName = posixModelName() + if modelName.contains("ipad") { + return "iPadOS" + } else if modelName.contains("iphone") { + return "iOS" + } else { + #if targetEnvironment(simulator) + return "Simulator" + #else + return "Unknown" + #endif + } +} class Reporter: NSObject { @@ -28,9 +57,11 @@ class Reporter: NSObject { var locale: Locale { Locale.current } - var device: UIDevice { - UIDevice.current - } + + let model: String + let platformName: String + let platformVersion: String + var regionCode: String? { if #available(iOS 16, *) { return locale.language.region?.identifier @@ -52,6 +83,10 @@ class Reporter: NSObject { string: "https://mobile.muxanalytics.com" )! + self.model = posixModelName() + self.platformName = inferredPlatformName() + self.platformVersion = processInfoOperationSystemVersion() + super.init() let sessionConfig: URLSessionConfiguration = URLSessionConfiguration.default @@ -105,12 +140,12 @@ extension Reporter { let data = UploadSucceededEvent.Data( appName: Bundle.main.appName, appVersion: Bundle.main.appVersion, - deviceModel: device.model, + deviceModel: model, inputDuration: inputDuration, inputSize: inputSize, inputStandardizationRequested: options.inputStandardization.isRequested, - platformName: device.systemName, - platformVersion: device.systemVersion, + platformName: platformName, + platformVersion: platformVersion, regionCode: regionCode, sdkVersion: Version.versionString, uploadStartTime: uploadStartTime, @@ -145,13 +180,13 @@ extension Reporter { let data = UploadFailedEvent.Data( appName: Bundle.main.appName, appVersion: Bundle.main.appVersion, - deviceModel: device.model, + deviceModel: model, errorDescription: errorDescription, inputDuration: inputDuration, inputSize: inputSize, inputStandardizationRequested: options.inputStandardization.isRequested, - platformName: device.systemName, - platformVersion: device.systemVersion, + platformName: platformName, + platformVersion: platformVersion, regionCode: regionCode, sdkVersion: Version.versionString, uploadStartTime: uploadStartTime, @@ -186,13 +221,13 @@ extension Reporter { let data = InputStandardizationSucceededEvent.Data( appName: Bundle.main.appName, appVersion: Bundle.main.appVersion, - deviceModel: device.model, + deviceModel: model, inputDuration: inputDuration, inputSize: inputSize, maximumResolution: options.inputStandardization.maximumResolution.description, nonStandardInputReasons: nonStandardInputReasons.map(\.description), - platformName: device.systemName, - platformVersion: device.systemVersion, + platformName: platformName, + platformVersion: platformVersion, regionCode: regionCode, sdkVersion: Version.versionString, standardizationStartTime: standardizationStartTime, @@ -229,14 +264,14 @@ extension Reporter { let data = InputStandardizationFailedEvent.Data( appName: Bundle.main.appName, appVersion: Bundle.main.appVersion, - deviceModel: device.model, + deviceModel: model, errorDescription: errorDescription, inputDuration: inputDuration, inputSize: inputSize, maximumResolution: options.inputStandardization.maximumResolution.description, nonStandardInputReasons: nonStandardInputReasons.map(\.description), - platformName: device.systemName, - platformVersion: device.systemVersion, + platformName: platformName, + platformVersion: platformVersion, regionCode: regionCode, sdkVersion: Version.versionString, standardizationStartTime: standardizationStartTime, From 36d7be76d9e19bde199f5d387ebd376b9ec88b76 Mon Sep 17 00:00:00 2001 From: AJ Lauer Barinov <102617203+andrewjl-mux@users.noreply.github.com> Date: Fri, 4 Aug 2023 13:49:28 -0700 Subject: [PATCH 2/7] Version updates (#91) --- Mux-Upload-SDK.podspec | 2 +- Sources/MuxUploadSDK/PublicAPI/Version.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mux-Upload-SDK.podspec b/Mux-Upload-SDK.podspec index 1c9e7fce..5387dc41 100644 --- a/Mux-Upload-SDK.podspec +++ b/Mux-Upload-SDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'Mux-Upload-SDK' s.module_name = 'MuxUploadSDK' - s.version = '0.3.1' + s.version = '0.5.1' s.summary = 'Upload video to Mux.' s.description = 'A library for uploading video to Mux. Similar to UpChunk, but for iOS.' diff --git a/Sources/MuxUploadSDK/PublicAPI/Version.swift b/Sources/MuxUploadSDK/PublicAPI/Version.swift index 8e8e9154..37848b05 100644 --- a/Sources/MuxUploadSDK/PublicAPI/Version.swift +++ b/Sources/MuxUploadSDK/PublicAPI/Version.swift @@ -13,7 +13,7 @@ public struct Version { /// Minor version. public static let minor = 5 /// Revision number. - public static let revision = 0 + public static let revision = 1 /// String form of the version number. public static let versionString = "\(major).\(minor).\(revision)" From 16a37a6a94428999ef98df01d220c5e74edcf533 Mon Sep 17 00:00:00 2001 From: AJ Lauer Barinov Date: Mon, 7 Aug 2023 11:26:12 -0700 Subject: [PATCH 3/7] fix: adjust version --- Mux-Upload-SDK.podspec | 2 +- Sources/MuxUploadSDK/PublicAPI/Version.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Mux-Upload-SDK.podspec b/Mux-Upload-SDK.podspec index 5387dc41..429e0473 100644 --- a/Mux-Upload-SDK.podspec +++ b/Mux-Upload-SDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'Mux-Upload-SDK' s.module_name = 'MuxUploadSDK' - s.version = '0.5.1' + s.version = '0.6.0' s.summary = 'Upload video to Mux.' s.description = 'A library for uploading video to Mux. Similar to UpChunk, but for iOS.' diff --git a/Sources/MuxUploadSDK/PublicAPI/Version.swift b/Sources/MuxUploadSDK/PublicAPI/Version.swift index 37848b05..6d4d714a 100644 --- a/Sources/MuxUploadSDK/PublicAPI/Version.swift +++ b/Sources/MuxUploadSDK/PublicAPI/Version.swift @@ -11,9 +11,9 @@ public struct Version { /// Major version. public static let major = 0 /// Minor version. - public static let minor = 5 + public static let minor = 6 /// Revision number. - public static let revision = 1 + public static let revision = 0 /// String form of the version number. public static let versionString = "\(major).\(minor).\(revision)" From 8a059321936dac2ccf6548b46850234858df61ef Mon Sep 17 00:00:00 2001 From: AJ Lauer Barinov Date: Mon, 7 Aug 2023 14:52:28 -0700 Subject: [PATCH 4/7] docs: backfill missing inline API docs (#92) --- .../MuxUploadSDK/PublicAPI/DirectUpload.swift | 5 ++ .../Options/DirectUploadOptions.swift | 55 +++++++++++-------- Sources/MuxUploadSDK/PublicAPI/Version.swift | 1 + 3 files changed, 39 insertions(+), 22 deletions(-) diff --git a/Sources/MuxUploadSDK/PublicAPI/DirectUpload.swift b/Sources/MuxUploadSDK/PublicAPI/DirectUpload.swift index 22064448..9736cdbf 100644 --- a/Sources/MuxUploadSDK/PublicAPI/DirectUpload.swift +++ b/Sources/MuxUploadSDK/PublicAPI/DirectUpload.swift @@ -8,6 +8,8 @@ import AVFoundation import Foundation +/// Indicates whether a finished upload failed due to an error +/// or succeeded along with details public typealias DirectUploadResult = Result /// @@ -341,6 +343,9 @@ public final class DirectUpload { */ public var progressHandler: StateHandler? + /** + Details about a ``DirectUpload`` after it successfully finished + */ public struct SuccessDetails : Sendable, Hashable { public let finalState: TransportStatus } diff --git a/Sources/MuxUploadSDK/PublicAPI/Options/DirectUploadOptions.swift b/Sources/MuxUploadSDK/PublicAPI/Options/DirectUploadOptions.swift index e152c805..18492d15 100644 --- a/Sources/MuxUploadSDK/PublicAPI/Options/DirectUploadOptions.swift +++ b/Sources/MuxUploadSDK/PublicAPI/Options/DirectUploadOptions.swift @@ -4,24 +4,28 @@ import Foundation +// MARK: - Direct Upload Options + /// Options for the direct upload public struct DirectUploadOptions { // MARK: - Transport Options - /// Options to control the SDK network operations to - /// transport the direct upload input to Mux + /// Options to adjust ``DirectUpload`` chunk transport + /// over the network. public struct Transport { - /// At least 8M is recommended + /// The size of each file chunk in bytes sent by the + /// SDK during an upload. At least 8MB is recommended. public var chunkSizeInBytes: Int - /// Number of retry attempts per chunk if the - /// associated request fails + /// Number of retry attempts per chunk if its upload + /// request is unsuccessful public var retryLimitPerChunk: Int - /// A default set of transport options: 8MB chunk - /// size and chunk request retry limit of 3 + /// Default options for ``DirectUpload`` chunk transport + /// over the network. The chunk size is 8MB and the + /// per-chunk retry limit is 3. public static var `default`: Transport { Transport( chunkSizeInBytes: 8 * 1024 * 1024, @@ -29,14 +33,14 @@ public struct DirectUploadOptions { ) } - /// Initializes options that govern network transport - /// by the SDK + /// Initializes options for upload chunk transport + /// over the network /// /// - Parameters: - /// - chunkSize: the size of each file chunk in + /// - chunkSizeInBytes: the size of each file chunk in /// bytes the SDK sends when uploading, default /// value is 8MB - /// - retriesPerChunk: number of retry attempts + /// - retryLimitPerChunk: number of retry attempts /// if the chunk request fails, default value is 3 public init( chunkSizeInBytes: Int = 8 * 1024 * 1024, @@ -52,7 +56,9 @@ public struct DirectUploadOptions { // MARK: - Input Standardization Options - /// Options controlling direct upload input standardization + /// Options for adjusments made by ``DirectUpload`` + /// to some inputs to minimize processing time during + /// ingestion public struct InputStandardization { /// If requested the SDK will attempt to detect @@ -124,8 +130,8 @@ public struct DirectUploadOptions { maximumResolution: .default ) - // Kept private to an invalid combination of parameters - // being used for initialization + // Kept private to avoid an invalid combination of + // parameters being used for initialization private init( isRequested: Bool, maximumResolution: MaximumResolution @@ -134,10 +140,8 @@ public struct DirectUploadOptions { self.maximumResolution = maximumResolution } - /// Used to initialize ``DirectUploadOptions.InputStandardization`` - /// with that enables input standardization with - /// a maximum resolution - /// + /// Initializes options that request input + /// standardization with a custom maximum resolution /// - Parameters: /// - maximumResolution: the maximum resolution /// of the standardized input @@ -213,11 +217,18 @@ public struct DirectUploadOptions { /// disable standardizing the format of the direct /// upload inputs, it is requested by default. To /// prevent the SDK from making any changes to the + /// - Parameters: + /// - eventTracking: event tracking options for the + /// direct upload + /// - inputStandardization: options to enable or + /// disable standardizing the format of the direct + /// upload inputs. True by default. + /// To prevent the SDK from making any changes to the /// format of the input use ``DirectUploadOptions.InputStandardization.skipped`` - /// - chunkSize: the size of each file chunk in - /// bytes the SDK sends when uploading, default - /// value is 8MB - /// - retriesPerChunk: number of retry attempts + /// - chunkSizeInBytes: The size of each file chunk + /// in bytes sent by the SDK during an upload. + /// Defaults to 8MB. + /// - retryLimitPerChunk: number of retry attempts /// if the chunk request fails, default value is 3 public init( eventTracking: EventTracking = .default, diff --git a/Sources/MuxUploadSDK/PublicAPI/Version.swift b/Sources/MuxUploadSDK/PublicAPI/Version.swift index 6d4d714a..ca674b71 100644 --- a/Sources/MuxUploadSDK/PublicAPI/Version.swift +++ b/Sources/MuxUploadSDK/PublicAPI/Version.swift @@ -7,6 +7,7 @@ import Foundation +/// Version information about the SDK public struct Version { /// Major version. public static let major = 0 From a40a6038ec02cf72c476f13b3310cebf29d4b2fc Mon Sep 17 00:00:00 2001 From: AJ Lauer Barinov Date: Wed, 23 Aug 2023 15:02:40 -0700 Subject: [PATCH 5/7] feat: Expose Foundation Measurement API for chunk size (#94) * Minor inline API doc tweaks --- .../Options/DirectUploadOptions.swift | 106 +++++++++++++----- 1 file changed, 81 insertions(+), 25 deletions(-) diff --git a/Sources/MuxUploadSDK/PublicAPI/Options/DirectUploadOptions.swift b/Sources/MuxUploadSDK/PublicAPI/Options/DirectUploadOptions.swift index 18492d15..61b4787c 100644 --- a/Sources/MuxUploadSDK/PublicAPI/Options/DirectUploadOptions.swift +++ b/Sources/MuxUploadSDK/PublicAPI/Options/DirectUploadOptions.swift @@ -11,8 +11,9 @@ public struct DirectUploadOptions { // MARK: - Transport Options - /// Options to adjust ``DirectUpload`` chunk transport - /// over the network. + /// Options for tuning network transport of direct upload + /// chunks to Mux. Using the ``default`` is recommended + /// for most applications. public struct Transport { /// The size of each file chunk in bytes sent by the @@ -33,15 +34,35 @@ public struct DirectUploadOptions { ) } - /// Initializes options for upload chunk transport + /// Initializes options for transport of upload chunks + /// over the network + /// - Parameters: + /// - chunkSize: the size of each file chunk sent + /// by the SDK during an upload. + /// Defaults to 8MB. + /// - retryLimitPerChunk: number of times a failed + /// chunk request is retried. Default limit is + /// 3 retries. + public init( + chunkSize: Measurement = .defaultDirectUploadChunkSize, + retryLimitPerChunk: Int = 3 + ) { + self.chunkSizeInBytes = Int( + abs(chunkSize.converted(to: .bytes).value) + .rounded(.down) + ) + self.retryLimitPerChunk = retryLimitPerChunk + } + + /// Initializes options for transport of upload chunks /// over the network - /// /// - Parameters: - /// - chunkSizeInBytes: the size of each file chunk in - /// bytes the SDK sends when uploading, default - /// value is 8MB - /// - retryLimitPerChunk: number of retry attempts - /// if the chunk request fails, default value is 3 + /// - chunkSizeInBytes: the size of each file + /// chunk in bytes the SDK uploads in a single + /// request. Default chunk size is 8MB. + /// - retryLimitPerChunk: number of times a failed + /// chunk request is retried. Default limit is + /// 3 retries. public init( chunkSizeInBytes: Int = 8 * 1024 * 1024, retryLimitPerChunk: Int = 3 @@ -51,7 +72,7 @@ public struct DirectUploadOptions { } } - /// Transport options for the direct upload + /// Network transport options for direct upload chunks public var transport: Transport // MARK: - Input Standardization Options @@ -190,12 +211,14 @@ public struct DirectUploadOptions { // MARK: Direct Upload Options Initializers + /// Initializes options that dictate how the direct upload + /// is carried out by the SDK /// - Parameters: - /// - inputStandardization: options to enable or - /// disable standardizing the format of the direct - /// upload inputs, it is requested by default. To - /// prevent the SDK from making any changes to the - /// format of the input use ``DirectUploadOptions.InputStandardization.skipped`` + /// - inputStandardization: options related to input + /// standardization. Input standardization is requested + /// by default. + /// To skip input standardization pass in + /// ``DirectUploadOptions.InputStandardization.skipped``. /// - transport: options for transporting the /// direct upload input to Mux /// - eventTracking: event tracking options for the @@ -210,26 +233,49 @@ public struct DirectUploadOptions { self.eventTracking = eventTracking } + /// Initializes options that dictate how the direct upload + /// is carried out by the SDK /// - Parameters: /// - eventTracking: event tracking options for the /// direct upload - /// - inputStandardization: options to enable or - /// disable standardizing the format of the direct - /// upload inputs, it is requested by default. To - /// prevent the SDK from making any changes to the + /// - inputStandardization: options related to input + /// standardization. Input standardization is requested + /// by default. + /// To skip input standardization pass in + /// ``DirectUploadOptions.InputStandardization.skipped``. + /// - chunkSize: The size of each file chunk sent by + /// the SDK during an upload. Defaults to 8MB. + /// - retryLimitPerChunk: number of retry attempts + /// if the chunk request fails. Defaults to 3. + public init( + eventTracking: EventTracking = .default, + inputStandardization: InputStandardization = .default, + chunkSize: Measurement = .defaultDirectUploadChunkSize, + retryLimitPerChunk: Int = 3 + ) { + self.eventTracking = eventTracking + self.inputStandardization = inputStandardization + self.transport = Transport( + chunkSize: chunkSize, + retryLimitPerChunk: retryLimitPerChunk + ) + } + + /// Initializes options that dictate how the direct upload + /// is carried out by the SDK /// - Parameters: /// - eventTracking: event tracking options for the /// direct upload - /// - inputStandardization: options to enable or - /// disable standardizing the format of the direct - /// upload inputs. True by default. - /// To prevent the SDK from making any changes to the - /// format of the input use ``DirectUploadOptions.InputStandardization.skipped`` + /// - inputStandardization: options related to input + /// standardization. Input standardization is requested + /// by default. + /// To skip input standardization pass in + /// ``DirectUploadOptions.InputStandardization.skipped``. /// - chunkSizeInBytes: The size of each file chunk /// in bytes sent by the SDK during an upload. /// Defaults to 8MB. /// - retryLimitPerChunk: number of retry attempts - /// if the chunk request fails, default value is 3 + /// if the chunk request fails. Defaults to 3. public init( eventTracking: EventTracking = .default, inputStandardization: InputStandardization = .default, @@ -248,6 +294,16 @@ public struct DirectUploadOptions { // MARK: - Extensions +extension Measurement where UnitType == UnitInformationStorage { + /// Default direct upload chunk size + public static var defaultDirectUploadChunkSize: Self { + Measurement( + value: 8, + unit: .megabytes + ) + } +} + extension DirectUploadOptions.InputStandardization.MaximumResolution: CustomStringConvertible { public var description: String { switch self { From 342ce24aafd469c8dfe7116affbfa7ee069595fb Mon Sep 17 00:00:00 2001 From: AJ Lauer Barinov Date: Wed, 23 Aug 2023 15:09:06 -0700 Subject: [PATCH 6/7] refactor: Respell Version to SemanticVersion for explicitness in API (#95) * Rename revision to patch as in SemVer 2.0.0 * Rename Version to SemanticVersion for explicitness * Inline API docs and adjust indentation to match rest of the package --- .../Reporting/Reporter.swift | 8 +++---- .../PublicAPI/SemanticVersion.swift | 23 +++++++++++++++++++ Sources/MuxUploadSDK/PublicAPI/Version.swift | 21 ----------------- 3 files changed, 27 insertions(+), 25 deletions(-) create mode 100644 Sources/MuxUploadSDK/PublicAPI/SemanticVersion.swift delete mode 100644 Sources/MuxUploadSDK/PublicAPI/Version.swift diff --git a/Sources/MuxUploadSDK/InternalUtilities/Reporting/Reporter.swift b/Sources/MuxUploadSDK/InternalUtilities/Reporting/Reporter.swift index 1d48317d..8a3a0684 100644 --- a/Sources/MuxUploadSDK/InternalUtilities/Reporting/Reporter.swift +++ b/Sources/MuxUploadSDK/InternalUtilities/Reporting/Reporter.swift @@ -147,7 +147,7 @@ extension Reporter { platformName: platformName, platformVersion: platformVersion, regionCode: regionCode, - sdkVersion: Version.versionString, + sdkVersion: SemanticVersion.versionString, uploadStartTime: uploadStartTime, uploadEndTime: uploadEndTime, uploadURL: uploadURL @@ -188,7 +188,7 @@ extension Reporter { platformName: platformName, platformVersion: platformVersion, regionCode: regionCode, - sdkVersion: Version.versionString, + sdkVersion: SemanticVersion.versionString, uploadStartTime: uploadStartTime, uploadEndTime: uploadEndTime, uploadURL: url @@ -229,7 +229,7 @@ extension Reporter { platformName: platformName, platformVersion: platformVersion, regionCode: regionCode, - sdkVersion: Version.versionString, + sdkVersion: SemanticVersion.versionString, standardizationStartTime: standardizationStartTime, standardizationEndTime: standardizationEndTime, uploadURL: uploadURL @@ -273,7 +273,7 @@ extension Reporter { platformName: platformName, platformVersion: platformVersion, regionCode: regionCode, - sdkVersion: Version.versionString, + sdkVersion: SemanticVersion.versionString, standardizationStartTime: standardizationStartTime, standardizationEndTime: standardizationEndTime, uploadCanceled: uploadCanceled, diff --git a/Sources/MuxUploadSDK/PublicAPI/SemanticVersion.swift b/Sources/MuxUploadSDK/PublicAPI/SemanticVersion.swift new file mode 100644 index 00000000..9bff844f --- /dev/null +++ b/Sources/MuxUploadSDK/PublicAPI/SemanticVersion.swift @@ -0,0 +1,23 @@ +// +// SemanticVersion.swift +// +// +// Created by Emily Dixon on 2/21/23. +// + +import Foundation + +/// Version information about the SDK +public struct SemanticVersion { + /// Major version component. + public static let major = 0 + /// Minor version component. + public static let minor = 6 + /// Patch version component. + public static let patch = 0 + + /// String form of the version number in the format X.Y.Z + /// where X, Y, and Z are the major, minor, and patch + /// version components + public static let versionString = "\(major).\(minor).\(patch)" +} diff --git a/Sources/MuxUploadSDK/PublicAPI/Version.swift b/Sources/MuxUploadSDK/PublicAPI/Version.swift deleted file mode 100644 index ca674b71..00000000 --- a/Sources/MuxUploadSDK/PublicAPI/Version.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// Version.swift -// -// -// Created by Emily Dixon on 2/21/23. -// - -import Foundation - -/// Version information about the SDK -public struct Version { - /// Major version. - public static let major = 0 - /// Minor version. - public static let minor = 6 - /// Revision number. - public static let revision = 0 - - /// String form of the version number. - public static let versionString = "\(major).\(minor).\(revision)" -} From f72b5331ec06dcf4327578bf706e334ecb2f8e39 Mon Sep 17 00:00:00 2001 From: AJ Lauer Barinov Date: Thu, 24 Aug 2023 10:21:13 -0700 Subject: [PATCH 7/7] Lowercase to avoid casing issues (#98) --- Sources/MuxUploadSDK/InternalUtilities/Reporting/Reporter.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/MuxUploadSDK/InternalUtilities/Reporting/Reporter.swift b/Sources/MuxUploadSDK/InternalUtilities/Reporting/Reporter.swift index 8a3a0684..d851b1f5 100644 --- a/Sources/MuxUploadSDK/InternalUtilities/Reporting/Reporter.swift +++ b/Sources/MuxUploadSDK/InternalUtilities/Reporting/Reporter.swift @@ -23,7 +23,7 @@ fileprivate func posixModelName() -> String { } fileprivate func inferredPlatformName() -> String { - let modelName = posixModelName() + let modelName = posixModelName().lowercased() if modelName.contains("ipad") { return "iPadOS" } else if modelName.contains("iphone") {