Fix linking issue & clean
This commit is contained in:
parent
cf87f7261c
commit
d84e3fea27
|
@ -625,6 +625,7 @@
|
|||
BFF3FB9730634F37D25903F4 /* Pods_Signal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D17BB5C25D615AB49813100C /* Pods_Signal.framework */; };
|
||||
C34C8F7423A7830B00D82669 /* SpaceMono-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C34C8F7323A7830A00D82669 /* SpaceMono-Bold.ttf */; };
|
||||
C354E75A23FE2A7600CE22E3 /* BaseVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = C354E75923FE2A7600CE22E3 /* BaseVC.swift */; };
|
||||
C36B8707243C50C60049991D /* SignalMessaging.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 453518921FC63DBF00210559 /* SignalMessaging.framework */; };
|
||||
C3B781FF2411C18600C859D8 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C3B781FE2411C18600C859D8 /* GoogleService-Info.plist */; };
|
||||
C3B782022411C80500C859D8 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C3B781FE2411C18600C859D8 /* GoogleService-Info.plist */; };
|
||||
C3B782032411C81100C859D8 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C3B781FE2411C18600C859D8 /* GoogleService-Info.plist */; };
|
||||
|
@ -697,6 +698,13 @@
|
|||
remoteGlobalIDString = D221A088169C9E5E00537ABF;
|
||||
remoteInfo = Signal;
|
||||
};
|
||||
C36B8705243C50B00049991D /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D221A080169C9E5E00537ABF /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 453518911FC63DBF00210559;
|
||||
remoteInfo = SignalMessaging;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
|
@ -1545,6 +1553,7 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C36B8707243C50C60049991D /* SignalMessaging.framework in Frameworks */,
|
||||
390650A6D345BFE01E006DB0 /* Pods_LokiPushNotificationService.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
@ -3167,6 +3176,7 @@
|
|||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
C36B8706243C50B00049991D /* PBXTargetDependency */,
|
||||
);
|
||||
name = LokiPushNotificationService;
|
||||
productName = LokiPushNotificationService;
|
||||
|
@ -4319,6 +4329,11 @@
|
|||
target = D221A088169C9E5E00537ABF /* Signal */;
|
||||
targetProxy = B6AFCEBA19A93DA60098CFCB /* PBXContainerItemProxy */;
|
||||
};
|
||||
C36B8706243C50B00049991D /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 453518911FC63DBF00210559 /* SignalMessaging */;
|
||||
targetProxy = C36B8705243C50B00049991D /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "56FEAC3FCA8ADA9B6D3602FBA38B2527"
|
||||
BlueprintIdentifier = "11319FE11E0F163FEF714A606CCC265F"
|
||||
BuildableName = "SignalServiceKit.framework"
|
||||
BlueprintName = "SignalServiceKit"
|
||||
ReferencedContainer = "container:Pods/Pods.xcodeproj">
|
||||
|
@ -72,7 +72,7 @@
|
|||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "3FC719A0D2B2FA321E696D83720CAC6F"
|
||||
BlueprintIdentifier = "B772E882F193AA2F25932C514BBF0805"
|
||||
BuildableName = "SignalServiceKit-Unit-Tests.xctest"
|
||||
BlueprintName = "SignalServiceKit-Unit-Tests"
|
||||
ReferencedContainer = "container:Pods/Pods.xcodeproj">
|
||||
|
@ -180,7 +180,7 @@
|
|||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "3AC929F2E4978F42ED9E9EA232D7247B"
|
||||
BlueprintIdentifier = "5C9F6BA9ADC4724B2612C9F20FBE2076"
|
||||
BuildableName = "SignalCoreKit-Unit-Tests.xctest"
|
||||
BlueprintName = "SignalCoreKit-Unit-Tests"
|
||||
ReferencedContainer = "container:Pods/Pods.xcodeproj">
|
||||
|
@ -190,7 +190,7 @@
|
|||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5B34FB0B5ABA685EF33F1BA1C388F016"
|
||||
BlueprintIdentifier = "BF2BCB29C9D47F15FB156F1EC64E5CC2"
|
||||
BuildableName = "AxolotlKit-Unit-Tests.xctest"
|
||||
BlueprintName = "AxolotlKit-Unit-Tests"
|
||||
ReferencedContainer = "container:Pods/Pods.xcodeproj">
|
||||
|
@ -200,7 +200,7 @@
|
|||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D85B45003BA81D72F606FDF3EB4B4E1C"
|
||||
BlueprintIdentifier = "78DE33AED82B26B4B8D899CC403003AF"
|
||||
BuildableName = "Curve25519Kit-Unit-Tests.xctest"
|
||||
BlueprintName = "Curve25519Kit-Unit-Tests"
|
||||
ReferencedContainer = "container:Pods/Pods.xcodeproj">
|
||||
|
@ -210,7 +210,7 @@
|
|||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F9C2DA0BADF4F69559F0AA5BB4FC1E06"
|
||||
BlueprintIdentifier = "AF7FC2C93AA68E33600807F168BD483A"
|
||||
BuildableName = "HKDFKit-Unit-Tests.xctest"
|
||||
BlueprintName = "HKDFKit-Unit-Tests"
|
||||
ReferencedContainer = "container:Pods/Pods.xcodeproj">
|
||||
|
@ -220,7 +220,7 @@
|
|||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "92057C418B970541FF6BE6E64A49D8C2"
|
||||
BlueprintIdentifier = "B086B0C72F8A5814FF48795531F21635"
|
||||
BuildableName = "SignalMetadataKit-Unit-Tests.xctest"
|
||||
BlueprintName = "SignalMetadataKit-Unit-Tests"
|
||||
ReferencedContainer = "container:Pods/Pods.xcodeproj">
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
public struct LokiPublicChannel {
|
||||
public let name: String
|
||||
}
|
||||
|
|
|
@ -1,160 +0,0 @@
|
|||
//// Loki: Refer to Docs/SessionReset.md for explanations
|
||||
//
|
||||
//#import "SessionCipher+Loki.h"
|
||||
//#import "NSNotificationCenter+OWS.h"
|
||||
//#import "PreKeyWhisperMessage.h"
|
||||
//#import "OWSPrimaryStorage+Loki.h"
|
||||
//#import "TSContactThread.h"
|
||||
//#import <YapDatabase/YapDatabase.h>
|
||||
//
|
||||
//NSString *const kNSNotificationName_SessionAdopted = @"kNSNotificationName_SessionAdopted";
|
||||
//NSString *const kNSNotificationKey_ContactPubKey = @"kNSNotificationKey_ContactPubKey";
|
||||
//
|
||||
//@interface SessionCipher ()
|
||||
//
|
||||
//@property (nonatomic, readonly) NSString *recipientId;
|
||||
//@property (nonatomic, readonly) int deviceId;
|
||||
//
|
||||
//@property (nonatomic, readonly) id<SessionStore> sessionStore;
|
||||
//@property (nonatomic, readonly) id<PreKeyStore> prekeyStore;
|
||||
//
|
||||
//@end
|
||||
//
|
||||
//@implementation SessionCipher (Loki)
|
||||
//
|
||||
//- (NSData *)throws_lokiDecrypt:(id<CipherMessage>)whisperMessage protocolContext:(nullable id)protocolContext
|
||||
//{
|
||||
// // Our state before we decrypt the message
|
||||
// SessionState *_Nullable state = [self getCurrentState:protocolContext];
|
||||
//
|
||||
// // Verify incoming friend request messages
|
||||
// if (!state) {
|
||||
// [self throws_validatePreKeysForFriendRequestAcceptance:whisperMessage protocolContext:protocolContext];
|
||||
// }
|
||||
//
|
||||
// // While decrypting our state may change internally
|
||||
// NSData *plainText = [self throws_decrypt:whisperMessage protocolContext:protocolContext];
|
||||
//
|
||||
//
|
||||
// // Loki: Handle any session resets
|
||||
// [self handleSessionReset:whisperMessage previousState:state protocolContext:protocolContext];
|
||||
//
|
||||
// return plainText;
|
||||
//}
|
||||
//
|
||||
///// Get the current session state
|
||||
//- (SessionState *_Nullable)getCurrentState:(nullable id)protocolContext {
|
||||
// SessionRecord *record = [self.sessionStore loadSession:self.recipientId deviceId:self.deviceId protocolContext:protocolContext];
|
||||
// SessionState *state = record.sessionState;
|
||||
//
|
||||
// // Check if session is initialized
|
||||
// if (!state.hasSenderChain) { return nil; }
|
||||
//
|
||||
// return state;
|
||||
//}
|
||||
//
|
||||
///// Handle any Loki session reset stuff
|
||||
//- (void)handleSessionReset:(id<CipherMessage>)whisperMessage previousState:(SessionState *_Nullable)previousState protocolContext:(nullable id)protocolContext
|
||||
//{
|
||||
// // Don't bother doing anything if we didn't have a session before
|
||||
// if (!previousState) { return; }
|
||||
//
|
||||
// OWSAssertDebug([protocolContext isKindOfClass:[YapDatabaseReadWriteTransaction class]]);
|
||||
// YapDatabaseReadWriteTransaction *transaction = protocolContext;
|
||||
//
|
||||
// // Get the thread
|
||||
// TSContactThread *thread = [TSContactThread getThreadWithContactId:self.recipientId transaction:transaction];
|
||||
// if (!thread) { return; }
|
||||
//
|
||||
// // Bail early if no session reset is in progress
|
||||
// if (thread.sessionResetState == TSContactThreadSessionResetStateNone) { return; }
|
||||
//
|
||||
// BOOL sessionResetReceived = thread.sessionResetState == TSContactThreadSessionResetStateRequestReceived;
|
||||
// SessionState *_Nullable currentState = [self getCurrentState:protocolContext];
|
||||
//
|
||||
// // Check if our previous state and our current state differ
|
||||
// if (!currentState || ![currentState.aliceBaseKey isEqualToData:previousState.aliceBaseKey]) {
|
||||
//
|
||||
// if (sessionResetReceived) {
|
||||
// // The other user used an old session to contact us.
|
||||
// // Wait for them to use a new one
|
||||
// [self restoreSession:previousState protocolContext:protocolContext];
|
||||
// } else {
|
||||
// // Our session reset went through successfully
|
||||
// // We had initiated a session reset and got a different session back from the user
|
||||
// [self deleteAllSessionsExcept:currentState protocolContext:protocolContext];
|
||||
// [self notifySessionAdopted];
|
||||
// }
|
||||
//
|
||||
// } else if (sessionResetReceived) {
|
||||
// // Our session reset went through successfully
|
||||
// // We got a message with the same session from the other user
|
||||
// [self deleteAllSessionsExcept:previousState protocolContext:protocolContext];
|
||||
// [self notifySessionAdopted];
|
||||
// }
|
||||
//}
|
||||
//
|
||||
///// Send a notification about a new session being adopted
|
||||
//- (void)notifySessionAdopted
|
||||
//{
|
||||
// NSDictionary *userInfo = @{ kNSNotificationKey_ContactPubKey : self.recipientId };
|
||||
// [NSNotificationCenter.defaultCenter postNotificationNameAsync:kNSNotificationName_SessionAdopted object:nil userInfo:userInfo];
|
||||
//}
|
||||
//
|
||||
///// Delete all other sessions except the given one
|
||||
//- (void)deleteAllSessionsExcept:(SessionState *)state protocolContext:(nullable id)protocolContext
|
||||
//{
|
||||
// SessionRecord *record = [self.sessionStore loadSession:self.recipientId deviceId:self.deviceId protocolContext:protocolContext];
|
||||
// [record removePreviousSessionStates];
|
||||
//
|
||||
// SessionState *newState = state == nil ? [SessionState new] : state;
|
||||
// [record setState:newState];
|
||||
//
|
||||
// [self.sessionStore storeSession:self.recipientId deviceId:self.deviceId session:record protocolContext:protocolContext];
|
||||
//}
|
||||
//
|
||||
///// Set the given session as the active one while archiving the old one
|
||||
//- (void)restoreSession:(SessionState *)state protocolContext:(nullable id)protocolContext
|
||||
//{
|
||||
// SessionRecord *record = [self.sessionStore loadSession:self.recipientId deviceId:self.deviceId protocolContext:protocolContext];
|
||||
//
|
||||
// // Remove the state from previous session states
|
||||
// [record.previousSessionStates enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(SessionState *obj, NSUInteger idx, BOOL *stop) {
|
||||
// if ([state.aliceBaseKey isEqualToData:obj.aliceBaseKey]) {
|
||||
// [record.previousSessionStates removeObjectAtIndex:idx];
|
||||
// *stop = YES;
|
||||
// }
|
||||
// }];
|
||||
//
|
||||
// // Promote it so the previous state gets archived
|
||||
// [record promoteState:state];
|
||||
//
|
||||
// [self.sessionStore storeSession:self.recipientId deviceId:self.deviceId session:record protocolContext:protocolContext];
|
||||
//}
|
||||
//
|
||||
///// Check that we have matching pre keys in the case of a `PreKeyWhisperMessage`.
|
||||
///// This is so that we don't trigger a false friend request accept on unknown contacts.
|
||||
//- (void)throws_validatePreKeysForFriendRequestAcceptance:(id<CipherMessage>)whisperMessage protocolContext:(nullable id)protocolContext {
|
||||
// OWSAssertDebug([protocolContext isKindOfClass:[YapDatabaseReadTransaction class]]);
|
||||
// YapDatabaseReadTransaction *transaction = protocolContext;
|
||||
//
|
||||
// // Ignore anything that isn't a `PreKeyWhisperMessage`
|
||||
// if (![whisperMessage isKindOfClass:[PreKeyWhisperMessage class]]) { return; }
|
||||
//
|
||||
// // Check the pre key store
|
||||
// if (![self.prekeyStore isKindOfClass:[OWSPrimaryStorage class]]) { return; }
|
||||
//
|
||||
// PreKeyWhisperMessage *preKeyMessage = whisperMessage;
|
||||
// OWSPrimaryStorage *primaryStorage = self.prekeyStore;
|
||||
//
|
||||
// PreKeyRecord *_Nullable storedPreKey = [primaryStorage getPreKeyForContact:self.recipientId transaction:transaction];
|
||||
// if (!storedPreKey) {
|
||||
// OWSRaiseException(@"Loki", @"Received a friend request from a public key for which no pre key bundle was created.");
|
||||
// }
|
||||
//
|
||||
// if (storedPreKey.Id != preKeyMessage.prekeyID) {
|
||||
// OWSRaiseException(@"Loki", @"Received a PreKeyWhisperMessage (friend request accept) from an unknown source.");
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//@end
|
Loading…
Reference in New Issue