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
MimiPersonalizationControllerhas been removed.MimiCore.personalizationhas been removed.MimiUserControllerhas been removed.MimiCore.userhas been removed.MimiConfigurationhas been removed.Mimi.configurationhas been removed.configurationparameter has been removed fromMimi.start().MimiProfileContexthas been removed.Mimi.profileContexthas been removed.MimiAuthFlow.Route.anonymouslyhas been removed.hasConstructedfromMimiComponentand conforming types.MimiTabBarhas been removed.MimiTransparentNavigationBarhas been removed.MimiResultDetailsViewControllerhas been removed.MimiMTResultDetailsViewControllerhas been removed.MimiPTTResultDetailsViewControllerhas been removed.MimiTestController.testshas been removed.MimiTest.LegacyInsightshas been removed.MimiTestRunResultData.signaturehas been removed.MimiMTTestRunResultData.signaturehas been removed.MimiPTTTestRunResultData.signaturehas been removed.MimiHearingGrade.average(from:)has been removed.MimiTestRun.LegacyInsightshas been removed.MimiTestRun.resultshas been removed.MimiTestLegacyInsightsand conforming typeMimiMTTestLegacyInsightshave been removed.MimiTestLegacyInsightsCategoryhas been removed.- Removed
loadAll(result:),load(with:result:),submit(test:result:)&delete(test:result:)fromMimiTestController. - Removed
loadLegacyInsights(type:test:result:)fromMimiTestController. - Removed
provideResultsparameter inMimiTestController.submit(test:provideResults:result:). resulthandler now provides anMimiTestResultsinstance 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&testTypeproperties fromMimiTest. - Removed
id,metadata,testType,ear,timestamp,data&noiseDataproperties fromMimiTestRun. MimiTestRun.Metadatahas been removed.- Removed
latestResultproperty fromMimiResultsViewController. MimiHearingGrade.tintColorhas been removed.- Removed
environmentparameter support fromstart(environment:credentials:delegate:)inMimiCore. - Removed
environmentparameter support fromupdate(environment:credentials:)inMimiCore. MimiEllipsisIndicatorhas been removed.MimiAuthFlow.for(route:)has been removed.MimiHearingGradeBorderedAvatarView.contentInsethas been removed.UITraitCollection.mimiHorizontalLayoutClasshas been removed.UITraitCollection.mimiVerticalLayoutClasshas 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.invalidCurrentIndehas been removed.MimiTestFlow.TestTypehas been removed.MimiTestFlow.for(test:)has been removed.
API Renaming
MimiPersonalization.FittingInfohas been renamed toMimiPersonalization.Fitting.MimiPersonalization.FittingInfo.for()has been renamed toMimiPersonalization.Fitting.techLevel().MimiTestResultError.PTT.visualizationMissingFrequencyhas been renamed toMimiTestResultError.PTT.visualizationMissingFrequencies.MimiTestConditionsBulletinDelegatehas been renamed toMimiResultConditionsBulletinDelegate.MimiTestConditionsBulletinhas been renamed toMimiResultConditionsBulletin.MimiTestConditionsDatahas been renamed toMimiResultConditionsData.MimiTestConditionhas been renamed toMimiResultCondition.becomeThemingResponder(:)&resignThemingResponder(:)have been replaced with theignoresThemeUpdatesproperty inMimiThemable.- Replaced
MimiFont(named:size:lineSpacing:kern:)withMimiFont(name:size:lineSpacing:kern:).
MimiSDK 5 Migration Guide Reference