From 8fac49cadfd5366c4da282ec6e5520f5f32fc497 Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Wed, 11 Oct 2023 12:16:06 -0700 Subject: [PATCH] Bump Rust Version (#174) * bump the spm and pod to the latest rust * change to has prefix * change up the error --- Package.swift | 2 +- Sources/XMTP/Codecs/RemoteAttachmentCodec.swift | 4 ++-- XMTP.podspec | 4 ++-- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Package.swift b/Package.swift index 7c10ff07..8ee196d6 100644 --- a/Package.swift +++ b/Package.swift @@ -26,7 +26,7 @@ let package = Package( .package(url: "https://github.com/1024jp/GzipSwift", from: "5.2.0"), .package(url: "https://github.com/bufbuild/connect-swift", from: "0.3.0"), .package(url: "https://github.com/apple/swift-docc-plugin.git", from: "1.0.0"), - .package(url: "https://github.com/xmtp/xmtp-rust-swift", from: "0.3.1-beta0"), + .package(url: "https://github.com/xmtp/xmtp-rust-swift", from: "0.3.5-beta0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/Sources/XMTP/Codecs/RemoteAttachmentCodec.swift b/Sources/XMTP/Codecs/RemoteAttachmentCodec.swift index fbb552cb..847fbddc 100644 --- a/Sources/XMTP/Codecs/RemoteAttachmentCodec.swift +++ b/Sources/XMTP/Codecs/RemoteAttachmentCodec.swift @@ -74,7 +74,7 @@ public struct RemoteAttachment { func ensureSchemeMatches() throws { if !url.hasPrefix(scheme.rawValue) { - throw RemoteAttachmentError.invalidScheme("scheme must be https://") + throw RemoteAttachmentError.invalidScheme("scheme must be https") } } @@ -174,7 +174,7 @@ public struct RemoteAttachmentCodec: ContentCodec { throw RemoteAttachmentError.invalidScheme("no scheme parameter") } - if (!schemeString.starts(with: "https")) { + if (!schemeString.hasPrefix(RemoteAttachment.Scheme.https.rawValue)) { throw RemoteAttachmentError.invalidScheme("invalid scheme value. must start with https") } diff --git a/XMTP.podspec b/XMTP.podspec index 9829e222..94de8558 100644 --- a/XMTP.podspec +++ b/XMTP.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "XMTP" - spec.version = "0.5.14-alpha0" + spec.version = "0.6.0-alpha0" spec.summary = "XMTP SDK Cocoapod" # This description is used to generate tags and improve search results. @@ -44,7 +44,7 @@ Pod::Spec.new do |spec| spec.dependency "web3.swift" spec.dependency "GzipSwift" spec.dependency "Connect-Swift" - spec.dependency 'XMTPRust', '= 0.3.4-beta0' + spec.dependency 'XMTPRust', '= 0.3.5-beta0' spec.xcconfig = {'VALID_ARCHS' => 'arm64' } end diff --git a/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 6187659e..65e196f6 100644 --- a/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -176,8 +176,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/xmtp/xmtp-rust-swift", "state" : { - "revision" : "4a76e5401fa780c40610e2f0d248f695261d08dd", - "version" : "0.3.1-beta0" + "revision" : "d1aaac47fc7c57645a6fe9e06972b957b3efa33c", + "version" : "0.3.5-beta0" } } ],