From cb0d9705eae2bcb2e3b6275da65b93601595535e Mon Sep 17 00:00:00 2001 From: Edward Beecroft Date: Tue, 9 May 2023 23:06:11 +0100 Subject: [PATCH] Add shorter convenience accessor for the SDK. Bump version. --- Examples/Examples.xcodeproj/project.pbxproj | 2 ++ .../xcshareddata/swiftpm/Package.resolved | 14 -------------- QuickVerse.podspec | 2 +- README.md | 8 +------- Sources/QuickVerse/Manager/QuickVerse.swift | 5 ++++- 5 files changed, 8 insertions(+), 23 deletions(-) delete mode 100644 Examples/Examples.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/Examples/Examples.xcodeproj/project.pbxproj b/Examples/Examples.xcodeproj/project.pbxproj index fc348dd..f9ca7ff 100644 --- a/Examples/Examples.xcodeproj/project.pbxproj +++ b/Examples/Examples.xcodeproj/project.pbxproj @@ -51,6 +51,7 @@ 755AF0832A002B5F0006233B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 755AF0862A002B5F0006233B /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 75A155052A0529ED00F72AFD /* Fonts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fonts.swift; sourceTree = ""; }; + 75CB64DA2A0ABE4D004E0379 /* quickverse-ios-sdk */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "quickverse-ios-sdk"; path = ..; sourceTree = ""; }; 75D19C752A051FD3005B7A58 /* QVKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QVKey.swift; sourceTree = ""; }; 75D19C7B2A052808005B7A58 /* Lexend-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Lexend-Regular.ttf"; sourceTree = ""; }; 75D19C7C2A052808005B7A58 /* Lexend-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Lexend-Medium.ttf"; sourceTree = ""; }; @@ -104,6 +105,7 @@ 755AF0732A002B5D0006233B = { isa = PBXGroup; children = ( + 75CB64DA2A0ABE4D004E0379 /* quickverse-ios-sdk */, 75D19C792A0526CB005B7A58 /* Shared */, 752195B22A04F8C600F47BE7 /* UIKit-Example */, 755AF07E2A002B5D0006233B /* SwiftUI-Example */, diff --git a/Examples/Examples.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/Examples.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 97add37..0000000 --- a/Examples/Examples.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,14 +0,0 @@ -{ - "pins" : [ - { - "identity" : "quickverse-ios-sdk", - "kind" : "remoteSourceControl", - "location" : "git@github.com:QuickVerse/quickverse-ios-sdk.git", - "state" : { - "branch" : "main", - "revision" : "f7bbe0663486af2fd650c34bd55a539020fb9691" - } - } - ], - "version" : 2 -} diff --git a/QuickVerse.podspec b/QuickVerse.podspec index a213985..606a0b3 100644 --- a/QuickVerse.podspec +++ b/QuickVerse.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "QuickVerse" - spec.version = "1.3.1" + spec.version = "1.3.2" spec.summary = "Effortlessly integrate your quickverse.io localisations into your iOS app, for instant, over-the-air updates & more." spec.description = <<-DESC QuickVerse lets you translate your web and mobile apps with ease. Powered by instant, over-the-air updates, you can change your app copy anytime, anywhere. diff --git a/README.md b/README.md index 1cfabf1..6a53d12 100644 --- a/README.md +++ b/README.md @@ -38,13 +38,7 @@ pod 'QuickVerse', '~> 1.3.1' // Or pin to a specific version ### Carthage -1. Add the following to your Cartfile: - -``` -github "QuickVerse/quickverse-ios-sdk" // // Always use the latest version -github "QuickVerse/quickverse-ios-sdk" ~> 1.3.1 // Or pin to a specific version -``` -2. In a terminal window, navigate to the directory of your `Cartfile`, and run `carthage update --use-xcframeworks` +We recommend SPM for CocoaPods, but please contact us for integration guidance if you wish to use Carthage. ## Usage diff --git a/Sources/QuickVerse/Manager/QuickVerse.swift b/Sources/QuickVerse/Manager/QuickVerse.swift index 97eee02..4605f41 100644 --- a/Sources/QuickVerse/Manager/QuickVerse.swift +++ b/Sources/QuickVerse/Manager/QuickVerse.swift @@ -1,5 +1,8 @@ import Foundation +/// Convenience global accessor, allowing you to call methods with shorter footprint, for example: QV.getLocalizations( +public let QV = QuickVerse.shared + public class QuickVerse { private init() {} public static let shared = QuickVerse() @@ -8,7 +11,7 @@ public class QuickVerse { public var isDebugEnabled: Bool = false private var localizations = [QuickVerseLocalization]() - private let sdkVersion = "1.3.0" + private let sdkVersion = "1.3.2" } // MARK: - Public Methods