From 8588539414d9c5d32930d3c55b0d6dbe9bb24e3e Mon Sep 17 00:00:00 2001 From: leeway Date: Fri, 8 Apr 2022 08:54:18 +0800 Subject: [PATCH] fix: App crash because of UserDefaults key "version" #450 --- CocoaMQTT.podspec | 4 ++-- Example/Example.xcworkspace/contents.xcworkspacedata | 10 ---------- .../xcshareddata/IDEWorkspaceChecks.plist | 8 -------- Source/CocoaMQTTStorage.swift | 4 ++-- 4 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 Example/Example.xcworkspace/contents.xcworkspacedata delete mode 100644 Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/CocoaMQTT.podspec b/CocoaMQTT.podspec index cfa93385..0239f679 100644 --- a/CocoaMQTT.podspec +++ b/CocoaMQTT.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "CocoaMQTT" - s.version = "2.0.3-beta5" + s.version = "2.0.3-beta6" s.summary = "MQTT v3.1.1 client library for iOS and OS X written with Swift 5" s.homepage = "https://github.com/emqx/CocoaMQTT" s.license = { :type => "MIT" } @@ -12,7 +12,7 @@ Pod::Spec.new do |s| s.ios.deployment_target = "9.0" s.tvos.deployment_target = "10.0" # s.watchos.deployment_target = "2.0" - s.source = { :git => "https://github.com/emqx/CocoaMQTT.git", :tag => "2.0.3-beta5"} + s.source = { :git => "https://github.com/emqx/CocoaMQTT.git", :tag => "2.0.3-beta6"} s.default_subspec = 'Core' s.subspec 'Core' do |ss| diff --git a/Example/Example.xcworkspace/contents.xcworkspacedata b/Example/Example.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index a37cf193..00000000 --- a/Example/Example.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Source/CocoaMQTTStorage.swift b/Source/CocoaMQTTStorage.swift index 84a1567d..079ec56a 100644 --- a/Source/CocoaMQTTStorage.swift +++ b/Source/CocoaMQTTStorage.swift @@ -60,11 +60,11 @@ final class CocoaMQTTStorage: CocoaMQTTStorageProtocol { } func setMQTTVersion(_ version : String){ - versionDefault.set(version, forKey: "version") + versionDefault.set(version, forKey: "cocoamqtt_mqtt_version") } func queryMQTTVersion() -> String{ - return versionDefault.string(forKey: "version")! + return versionDefault.string(forKey: "cocoamqtt_mqtt_version")! }