iOS Integration check🔗
We recommend you to check the MRGS integration during the initial setup and the subsequent updates. It can be done by calling just one method.
Step 1. Enable debug mode🔗
During the integration check, you will need to view the logs from the device. To enable logging, enable debug mode during the MRGS initialization.
@import MRGService;
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// MRGService settings
MRGServiceParams *mrgsParams = [[MRGServiceParams alloc] initWithAppId: <MRGS_APP_ID> secret: <CLIENT_SECRET>];
mrgsParams.debug = YES; //Enabling debug mode
// ... MRGS setup ...
//Start MRGS
[MRGService startWithServiceParams:mrgsParams externalSDKParams:@[myTrackerParams] delegate:nil];
}
Step 2. Call the integration check method🔗
For a correct integration check, it is necessary to perform a set of actions, which are described in the Installation section:
- Call library initialization,
- Call the game launch tracking method,
- Set user id (if any),
- Make a test payment.
Therefore, we recommend calling the integration check method when minimizing the application. Thus, you can complete all of the above actions, then minimize the application and see the check result.
@import MRGService;
@implementation AppDelegate
- (void)applicationDidEnterBackground:(UIApplication *)application {
[[MRGService sharedInstance] checkIntegration];
}
Getting check results as object
If the output to the log is inconvenient for you, then you can get integration check results as a object, for this, use the method:
Important
Make sure that this code does not get into the release of your application, e.g. you can call this method only in the test environment.
Step 3. Start application🔗
Launch the application, wait for the MRGS to initialize, initialize MRGS, make a test payment, and then minimize the application (call the checkIntegration method).
Step 4. View the result of the integration check🔗
The result of the check will be displayed in the log. To view the log, you can use the Xcode console, the Console application on Mac, or the idevicesyslog utility.
Information about the current operational MRGS settings, information about whether the required methods were called or not, and, if necessary, recommendations for fixing integration errors, will appear in the log.
A string "All checks has passed correctly" in log output - means integration was done right. Here is an example of the integration status display:
---------------------------------------------------------------------------
---------------------- [MRGS INTEGRATION CHECK] ---------------------------
---------------------------------------------------------------------------
MRGS integration check results:
{
Advertising = {
loadAdvertisingWasCalled = 1;
loadAdvertisingWasCalledWithLoadedAdvertising = 0;
showAdvertisingWasCalled = 1;
};
Bank = {
AllBankMethodsWasCalled = 1;
PaymentsAreHeldByMRGS = 1;
};
BaseSettings = {
appID = 31;
appSecret = "ZEYbgOoYDJuxtzrGJSnORW_T!D8";
isTestDevice = 0;
};
InitialisationProcess = {
appDidBecomeActiveCalled = 1;
appDidFinishLaunchingCalled = 1;
initializationMethodCalledOnlyOnce = 1;
mrgsInitialized = 1;
mrgsStartedInitialization = 1;
pushTokenSendedToServer = 1;
};
MRGSFrameworkVersion = {
MRGSBuild = 11327;
MRGSVersion = "4.0.3";
};
MyTrackerSettings = {
MyTrackerEnabled = 1;
MyTrackerMetricsForwardingEnabled = 1;
trackLoginEventMethodCalled = 1;
trackRegistrationEventMethodCalled = 1;
};
Network = {
atLeastOneNetworkRequestCompleted = 1;
networkRequestCompletedSuccessfully = 1;
};
userAuthorizationSuccessful = 1;
}
MRGService: MRGS integration recommendations:
Recommendations:
---------------------------------------------------------------------------
All checks has passed correctly
---------------------------------------------------------------------------
MRGService: MRGS settings:
{
MRGServiceParams = {
allowPushNotificationHooks = 1;
appId = 31;
appSecret = "ZEYbgOoYzrGJSnORW_T!D8";
automaticPaymentTracking = 0;
crashReportEnabled = 1;
debug = 1;
disablePaymentsCheck = 0;
locationTrackingEnabled = 0;
shouldResetBadge = 1;
startOnTestDevice = 0;
storePath = ".../60F68469-797B-4F12-B237-FE200D96F0DE/Documents/testStore";
};
externalSDKs = {
appsFlyerParams = {
Debug = 0;
appleAppId = 700186027;
appsFlyerDevKey = 3XsrUaWeihepYiqK;
};
myComSupportParams = {
projectId = 31;
secret = sgttfd2t3f;
};
myTrackerParams = {
appId = 8637194325790456610;
enableLogging = 1;
forwardMetrics = 1;
};
};
}
---------------------------------------------------------------------------
---------------------- [MRGS INTEGRATION CHECK] ---------------------------
---------------------------------------------------------------------------
Created: 2020-01-16