Clean & suppress warnings for dependencies
This commit is contained in:
parent
a57edaf66f
commit
8a605858fd
|
@ -2,7 +2,7 @@ import PromiseKit
|
|||
|
||||
public struct LokiMessagingAPI {
|
||||
|
||||
private static var snodeURL: String { return textSecureServerURL }
|
||||
private static var baseURL: String { return textSecureServerURL }
|
||||
private static var port: String { return "8080" }
|
||||
private static var apiVersion: String { return "v1" }
|
||||
|
||||
|
@ -19,7 +19,7 @@ public struct LokiMessagingAPI {
|
|||
|
||||
// MARK: API
|
||||
private static func invoke(_ method: Method, parameters: [String:String] = [:]) -> Promise<Response> {
|
||||
let url = URL(string: "\(snodeURL):\(port)/\(apiVersion)/storage_rpc")!
|
||||
let url = URL(string: "\(baseURL):\(port)/\(apiVersion)/storage_rpc")!
|
||||
let request = TSRequest(url: url, method: "POST", parameters: [ "method" : method.rawValue, "params" : parameters ])
|
||||
return TSNetworkManager.shared().makePromise(request: request)
|
||||
}
|
||||
|
|
|
@ -43,10 +43,10 @@ enum Mnemonic {
|
|||
}
|
||||
}
|
||||
|
||||
enum DecodingError : Error {
|
||||
enum DecodingError : LocalizedError {
|
||||
case generic, inputTooShort, missingLastWord, invalidWord, verificationFailed
|
||||
|
||||
var description: String {
|
||||
var errorDescription: String {
|
||||
switch self {
|
||||
case .generic: return NSLocalizedString("Something went wrong. Please check your mnemonic and try again.", comment: "")
|
||||
case .inputTooShort: return NSLocalizedString("Looks like you didn't enter enough words. Please check your mnemonic and try again.", comment: "")
|
||||
|
@ -63,7 +63,7 @@ enum Mnemonic {
|
|||
let prefixLength = language.prefixLength
|
||||
var result: [String] = []
|
||||
let n = wordSet.count
|
||||
let characterCount = string.indices.count
|
||||
let characterCount = string.indices.count // Safe for this particular case
|
||||
for chunkStartIndexAsInt in stride(from: 0, to: characterCount, by: 8) {
|
||||
let chunkStartIndex = string.index(string.startIndex, offsetBy: chunkStartIndexAsInt)
|
||||
let chunkEndIndex = string.index(chunkStartIndex, offsetBy: 8)
|
||||
|
@ -95,7 +95,7 @@ enum Mnemonic {
|
|||
let n = truncatedWordSet.count
|
||||
// Check preconditions
|
||||
guard words.count >= 12 else { throw DecodingError.inputTooShort }
|
||||
guard words.count % 3 != 0 else { throw DecodingError.missingLastWord }
|
||||
guard !words.count.isMultiple(of: 3) else { throw DecodingError.missingLastWord }
|
||||
// Get checksum word
|
||||
let checksumWord = words.popLast()!
|
||||
// Decode
|
||||
|
|
1
Podfile
1
Podfile
|
@ -2,6 +2,7 @@ platform :ios, '9.0'
|
|||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
|
||||
use_frameworks!
|
||||
inhibit_all_warnings!
|
||||
|
||||
def shared_pods
|
||||
|
||||
|
|
|
@ -305,6 +305,6 @@ SPEC CHECKSUMS:
|
|||
YapDatabase: b418a4baa6906e8028748938f9159807fd039af4
|
||||
YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54
|
||||
|
||||
PODFILE CHECKSUM: 71de0ab6116c92a1a144e5889d07cc57a0d61f77
|
||||
PODFILE CHECKSUM: 7ccaed3947d300293e21ab9e118dae7de7592743
|
||||
|
||||
COCOAPODS: 1.5.3
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
|
||||
BuildableName = "Signal.app"
|
||||
BuildableName = "Session.app"
|
||||
BlueprintName = "Signal"
|
||||
ReferencedContainer = "container:Signal.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
|
||||
BuildableName = "Signal.app"
|
||||
BuildableName = "Session.app"
|
||||
BlueprintName = "Signal"
|
||||
ReferencedContainer = "container:Signal.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -56,7 +56,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
|
||||
BuildableName = "Signal.app"
|
||||
BuildableName = "Session.app"
|
||||
BlueprintName = "Signal"
|
||||
ReferencedContainer = "container:Signal.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -87,7 +87,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
|
||||
BuildableName = "Signal.app"
|
||||
BuildableName = "Session.app"
|
||||
BlueprintName = "Signal"
|
||||
ReferencedContainer = "container:Signal.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
|
||||
BuildableName = "Signal.app"
|
||||
BuildableName = "Session.app"
|
||||
BlueprintName = "Signal"
|
||||
ReferencedContainer = "container:Signal.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -28,7 +28,7 @@
|
|||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "EF7BE58B1F949AF31E4AF4FD37150A86"
|
||||
BlueprintIdentifier = "2D8EA4E0F4AC2732133869D7CB377264"
|
||||
BuildableName = "SignalServiceKit.framework"
|
||||
BlueprintName = "SignalServiceKit"
|
||||
ReferencedContainer = "container:Pods/Pods.xcodeproj">
|
||||
|
@ -117,7 +117,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
|
||||
BuildableName = "Signal.app"
|
||||
BuildableName = "Session.app"
|
||||
BlueprintName = "Signal"
|
||||
ReferencedContainer = "container:Signal.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -152,7 +152,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
|
||||
BuildableName = "Signal.app"
|
||||
BuildableName = "Session.app"
|
||||
BlueprintName = "Signal"
|
||||
ReferencedContainer = "container:Signal.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -193,7 +193,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
|
||||
BuildableName = "Signal.app"
|
||||
BuildableName = "Session.app"
|
||||
BlueprintName = "Signal"
|
||||
ReferencedContainer = "container:Signal.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
|
||||
BuildableName = "Signal.app"
|
||||
BuildableName = "Session.app"
|
||||
BlueprintName = "Signal"
|
||||
ReferencedContainer = "container:Signal.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -72,7 +72,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
|
||||
BuildableName = "Signal.app"
|
||||
BuildableName = "Session.app"
|
||||
BlueprintName = "Signal"
|
||||
ReferencedContainer = "container:Signal.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -92,7 +92,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
|
||||
BuildableName = "Signal.app"
|
||||
BuildableName = "Session.app"
|
||||
BlueprintName = "Signal"
|
||||
ReferencedContainer = "container:Signal.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
|
|
@ -205,7 +205,7 @@ final class OnboardingKeyPairViewController : OnboardingBaseViewController {
|
|||
hexEncodedPublicKey = keyPair.hexEncodedPublicKey
|
||||
} catch let error {
|
||||
let error = error as? Mnemonic.DecodingError ?? Mnemonic.DecodingError.generic
|
||||
errorLabel.text = error.description
|
||||
errorLabel.text = error.errorDescription
|
||||
errorLabel.isHidden = false
|
||||
return
|
||||
}
|
||||
|
|
|
@ -2543,8 +2543,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "You set disappearing message time to %@.";
|
||||
|
||||
// -- Loki --
|
||||
|
||||
// Loki:
|
||||
"Loki Messenger can let you know when you get a message (and who it is from)" = "Loki Messenger can let you know when you get a message (and who it is from)";
|
||||
"Create Your Loki Messenger Account" = "Create Your Loki Messenger Account";
|
||||
"Enter a name to be shown to your contacts" = "Enter a name to be shown to your contacts";
|
||||
|
|
|
@ -294,7 +294,7 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
|
|||
OWSUserProfile *userProfile = self.localUserProfile;
|
||||
OWSAssertDebug(userProfile);
|
||||
|
||||
/* Loki: We don't support avatar uploads yet */
|
||||
// Loki: We don't support avatar uploads yet
|
||||
OWSLogVerbose(@"Updating local profile on service with no avatar.");
|
||||
tryToUpdateService(nil, nil);
|
||||
|
||||
|
|
Loading…
Reference in New Issue