Skip to content

Commit

Permalink
Merge pull request #382 from Kommunicate-io/release/7.0.9
Browse files Browse the repository at this point in the history
Release/7.0.9
  • Loading branch information
AbhijeetRanjan308 authored Dec 11, 2023
2 parents 248bf41 + d67fbec commit 3d87ee1
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

The changelog for [Kommunicate-iOS-SDK](https://github.com/Kommunicate-io/Kommunicate-iOS-SDK). Also see the [releases](https://github.com/Kommunicate-io/Kommunicate-iOS-SDK/releases) on Github.

## [7.0.9] 2023-12-12
- Fixed hidePostCTA message delete issue.

## [7.0.8] 2023-12-06
- Added Support of Video Rich Message.
- Fixed the attachment upload issue.
Expand Down
16 changes: 8 additions & 8 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ PODS:
- iOSSnapshotTestCase/SwiftSupport (8.0.0):
- iOSSnapshotTestCase/Core
- Kingfisher (7.6.2)
- Kommunicate (7.0.8):
- KommunicateChatUI-iOS-SDK (~> 1.2.3)
- KommunicateChatUI-iOS-SDK (1.2.3):
- KommunicateChatUI-iOS-SDK/Complete (= 1.2.3)
- KommunicateChatUI-iOS-SDK/Complete (1.2.3):
- Kommunicate (7.0.9):
- KommunicateChatUI-iOS-SDK (~> 1.2.4)
- KommunicateChatUI-iOS-SDK (1.2.4):
- KommunicateChatUI-iOS-SDK/Complete (= 1.2.4)
- KommunicateChatUI-iOS-SDK/Complete (1.2.4):
- iOSDropDown
- Kingfisher (~> 7.6.2)
- KommunicateChatUI-iOS-SDK/RichMessageKit
- KommunicateCore-iOS-SDK (~> 1.1.5)
- SwipeCellKit (~> 2.7.1)
- ZendeskChatProvidersSDK (~> 3.0.0)
- KommunicateChatUI-iOS-SDK/RichMessageKit (1.2.3)
- KommunicateChatUI-iOS-SDK/RichMessageKit (1.2.4)
- KommunicateCore-iOS-SDK (1.1.5)
- Nimble (12.3.0)
- Nimble-Snapshots (9.6.1):
Expand Down Expand Up @@ -57,8 +57,8 @@ SPEC CHECKSUMS:
iOSDropDown: ce9daa584eaa5567cafc1b633e3cc7eb6d9cea42
iOSSnapshotTestCase: a670511f9ee3829c2b9c23e6e68f315fd7b6790f
Kingfisher: 6c5449c6450c5239166510ba04afe374a98afc4f
Kommunicate: 85ae069d27888d47fe44927d8acf0bedc5908f63
KommunicateChatUI-iOS-SDK: 9d0b4fa2a6b22786dce8bd00d7198f58d2c9d9ac
Kommunicate: f9cc734f6934d2554908e1e9ba0888aaca079c33
KommunicateChatUI-iOS-SDK: bea6efa038de0df45a3c40f84c93e0bf788a9167
KommunicateCore-iOS-SDK: 83e2c8d5b3007417354752a457068bd07e6d2e03
Nimble: f8a8219d16f176429b951e8f7e72df5c23ceddc0
Nimble-Snapshots: 4988d1cf2fe062f13bd2eb87c4279770785e682b
Expand Down
4 changes: 2 additions & 2 deletions Kommunicate.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Kommunicate'
s.version = '7.0.8'
s.version = '7.0.9'
s.summary = 'Kommunicate iOS SDK for customer support.'
s.homepage = 'https://github.com/Kommunicate-io/Kommunicate-iOS-SDK'
s.license = { :type => 'BSD-3-Clause', :file => 'LICENSE' }
Expand All @@ -10,5 +10,5 @@ Pod::Spec.new do |s|
s.swift_version = '5.0'
s.source_files = 'Sources/Kommunicate/Classes/**/*.{swift}'
s.resources = 'Sources/Resources/**/*{lproj,storyboard,xib,xcassets,json,strings}'
s.dependency 'KommunicateChatUI-iOS-SDK' , '~> 1.2.3'
s.dependency 'KommunicateChatUI-iOS-SDK' , '~> 1.2.4'
end
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"repositoryURL": "https://github.com/Kommunicate-io/KommunicateChatUI-iOS-SDK.git",
"state": {
"branch": null,
"revision": "cc6df4a9a9149549aa63bcf06637797eb5acac21",
"version": "1.2.3"
"revision": "70adbe88587c17b5b92193e67afb057bf7ff9fc4",
"version": "1.2.4"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let package = Package(
),
],
dependencies: [
.package(name: "KommunicateChatUI-iOS-SDK", url: "https://github.com/Kommunicate-io/KommunicateChatUI-iOS-SDK.git", from: "1.2.3"),
.package(name: "KommunicateChatUI-iOS-SDK", url: "https://github.com/Kommunicate-io/KommunicateChatUI-iOS-SDK.git", from: "1.2.4"),
],
targets: [
.target(
Expand Down
30 changes: 29 additions & 1 deletion Sources/Kommunicate/Classes/FaqViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ public class FaqViewController: UIViewController, Localizable {
let webConfiguration = WKWebViewConfiguration()
webView = WKWebView(frame: .zero, configuration: webConfiguration)
webView.allowsBackForwardNavigationGestures = true
webView.scrollView.backgroundColor = UIColor.kmDynamicColor(light: .white, dark: .backgroundDarkColor())
webView.backgroundColor = UIColor.kmDynamicColor(light: .white, dark: .backgroundDarkColor())
webView.navigationDelegate = self
webView.configuration.userContentController.addUserScript(self.getZoomDisableScript())
if UIColor.isKMDarkModeEnabled {
injectDynamicStyles()
}
view = webView
}


private func getZoomDisableScript() -> WKUserScript {
let source: String = "var meta = document.createElement('meta');" +
Expand All @@ -44,6 +48,30 @@ public class FaqViewController: UIViewController, Localizable {
return WKUserScript(source: source, injectionTime: .atDocumentEnd, forMainFrameOnly: true)
}

private func injectDynamicStyles() {
let dynamicStylesScript = """
function prefersDarkMode() {
return window.matchMedia('(prefers-color-scheme: dark)').matches;
}
function applyDynamicStyles() {
var initialBackgroundColor = prefersDarkMode() ? '#1C1C1C' : '#ffffff';
document.body.style.backgroundColor = initialBackgroundColor;
if (prefersDarkMode()) {
document.body.style.backgroundColor = '#1C1C1C';
} else {
document.body.style.backgroundColor = '#ffffff';
}
}
applyDynamicStyles();
"""
let dynamicStylesScriptInjection = WKUserScript(source: dynamicStylesScript, injectionTime: .atDocumentEnd, forMainFrameOnly: true)

webView.configuration.userContentController.addUserScript(dynamicStylesScriptInjection)
}

override public func viewDidLoad() {
super.viewDidLoad()
webView.load(URLRequest(url: url))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ConversationClosedView: UIView {
private let conversationResolvedLabel: UILabel = {
let label = UILabel(frame: .zero)
label.numberOfLines = 1
label.textColor = .text(.brownishGreyTwo)
label.textColor = UIColor.kmDynamicColor(light: .text(.brownishGreyTwo), dark: UIColor.text(.warmGrey))
label.font = Style.Font.normal(size: 15).font()
label.backgroundColor = .clear
label.text = LocalizedText.conversationResolved
Expand Down Expand Up @@ -99,7 +99,7 @@ class ConversationClosedView: UIView {
action: #selector(restartConversationTapped),
for: .touchUpInside
)
backgroundColor = .background(.mediumGrey)
backgroundColor = UIColor.kmDynamicColor(light: UIColor.background(.mediumGrey), dark: UIColor.appBarDarkColor())
setupLayout()
}

Expand Down

0 comments on commit 3d87ee1

Please sign in to comment.