-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MSDK-6470 - Update MSDK to 8.0.0. Implement connected headphone ident…
…ification. (#6) * Bump SDK to 8.0.0 * Add documentation and example code for connected headphone identification * Fix MSDK version in README
- Loading branch information
Showing
9 changed files
with
61 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
IntegrationExample/Core/PartnerHeadphoneConnectivityController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// PartnerHeadphoneConnectivityController.swift | ||
// IntegrationExample | ||
// | ||
// Created by Hozefa Indorewala on 18.07.23. | ||
// | ||
|
||
import Foundation | ||
import MimiCoreKit | ||
|
||
/// A mock headphone connectivity controller which provides information on the currently connected headphone to the MSDK. | ||
/// Documentation: https://mimihearingtechnologies.github.io/SDKDocs-iOS/master/connected-headphone-identification.html | ||
final class PartnerHeadphoneConnectivityController: MimiConnectedHeadphoneProvider { | ||
|
||
enum ConnectivityState { | ||
case disconnected | ||
case connected(model: String) | ||
} | ||
|
||
var state: ConnectivityState = .connected(model: "mimi-partner-headphone-model") // Mock headphone model value. | ||
|
||
func getMimiHeadphoneIdentifier() -> MimiHeadphoneIdentifier? { | ||
|
||
switch state { | ||
case .disconnected: | ||
// Return nil if no headphone is currently connected. | ||
return nil | ||
case .connected(let model): | ||
// If headphone connected, return the headphone identifier based on the headphone model value. | ||
return MimiHeadphoneIdentifier(model: model) | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters