From f7ce5a8ed9a1cffa25d4284c6f90be6c769a6ae9 Mon Sep 17 00:00:00 2001 From: Ivan Murashov Date: Sun, 4 Mar 2018 22:26:06 +0300 Subject: [PATCH] Fix ios Dinect (INT) config. --- android/app/build.gradle | 2 +- ios/Runner/AppDelegate.m | 31 ++++++++++--------------------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 80c2b69..c6d02fc 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -56,7 +56,7 @@ android { } - dinect_INT { + dinect_INT { applicationId 'com.dinect.checker.int' buildConfigField "String", "locale", "\"ru\"" buildConfigField "String", "flavor", "\"dinect\"" diff --git a/ios/Runner/AppDelegate.m b/ios/Runner/AppDelegate.m index 09ccd13..3b3928f 100644 --- a/ios/Runner/AppDelegate.m +++ b/ios/Runner/AppDelegate.m @@ -15,9 +15,9 @@ binaryMessenger:controller]; __weak FlutterMethodChannel* weekPlatformChannel = platformChannel; - + NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier]; - + NSDictionary *settings = @{ @"com.dinect.checker.dinect" : @{ @"locale" : @"ru", @@ -30,26 +30,15 @@ @"appTitle" : @"Dinect", @"showBonus" : @YES, }, - @"com.dinect.checker.int" = @{ - @"locale" : @"ru", - @"flavor" : @"dinect", - @"currency" : @643, - @"supportPhone" : @"8-800-77-55-032", - @"supportUrl" : @"http://www.dinect.com", - @"endPoint" : @"https://pos-api-int.dinect.com/20130701/", - @"appToken" : @"9fec83cdca38c357e6b65dbb17514cdd36bf2a08", - @"appTitle" : @"Dinect (INT)", - @"showBonus" : @YES - }, @"com.dinect.develop-iOS" : @{ @"locale" : @"ru", - @"flavor" : @"autobonus", + @"flavor" : @"dinect", @"currency" : @643, @"supportPhone" : @"8 800 555 35 35", @"supportUrl" : @"http://yandex.ru", @"endPoint" : @"https://pos-api-int.dinect.com/20130701/", @"appToken" : @"9fec83cdca38c357e6b65dbb17514cdd36bf2a08", - @"appTitle" : @"Autobonus (develop)", + @"appTitle" : @"Dinect (INT)", @"showBonus" : @YES, }, @"com.dinect.checker.autoclub.app" : @{ @@ -73,22 +62,22 @@ @"appToken" : @"bdea0f3ba9034b688019a7cac753d1209e2b227f", @"appTitle" : @"PIP", @"showBonus" : @YES, - }, + }, }; - + NSDictionary *buildSettings = settings[bundleIdentifier]; - + NSLog(@"%@", bundleIdentifier); - + if (!buildSettings) { NSLog(@"Settings for this bunndle id not defined (%@)", bundleIdentifier); abort(); } - + [platformChannel setMethodCallHandler:^(FlutterMethodCall* call, FlutterResult result) { NSLog(@"%@", call.method); - + NSLog(@"%@", buildSettings[@"supportPhone"]); if ([@"getLocale" isEqualToString:call.method]) {