If your apps are instrumented with a version of the iOS
libraries that are earlier than version 2.2.2, then you must migrate
to the latest version.
Before you begin
Download the latest SDK for iOS and extract the contents.
Restriction: If you are
migrating to MobileFirst Quality Assurance SDK version 3.2.0, or later, you
must build your project using Xcode version 7.0, or later.
Procedure
- Remove the previous version of the SDK.
- Start Xcode.
- In the Xcode Project Navigator, click the Frameworks group.
- Locate the Q4M-Pre-Production.framework or Q4M-Production.framework file.
- Clean and rebuild the build folder of the project in
Xcode. (Click , and then click Build.)
- Select the file and delete it by pressing the backspace
key or by using the menu. When prompted with the message Do
you want to move the file filename to the Trash,
or only remove the reference to it?, click Move
to Trash.
Xcode removes all references to the SDK from the project
settings.
- Add the new SDK to the project. Add the Q4M.framework folder
to your project by dragging the folder to the Frameworks group
in the Xcode Project Navigator.
- Ensure that all required libraries are included in your
Xcode project.
- In the Xcode Project Navigator, click your project and
then click Build Phases.
- Click Link Binary With Libraries.
- Under Link Binary With Libraries,
ensure that you have the following frameworks:
- AssetsLibrary.framework
- AudioToolbox.framework
- AVFoundation.framework
- CoreData.framework
- CoreLocation.framework
- CoreMedia.framework
- CoreMotion.framework
- CoreTelephony.framework
- CoreText.framework
- CoreVideo.framework
- MediaPlayer.framework
- QuartzCore.framework
- Security.framework
- SystemConfiguration.framework
To add a framework, click +.
- Update the header import statement. Replace
any of the following import statements with #import <Q4M/MQALogger.h>:
- #import <Q4M-Pre-Production/MQALogger.h>
- #import <Q4M-Pre-Production/APHLogger.h>
- #import <Q4M-Production/MQALogger.h>
- #import <Q4M-Production/APHLogger.h>
Tip: To search in Xcode, press Cmd+Shift+F.
- Set either production or preproduction mode. As
of the version 2.2.2 SDK, there are no longer separate iOS SDK files
for preproduction and production. Instead, you must set either the
preproduction or production mode in your code that starts the MobileFirst Quality Assurance session. For
information about the differences between preproduction and production
mode, see Differences between preproduction and production modes.
- To set the mode in Objective-C:
- Locate the didFinishLaunchingWithOptions method.
- Depending on your test phase, add one these lines of code inside
the didFinishLaunchingWithOptions method:
- To use preproduction mode, add the following line of code: [[MQALogger
settings] setMode:MQAModeMarket];
- To use production mode, add the following line of code: [[MQALogger
settings] setMode:MQAModeQA];
- To set the mode in Swift:
- In the AppDelegate.swift file, search for the
didFinishLaunchingWithOptions method.
- Depending on your test phase, add one of these lines of code inside the
didFinishLaunchingWithOptions method:
- To use preproduction mode, add the following line of code: MQALogger.settings().mode =
MQAMode.QA
- To use production mode, add the following line of code: MQALogger.settings().mode =
MQAMode.Market
What to do next
Optionally, upgrade any deprecated
MobileFirst Quality Assurance APIs. For information
on deprecated API, see
API changes between releases.