MimiSDK 5 Migration Guide
This document outlines the various changes required to migrate to MimiSDK 5 from a previous version of MimiSDK.
MimiSDK 5 introduces several API-breaking changes that should be made aware of.
Requirements
- iOS 13 or above.
- Xcode 12.
- Swift 5.
Changes
The following section describes all changes that are considered breaking API or significant behavioral changes.
- Project Integration
- Processing API Refactoring
- Configuring the Profile
- Removed Personalization Controller
- Removed User Controller
- Replacing tests with test results
- Removed Result Details View Controller
- API Removals
Project Integration
In order to work around a Swift compiler bug (SR-14195), we have renamed the MimiHTE.xcframework
to MimiHTEKit.xcframework
, which will require that framework to be re-integrated into your project.
See Integrating MimiSDK Manually for more info.
Processing API Refactoring
The Processing APIs have been completely redesigned and we strongly recommend you read the Processing section of the documentation to gain an overview of the new architecture.
Configuring the Profile
In previous versions, it was possible to configure various features and behaviors of the SDK when starting Mimi
:
let configuration = MimiConfiguration(showHearingHealthTips: true, allowRemoteDeviceAuthorization: true)
Mimi.start(credentials: credentials, configuration: configuration, delegate: delegate)
In v5.0.0, this parameter has been moved to the profile components and can be used as follows:
let configuration = MimiProfileConfiguration(showsHearingHealthTips: true, allowsRemoteDeviceAuthorization: true)
let profile = MimiProfileViewController(configuration: configuration)
let profileNavigation = MimiProfileNavigationController(configuration: configuration)
let profileLauncher = MimiProfileLauncherView(configuration: configuration)
This parameter has a default value of MimiProfileConfiguration.default
.
Removed Personalization Controller
MimiPersonalizationController
(and therefore MimiCore.personalization
) has been removed.
All processing related behavior is now required to use the new Processing APIs.
Removed User Controller
MimiUserController
(and therefore MimiCore.user
) has been removed. This type was deprecated in v4.4.0.
All functionality from MimiUserController
can be found in MimiAuthController
.
Replacing tests with test results
The scope of MimiTest
in MimiTestController
has been reduced to just test submission. The test data such as id
, timestamp
& metadata
remains accessible in the corresponding MimiTestResult
.
Removed Result Details View Controller
MimiResultDetailsViewController
(and associated MimiMTResultDetailsViewController
and MimiPTTResultDetailsViewController
) has been removed.
To display the test results for a Mimi test paradigm, refer to MimiResultsViewController
instead.
Theming
The theme
property has been made non-optional on MimiThemeable
and following that, apply(theme:)
now has a non-optional MimiThemeDefinition
on MimiThemeable
.
API Removals
MimiPersonalizationController
has been removed.MimiCore.personalization
has been removed.MimiUserController
has been removed.MimiCore.user
has been removed.MimiConfiguration
has been removed.Mimi.configuration
has been removed.configuration
parameter has been removed fromMimi.start()
.MimiProfileContext
has been removed.Mimi.profileContext
has been removed.MimiAuthFlow.Route.anonymously
has been removed.hasConstructed
fromMimiComponent
and conforming types.MimiTabBar
has been removed.MimiTransparentNavigationBar
has been removed.MimiResultDetailsViewController
has been removed.MimiMTResultDetailsViewController
has been removed.MimiPTTResultDetailsViewController
has been removed.MimiTestController.tests
has been removed.MimiTest.LegacyInsights
has been removed.MimiTestRunResultData.signature
has been removed.MimiMTTestRunResultData.signature
has been removed.MimiPTTTestRunResultData.signature
has been removed.MimiHearingGrade.average(from:)
has been removed.MimiTestRun.LegacyInsights
has been removed.MimiTestRun.results
has been removed.MimiTestLegacyInsights
and conforming typeMimiMTTestLegacyInsights
have been removed.MimiTestLegacyInsightsCategory
has been removed.- Removed
loadAll(result:)
,load(with:result:)
,submit(test:result:)
&delete(test:result:)
fromMimiTestController
. - Removed
loadLegacyInsights(type:test:result:)
fromMimiTestController
. - Removed
provideResults
parameter inMimiTestController.submit(test:provideResults:result:)
. result
handler now provides anMimiTestResults
instance inMimiTestController.submit(test:provideResults:result:)
.- Removed
testController(controller: didSubmit test:)
fromMimiTestControllerObservable
. - Removed
testController(controller: didLoad tests:)
fromMimiTestControllerObservable
. - Removed
testController(controller: didDelete test:)
fromMimiTestControllerObservable
. - Removed
init(results:noiseData:metadata:)
fromMimiTestRun
. - Removed
id
,signature
,runs
,metadata
,results
&testType
properties fromMimiTest
. - Removed
id
,metadata
,testType
,ear
,timestamp
,data
&noiseData
properties fromMimiTestRun
. MimiTestRun.Metadata
has been removed.- Removed
latestResult
property fromMimiResultsViewController
. MimiHearingGrade.tintColor
has been removed.- Removed
environment
parameter support fromstart(environment:credentials:delegate:)
inMimiCore
. - Removed
environment
parameter support fromupdate(environment:credentials:)
inMimiCore
. MimiEllipsisIndicator
has been removed.MimiAuthFlow.for(route:)
has been removed.MimiHearingGradeBorderedAvatarView.contentInset
has been removed.UITraitCollection.mimiHorizontalLayoutClass
has been removed.UITraitCollection.mimiVerticalLayoutClass
has been removed.MimiUserFlow.start(at:)
has been removed.MimiUserFlow.then(step:)
has been removed.MimiUserFlow.then(step:if:)
has been removed.MimiUserFlow.then(step:or:decision)
has been removed.MimiUserFlowCoordinatorError.invalidCurrentInde
has been removed.MimiTestFlow.TestType
has been removed.MimiTestFlow.for(test:)
has been removed.
API Renaming
MimiPersonalization.FittingInfo
has been renamed toMimiPersonalization.Fitting
.MimiPersonalization.FittingInfo.for()
has been renamed toMimiPersonalization.Fitting.techLevel()
.MimiTestResultError.PTT.visualizationMissingFrequency
has been renamed toMimiTestResultError.PTT.visualizationMissingFrequencies
.MimiTestConditionsBulletinDelegate
has been renamed toMimiResultConditionsBulletinDelegate
.MimiTestConditionsBulletin
has been renamed toMimiResultConditionsBulletin
.MimiTestConditionsData
has been renamed toMimiResultConditionsData
.MimiTestCondition
has been renamed toMimiResultCondition
.becomeThemingResponder(:)
&resignThemingResponder(:)
have been replaced with theignoresThemeUpdates
property inMimiThemable
.- Replaced
MimiFont(named:size:lineSpacing:kern:)
withMimiFont(name:size:lineSpacing:kern:)
.