From b5096f4127c481c54e1dda5888fc2ea342d142e7 Mon Sep 17 00:00:00 2001 From: Jaspreet Kaur Saini Date: Fri, 25 Sep 2020 14:01:34 -0700 Subject: [PATCH] Bugfix/hw 67819 insights cocoapod integration issue (#244) * made UINavigationBar theme customization optional * 1.0.0-beta08 release * reverted version due to failing uI tests for iOS 13.7 * reverted changes in travis.yaml --- CHANGELOG.md | 5 +++ Cartfile | 2 +- Cartfile.private | 2 +- Cartfile.resolved | 4 +-- Common/Sources/Helper/ThemeManager.swift | 10 ++---- Common/Sources/HyperwalletUI.swift | 2 ++ Demo/AppDelegate.swift | 6 ++-- Demo/Base.lproj/Main.storyboard | 44 +++++++++++------------ HyperwalletUISDK.podspec | 4 +-- README.md | 27 +++++++------- Transfer/Sources/TransferButtonCell.swift | 2 +- 11 files changed, 53 insertions(+), 55 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca548c8ef..4e67502d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changelog ========= +[1.0.0-beta08](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta08) +------------------- +- Fixed Cocoapod Insights Integration issue +- Made UINavigationBar Theme customization optional + [1.0.0-beta07](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta07) ------------------- - Fixed Cocoapod issue diff --git a/Cartfile b/Cartfile index 467880edd..8f692d30c 100644 --- a/Cartfile +++ b/Cartfile @@ -1,2 +1,2 @@ github "hyperwallet/hyperwallet-ios-sdk" "1.0.0-beta08" -github "hyperwallet/hyperwallet-ios-insight" "1.0.0-beta03" +github "hyperwallet/hyperwallet-ios-insight" "1.0.0-beta04" diff --git a/Cartfile.private b/Cartfile.private index 54d13c456..c35c4ce38 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1,2 +1,2 @@ -github "JanGorman/Hippolyte" "0.8.0" +github "JanGorman/Hippolyte" "1.2.2" github "httpswift/swifter" "1.4.7" diff --git a/Cartfile.resolved b/Cartfile.resolved index 098d1971f..6231e08c2 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,4 +1,4 @@ -github "JanGorman/Hippolyte" "0.8.0" +github "JanGorman/Hippolyte" "1.2.2" github "httpswift/swifter" "1.4.7" -github "hyperwallet/hyperwallet-ios-insight" "1.0.0-beta03" +github "hyperwallet/hyperwallet-ios-insight" "1.0.0-beta04" github "hyperwallet/hyperwallet-ios-sdk" "1.0.0-beta08" diff --git a/Common/Sources/Helper/ThemeManager.swift b/Common/Sources/Helper/ThemeManager.swift index 51d32b251..d6619e522 100644 --- a/Common/Sources/Helper/ThemeManager.swift +++ b/Common/Sources/Helper/ThemeManager.swift @@ -23,10 +23,8 @@ import UIKit public class ThemeManager: NSObject { /// Applies default visual styles to the Hyperwallet user interface components. public static func applyTheme() { - applyToUINavigationBar() applyToProcessingView() applyToSpinnerView() - registerFonts } /// Applies White Theme visual styles to the Hyperwallet user interface components. @@ -34,13 +32,15 @@ public class ThemeManager: NSObject { Theme.themeColor = .white Theme.tintColor = UIColor(red: 0, green: 0.48, blue: 1, alpha: 1) Theme.Button.color = Theme.tintColor + Theme.Button.linkColor = Theme.tintColor Theme.Icon.primaryColor = Theme.tintColor Theme.SpinnerView.activityIndicatorViewColor = Theme.tintColor Theme.NavigationBar.shadowColor = UIColor(rgb: 0xe3e3e5) ThemeManager.applyTheme() } - private static func applyToUINavigationBar() { + /// Applies Custom Theme visual styles to the `UINavigationBar` interface component. + public static func applyToUINavigationBar() { let proxy = UINavigationBar.appearance() if #available(iOS 11.0, *) { proxy.largeTitleTextAttributes = @@ -89,8 +89,4 @@ public class ThemeManager: NSObject { proxy.activityIndicatorBackgroundColor = Theme.SpinnerView.backgroundColor proxy.viewBackgroundColor = Theme.SpinnerView.backgroundColor } - - private static let registerFonts: Void = { - UIFont.register("hw_mobile_ui_sdk_icons", type: "ttf") - }() } diff --git a/Common/Sources/HyperwalletUI.swift b/Common/Sources/HyperwalletUI.swift index 9e0ad1500..d841a831b 100644 --- a/Common/Sources/HyperwalletUI.swift +++ b/Common/Sources/HyperwalletUI.swift @@ -50,6 +50,8 @@ public final class HyperwalletUI: NSObject { } private init(_ provider: HyperwalletAuthenticationTokenProvider) { + //Register custom fonts + UIFont.register("hw_mobile_ui_sdk_icons", type: "ttf") Hyperwallet.setup(provider) HyperwalletInsights.setup() } diff --git a/Demo/AppDelegate.swift b/Demo/AppDelegate.swift index 8151ec596..71db04e67 100644 --- a/Demo/AppDelegate.swift +++ b/Demo/AppDelegate.swift @@ -29,10 +29,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate { didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. - // ThemeManager.applyWhiteTheme() + window?.tintColor = .systemBlue + window?.backgroundColor = Theme.UITableViewController.backgroundColor +// ThemeManager.applyWhiteTheme() ThemeManager.applyTheme() + ThemeManager.applyToUINavigationBar() // Set the default tint color - window?.tintColor = .systemBlue return true } diff --git a/Demo/Base.lproj/Main.storyboard b/Demo/Base.lproj/Main.storyboard index 8d73a5650..d7b819d99 100644 --- a/Demo/Base.lproj/Main.storyboard +++ b/Demo/Base.lproj/Main.storyboard @@ -1,33 +1,30 @@ - + + - + + - - - hw_mobile_ui_sdk_icons - - - - - + + + - - + + - + - - + + - +