diff --git a/Core/UDStringExtension.swift b/Core/UDStringExtension.swift index a3e1567..863b544 100644 --- a/Core/UDStringExtension.swift +++ b/Core/UDStringExtension.swift @@ -286,17 +286,19 @@ extension String { mutating func udConvertUrls() { var count = 0 var flag = true + var string = self while count < 9000 && flag { - if let range = self.range(of: "" { + if let searchEndIndex = string.index(startIndex, offsetBy: index, limitedBy: string.endIndex), + udIsIndexValid(searchEndIndex) { + if string[searchEndIndex] == ">" { isFindEnd = true - self = self.replacingOccurrences(of: self[searchEndIndex...searchEndIndex], with: "") - self = self.replacingOccurrences(of: self[startIndex...startIndex], with: "") + string = string.replacingOccurrences(of: self[searchEndIndex...searchEndIndex], with: "") + string = string.replacingOccurrences(of: self[startIndex...startIndex], with: "") } } else { isFindEnd = true @@ -308,6 +310,7 @@ extension String { } count += 1 } + self = string } mutating func udConverDoubleLinks() { diff --git a/Core/UseDeskSDKHelp.swift b/Core/UseDeskSDKHelp.swift index d8c92de..e0f27e0 100755 --- a/Core/UseDeskSDKHelp.swift +++ b/Core/UseDeskSDKHelp.swift @@ -10,7 +10,7 @@ class UseDeskSDKHelp { let payload: [String : Any] = [ "sdk" : "iOS", "type" : "sdk", - "version" : "3.4.6", + "version" : "3.4.7", "message_limit" : countMessagesOnInit, "userData" : getUserParameters() ] diff --git a/Example/UseDesk.xcodeproj/project.pbxproj b/Example/UseDesk.xcodeproj/project.pbxproj index d43b838..9b098e4 100644 --- a/Example/UseDesk.xcodeproj/project.pbxproj +++ b/Example/UseDesk.xcodeproj/project.pbxproj @@ -589,7 +589,7 @@ INFOPLIST_FILE = "UseDesk/UseDesk-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 3.4.5; + MARKETING_VERSION = 3.4.7; MODULE_NAME = ExampleApp; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = UseDeskExampleSDK.ru; @@ -622,7 +622,7 @@ INFOPLIST_FILE = "UseDesk/UseDesk-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 3.4.5; + MARKETING_VERSION = 3.4.7; MODULE_NAME = ExampleApp; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = UseDeskExampleSDK.ru; diff --git a/UseDesk_SDK_Swift.podspec b/UseDesk_SDK_Swift.podspec index 4fa7296..e4de9ad 100755 --- a/UseDesk_SDK_Swift.podspec +++ b/UseDesk_SDK_Swift.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'UseDesk_SDK_Swift' - s.version = '3.4.6' + s.version = '3.4.7' s.summary = 'A short description of UseDesk.' s.homepage = 'https://github.com/usedesk/UseDeskSwift'