Skip to content

Commit

Permalink
Merge branch 'dm-partner-branding-ios' of https://github.com/smallcas…
Browse files Browse the repository at this point in the history
…e/gw-mob-sdk-flutter into dm-partner-branding-ios
  • Loading branch information
indrajit-roy committed Jun 20, 2022
2 parents 00e0f22 + 1651093 commit 35a390b
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 39 deletions.
25 changes: 1 addition & 24 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ PODS:
- Mixpanel-swift (3.2.6):
- Mixpanel-swift/Complete (= 3.2.6)
- Mixpanel-swift/Complete (3.2.6)
- SCGateway (3.4.1):
- SCGateway (3.4.3):
- Mixpanel-swift
- scgateway_flutter_plugin (0.0.1):
- Flutter
- SCGateway (= 3.4.1)
- SCGateway (= 3.4.3)

DEPENDENCIES:
- Flutter (from `Flutter`)
Expand All @@ -28,8 +28,8 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
Mixpanel-swift: ce120e0d51dcb0d0bf5a25e1ee232fe89ad1136b
SCGateway: a5626f51d9af10effa424507101f26c49ed8915c
scgateway_flutter_plugin: 9b3fa926507bb2f28735cc5844c12b4975f3a804
SCGateway: 19a144be4a895040c2393de3870846d514c37b23
scgateway_flutter_plugin: 1b329a99f747c57d76b04d043909e31d7691509e

PODFILE CHECKSUM: 149ecff69199ac385f452fe049db751eae1736cf

Expand Down
12 changes: 6 additions & 6 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 35;
CURRENT_PROJECT_VERSION = 37;
DEVELOPMENT_TEAM = BFHF2F2UCF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -361,7 +361,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.3.5;
MARKETING_VERSION = 1.3.7;
PRODUCT_BUNDLE_IDENTIFIER = com.example.scgatewayFlutterPluginExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand Down Expand Up @@ -488,7 +488,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 35;
CURRENT_PROJECT_VERSION = 37;
DEVELOPMENT_TEAM = BFHF2F2UCF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -505,7 +505,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.3.5;
MARKETING_VERSION = 1.3.7;
PRODUCT_BUNDLE_IDENTIFIER = com.example.scgatewayFlutterPluginExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand All @@ -523,7 +523,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 35;
CURRENT_PROJECT_VERSION = 37;
DEVELOPMENT_TEAM = BFHF2F2UCF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -540,7 +540,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.3.5;
MARKETING_VERSION = 1.3.7;
PRODUCT_BUNDLE_IDENTIFIER = com.example.scgatewayFlutterPluginExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand Down
30 changes: 26 additions & 4 deletions ios/Classes/SwiftScgatewayFlutterPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -593,10 +593,26 @@ public class SwiftScgatewayFlutterPlugin: NSObject, FlutterPlugin {
if let args = call.arguments as? Dictionary<String, Any> {
let target = args["targetEndpoint"] as? String
let params = args["params"] as? String
let headerColor = args["headerColor"] as? String
let headerColorOpacity = args["headerOpacity"] as? NSNumber
let backIconColor = args["backIconColor"] as? String
let backIconOpacity = args["backIconOpacity"] as? NSNumber

var headerColor = "2F363F"
if let headerClr = args["headerColor"] as? String {
headerColor = headerClr.deletingPrefix("#")
}

var headerColorOpacity = 1 as NSNumber
if let headerClrAlpha = args["headerOpacity"] as? NSNumber {
headerColorOpacity = headerClrAlpha
}

var backIconColor = "FFFFFF"
if let bckIconClr = args["backIconColor"] as? String {
backIconColor = bckIconClr.deletingPrefix("#")
}

var backIconOpacity = 1 as NSNumber
if let bckIconAlpha = args["backIconOpacity"] as? NSNumber {
backIconOpacity = bckIconAlpha
}

SCGateway.shared.launchSmallPlug(
presentingController: currentViewController,
Expand Down Expand Up @@ -694,3 +710,9 @@ public class SwiftScgatewayFlutterPlugin: NSObject, FlutterPlugin {

}

extension String {
func deletingPrefix(_ prefix: String) -> String {
guard self.hasPrefix(prefix) else { return self }
return String(self.dropFirst(prefix.count))
}
}
2 changes: 1 addition & 1 deletion ios/scgateway_flutter_plugin.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Scgateway Flutter plugin.
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.dependency 'SCGateway', '3.4.1'
s.dependency 'SCGateway', '3.4.3'
s.xcconfig = {'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES'}
s.vendored_frameworks = 'SCGateway.framework'
s.platform = :ios, '11.0'
Expand Down

0 comments on commit 35a390b

Please sign in to comment.