add a Notification Service Extension for PN with preview

This commit is contained in:
ryanzhao 2020-03-24 11:28:53 +11:00
parent 93c5fd4b6d
commit ca20f3f979
12 changed files with 626 additions and 24 deletions

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>LokiPushNotificationService</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.usernotifications.service</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).NotificationService</string>
</dict>
</dict>
</plist>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.loki-project.loki-messenger</string>
</array>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.loki-project.loki-messenger</string>
</array>
</dict>
</plist>

View File

@ -0,0 +1,211 @@
import UserNotifications
import SignalServiceKit
import SignalMessaging
class NotificationService: UNNotificationServiceExtension {
static let threadIdKey = "Signal.AppNotificationsUserInfoKey.threadId"
var areVersionMigrationsComplete = false
var contentHandler: ((UNNotificationContent) -> Void)?
var notificationContent: UNMutableNotificationContent?
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
self.contentHandler = contentHandler
notificationContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
DispatchQueue.main.sync { self.setupIfNecessary() }
if let notificationContent = notificationContent {
// Modify the notification content here...
let base64EncodedData = notificationContent.userInfo["ENCRYPTED_DATA"] as! String
let data = Data(base64Encoded: base64EncodedData)!
let envelope = try? LokiMessageWrapper.unwrap(data: data)
let envelopeData = try? envelope?.serializedData()
let decrypter = SSKEnvironment.shared.messageDecrypter
if (envelope != nil && envelopeData != nil) {
decrypter.decryptEnvelope(envelope!, envelopeData: envelopeData!,
successBlock: { result,transaction in
if let envelope = try? SSKProtoEnvelope.parseData(result.envelopeData) {
self.removeDecryptionChain(envelope: envelope, transaction: transaction)
self.handelDecryptionResult(result: result, notificationContent: notificationContent, transaction: transaction)
} else {
self.completeWithFailure(content: notificationContent)
}
},
failureBlock: {
self.completeWithFailure(content: notificationContent)
})
} else {
self.completeWithFailure(content: notificationContent)
}
}
}
func removeDecryptionChain(envelope: SSKProtoEnvelope, transaction: YapDatabaseReadWriteTransaction) {
let sessionRecord = SSKEnvironment.shared.primaryStorage.loadSession(envelope.source!, deviceId: Int32(envelope.sourceDevice), protocolContext: transaction)
let sessionState = sessionRecord.sessionState()
}
func handelDecryptionResult(result: OWSMessageDecryptResult, notificationContent: UNMutableNotificationContent, transaction: YapDatabaseReadWriteTransaction) {
let contentProto = try? SSKProtoContent.parseData(result.plaintextData!)
var thread: TSThread
var newNotificationBody = ""
let masterHexEncodedPublicKey: String = LokiDatabaseUtilities.objc_getMasterHexEncodedPublicKey(for: result.source, in: transaction) ?? result.source
var displayName = masterHexEncodedPublicKey
if let groupId = contentProto?.dataMessage?.group?.id {
thread = TSGroupThread.getOrCreateThread(withGroupId: groupId, groupType: .closedGroup, transaction: transaction)
displayName = thread.name()
if displayName.count < 1 {
displayName = MessageStrings.newGroupDefaultTitle
}
let group: SSKProtoGroupContext = (contentProto?.dataMessage?.group!)!
let oldGroupModel = (thread as! TSGroupThread).groupModel
var removeMembers = Set(arrayLiteral: oldGroupModel.groupMemberIds)
let newGroupModel = TSGroupModel.init(title: group.name,
memberIds:group.members,
image: oldGroupModel.groupImage,
groupId: group.id,
groupType: oldGroupModel.groupType,
adminIds: group.admins)
removeMembers.subtract(Set(arrayLiteral: newGroupModel.groupMemberIds))
newGroupModel.removedMembers = removeMembers as! NSMutableSet
switch contentProto?.dataMessage?.group?.type {
case .update:
newNotificationBody = oldGroupModel.getInfoStringAboutUpdate(to: newGroupModel, contactsManager: SSKEnvironment.shared.contactsManager)
break
case .quit:
let nameString = SSKEnvironment.shared.contactsManager.displayName(forPhoneIdentifier: masterHexEncodedPublicKey, transaction: transaction)
newNotificationBody = NSLocalizedString("GROUP_MEMBER_LEFT", comment: nameString)
break
default:
break
}
} else {
thread = TSContactThread.getOrCreateThread(withContactId: result.source, transaction: transaction)
displayName = contentProto?.dataMessage?.profile?.displayName ?? displayName
}
let userInfo: [String: Any] = [NotificationService.threadIdKey: thread.uniqueId!]
notificationContent.title = displayName
notificationContent.userInfo = userInfo
if newNotificationBody.count < 1 {
newNotificationBody = contentProto?.dataMessage?.body ?? ""
}
notificationContent.body = newNotificationBody
if notificationContent.body.count < 1 {
self.completeWithFailure(content: notificationContent)
} else {
self.contentHandler!(notificationContent)
}
}
private var hasSetup = false
func setupIfNecessary() {
AssertIsOnMainThread()
// The NSE will often re-use the same process, so if we're
// already setup we want to do nothing. We're already ready
// to process new messages.
guard !hasSetup else { return }
hasSetup = true
// This should be the first thing we do.
SetCurrentAppContext(NotificationServiceExtensionContext())
DebugLogger.shared().enableTTYLogging()
if _isDebugAssertConfiguration() {
DebugLogger.shared().enableFileLogging()
}
Logger.info("")
_ = AppVersion.sharedInstance()
Cryptography.seedRandom()
// We should never receive a non-voip notification on an app that doesn't support
// app extensions since we have to inform the service we wanted these, so in theory
// this path should never occur. However, the service does have our push token
// so it is possible that could change in the future. If it does, do nothing
// and don't disturb the user. Messages will be processed when they open the app.
guard OWSPreferences.isReadyForAppExtensions() else { return completeSilenty() }
AppSetup.setupEnvironment(
appSpecificSingletonBlock: {
// TODO: calls..
SSKEnvironment.shared.callMessageHandler = NoopCallMessageHandler()
SSKEnvironment.shared.notificationsManager = NoopNotificationsManager()
},
migrationCompletion: { [weak self] in
self?.versionMigrationsDidComplete()
}
)
NotificationCenter.default.addObserver(self,
selector: #selector(storageIsReady),
name: .StorageIsReady,
object: nil)
Logger.info("completed.")
}
override func serviceExtensionTimeWillExpire() {
// Called just before the extension will be terminated by the system.
// Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used.
if let contentHandler = contentHandler, let notificationContent = notificationContent {
contentHandler(notificationContent)
}
}
func wasReceivedByUD(envelope: SSKProtoEnvelope) -> Bool {
return (envelope.type == .unidentifiedSender && (!envelope.hasSource || envelope.source!.count < 1))
}
@objc
func versionMigrationsDidComplete() {
AssertIsOnMainThread()
Logger.debug("")
areVersionMigrationsComplete = true
checkIsAppReady()
}
@objc
func storageIsReady() {
AssertIsOnMainThread()
Logger.debug("")
checkIsAppReady()
}
@objc
func checkIsAppReady() {
AssertIsOnMainThread()
// Only mark the app as ready once.
guard !AppReadiness.isAppReady() else { return }
// App isn't ready until storage is ready AND all version migrations are complete.
guard OWSStorage.isStorageReady() && areVersionMigrationsComplete else { return }
// Note that this does much more than set a flag; it will also run all deferred blocks.
AppReadiness.setAppIsReady()
// AppVersion.sharedInstance().nseLaunchDidComplete()
}
func completeSilenty() {
contentHandler?(.init())
}
func completeWithFailure(content: UNMutableNotificationContent) {
content.body = "You've got a new message."
content.title = "Session"
contentHandler?(content)
}
}

View File

@ -0,0 +1,94 @@
//
// Copyright (c) 2020 Open Whisper Systems. All rights reserved.
//
import Foundation
import SignalServiceKit
import SignalMessaging
class NotificationServiceExtensionContext: NSObject, AppContext {
var wasWokenUpBySilentPushNotification: Bool = true
var openSystemSettingsAction: UIAlertAction?
let isMainApp = false
let isMainAppAndActive = false
func isInBackground() -> Bool { true }
func isAppForegroundAndActive() -> Bool { false }
func mainApplicationStateOnLaunch() -> UIApplication.State { .inactive }
var shouldProcessIncomingMessages: Bool { true }
func canPresentNotifications() -> Bool { true }
let appLaunchTime = Date()
lazy var buildTime: Date = {
guard let buildTimestamp = Bundle.main.object(forInfoDictionaryKey: "BuildTimestamp") as? TimeInterval, buildTimestamp > 0 else {
Logger.debug("No build timestamp, assuming app never expires.")
return .distantFuture
}
return .init(timeIntervalSince1970: buildTimestamp)
}()
func keychainStorage() -> SSKKeychainStorage {
return SSKDefaultKeychainStorage.shared
}
func appDocumentDirectoryPath() -> String {
guard let documentDirectoryURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).last else {
owsFail("failed to query document directory")
}
return documentDirectoryURL.path
}
func appSharedDataDirectoryPath() -> String {
guard let groupContainerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: SignalApplicationGroup) else {
owsFail("failed to query group container")
}
return groupContainerURL.path
}
func appDatabaseBaseDirectoryPath() -> String {
return appSharedDataDirectoryPath()
}
func appUserDefaults() -> UserDefaults {
guard let userDefaults = UserDefaults(suiteName: SignalApplicationGroup) else {
owsFail("failed to initialize user defaults")
}
return userDefaults
}
override init() { super.init() }
// MARK: - Unused in this extension
let isRTL = false
let isRunningTests = false
var mainWindow: UIWindow?
let frame: CGRect = .zero
let interfaceOrientation: UIInterfaceOrientation = .unknown
let reportedApplicationState: UIApplication.State = .background
let statusBarHeight: CGFloat = .zero
func beginBackgroundTask(expirationHandler: @escaping BackgroundTaskExpirationHandler) -> UInt { 0 }
func endBackgroundTask(_ backgroundTaskIdentifier: UInt) {}
func beginBackgroundTask(expirationHandler: @escaping BackgroundTaskExpirationHandler) -> UIBackgroundTaskIdentifier { .invalid }
func endBackgroundTask(_ backgroundTaskIdentifier: UIBackgroundTaskIdentifier) {}
func ensureSleepBlocking(_ shouldBeBlocking: Bool, blockingObjectsDescription: String) {}
func setMainAppBadgeNumber(_ value: Int) {}
func setStatusBarHidden(_ isHidden: Bool, animated isAnimated: Bool) {}
func frontmostViewController() -> UIViewController? { nil }
func setNetworkActivityIndicatorVisible(_ value: Bool) {}
func runNowOr(whenMainAppIsActive block: @escaping AppActiveBlock) {}
func ensureSleepBlocking(_ shouldBeBlocking: Bool, blockingObjects: [Any]) {}
}

View File

@ -88,6 +88,12 @@ target 'SignalShareExtension' do
shared_pods
end
target 'LokiPushNotificationService' do
project 'Signal'
pod 'CryptoSwift', '~> 1.0', :inhibit_warnings => true
shared_pods
end
target 'SignalMessaging' do
project 'Signal'
shared_pods

View File

@ -60,7 +60,6 @@ PODS:
- Mantle (2.1.0):
- Mantle/extobjc (= 2.1.0)
- Mantle/extobjc (2.1.0)
- Mixpanel (3.4.7)
- NVActivityIndicatorView (4.7.0):
- NVActivityIndicatorView/Presenter (= 4.7.0)
- NVActivityIndicatorView/Presenter (4.7.0)
@ -220,7 +219,6 @@ DEPENDENCIES:
- HKDFKit (from `https://github.com/signalapp/HKDFKit.git`)
- HKDFKit/Tests (from `https://github.com/signalapp/HKDFKit.git`)
- Mantle (from `https://github.com/signalapp/Mantle`, branch `signal-master`)
- Mixpanel (~> 3.4)
- NVActivityIndicatorView (~> 4.7)
- PromiseKit (= 6.5.3)
- PureLayout
@ -249,7 +247,6 @@ SPEC REPOS:
- GCDWebServer
- GoogleUtilities
- libPhoneNumber-iOS
- Mixpanel
- NVActivityIndicatorView
- PromiseKit
- PureLayout
@ -331,7 +328,6 @@ SPEC CHECKSUMS:
HKDFKit: 3b6dbbb9d59c221cc6c52c3aa915700cbf24e376
libPhoneNumber-iOS: e444379ac18bbfbdefad571da735b2cd7e096caa
Mantle: 2fa750afa478cd625a94230fbf1c13462f29395b
Mixpanel: 696e0a1c7f2685aa06bb23829b7a58ab7203d6c7
NVActivityIndicatorView: b19ddab2576f805cbe0fb2306cba3476e09a1dea
PromiseKit: c609029bdd801f792551a504c695c7d3098b42cd
PureLayout: f08c01b8dec00bb14a1fefa3de4c7d9c265df85e
@ -347,6 +343,6 @@ SPEC CHECKSUMS:
YapDatabase: b418a4baa6906e8028748938f9159807fd039af4
YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54
PODFILE CHECKSUM: 156b349e2791f53224143291e318592b9c1f7ade
PODFILE CHECKSUM: 472252f3a4801d0d14d9553ff33cf52ef0846dc3
COCOAPODS: 1.5.3

View File

@ -331,6 +331,7 @@
34EA69422194DE8000702471 /* MediaUploadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34EA69412194DE7F00702471 /* MediaUploadView.swift */; };
34F308A21ECB469700BB7697 /* OWSBezierPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F308A11ECB469700BB7697 /* OWSBezierPathView.m */; };
34FDB29221FF986600A01202 /* UIView+OWS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FDB29121FF986600A01202 /* UIView+OWS.swift */; };
390650A6D345BFE01E006DB0 /* Pods_LokiPushNotificationService.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04912E453971FB16E5E78EC6 /* Pods_LokiPushNotificationService.framework */; };
4503F1BE20470A5B00CEE724 /* classic-quiet.aifc in Resources */ = {isa = PBXBuildFile; fileRef = 4503F1BB20470A5B00CEE724 /* classic-quiet.aifc */; };
4503F1BF20470A5B00CEE724 /* classic.aifc in Resources */ = {isa = PBXBuildFile; fileRef = 4503F1BC20470A5B00CEE724 /* classic.aifc */; };
4503F1C3204711D300CEE724 /* OWS107LegacySounds.m in Sources */ = {isa = PBXBuildFile; fileRef = 4503F1C1204711D200CEE724 /* OWS107LegacySounds.m */; };
@ -519,6 +520,11 @@
768A1A2B17FC9CD300E00ED8 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 768A1A2A17FC9CD300E00ED8 /* libz.dylib */; };
76C87F19181EFCE600C4ACAB /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76C87F18181EFCE600C4ACAB /* MediaPlayer.framework */; };
76EB054018170B33006006FC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 76EB03C318170B33006006FC /* AppDelegate.m */; };
7BC01A3E241F40AB00BC7C55 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BC01A3D241F40AB00BC7C55 /* NotificationService.swift */; };
7BC01A42241F40AB00BC7C55 /* LokiPushNotificationService.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 7BC01A3B241F40AB00BC7C55 /* LokiPushNotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
7BDCFC08242186E700641C39 /* NotificationServiceExtensionContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BDCFC07242186E700641C39 /* NotificationServiceExtensionContext.swift */; };
7BDCFC092421894900641C39 /* MessageFetcherJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 452ECA4C1E087E7200E2F016 /* MessageFetcherJob.swift */; };
7BDCFC0B2421EB7600641C39 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = B6F509951AA53F760068F56A /* Localizable.strings */; };
954AEE6A1DF33E01002E5410 /* ContactsPickerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 954AEE681DF33D32002E5410 /* ContactsPickerTest.swift */; };
A10FDF79184FB4BB007FF963 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76C87F18181EFCE600C4ACAB /* MediaPlayer.framework */; };
A11CD70D17FA230600A2D1B1 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A11CD70C17FA230600A2D1B1 /* QuartzCore.framework */; };
@ -676,6 +682,13 @@
remoteGlobalIDString = 453518911FC63DBF00210559;
remoteInfo = SignalMessaging;
};
7BC01A40241F40AB00BC7C55 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D221A080169C9E5E00537ABF /* Project object */;
proxyType = 1;
remoteGlobalIDString = 7BC01A3A241F40AB00BC7C55;
remoteInfo = LokiPushNotificationService;
};
B6AFCEBA19A93DA60098CFCB /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D221A080169C9E5E00537ABF /* Project object */;
@ -692,6 +705,7 @@
dstPath = "";
dstSubfolderSpec = 13;
files = (
7BC01A42241F40AB00BC7C55 /* LokiPushNotificationService.appex in Embed App Extensions */,
453518721FC635DD00210559 /* SignalShareExtension.appex in Embed App Extensions */,
);
name = "Embed App Extensions";
@ -711,7 +725,9 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
04912E453971FB16E5E78EC6 /* Pods_LokiPushNotificationService.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LokiPushNotificationService.framework; sourceTree = BUILT_PRODUCTS_DIR; };
0F94C85CB0B235DA37F68ED0 /* Pods_SignalShareExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SignalShareExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; };
18D19142FD6E60FD0A5D89F7 /* Pods-LokiPushNotificationService.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LokiPushNotificationService.app store release.xcconfig"; path = "Pods/Target Support Files/Pods-LokiPushNotificationService/Pods-LokiPushNotificationService.app store release.xcconfig"; sourceTree = "<group>"; };
1C93CF3971B64E8B6C1F9AC1 /* Pods-SignalShareExtension.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalShareExtension.test.xcconfig"; path = "Pods/Target Support Files/Pods-SignalShareExtension/Pods-SignalShareExtension.test.xcconfig"; sourceTree = "<group>"; };
1CE3CD5C23334683BDD3D78C /* Pods-Signal.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Signal.test.xcconfig"; path = "Pods/Target Support Files/Pods-Signal/Pods-Signal.test.xcconfig"; sourceTree = "<group>"; };
2400888D239F30A600305217 /* SessionRestorationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionRestorationView.swift; sourceTree = "<group>"; };
@ -1342,6 +1358,11 @@
76C87F18181EFCE600C4ACAB /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
76EB03C218170B33006006FC /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
76EB03C318170B33006006FC /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
7BC01A3B241F40AB00BC7C55 /* LokiPushNotificationService.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = LokiPushNotificationService.appex; sourceTree = BUILT_PRODUCTS_DIR; };
7BC01A3D241F40AB00BC7C55 /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = "<group>"; };
7BC01A3F241F40AB00BC7C55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
7BDCFC0424206E7300641C39 /* LokiPushNotificationService.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LokiPushNotificationService.entitlements; sourceTree = "<group>"; };
7BDCFC07242186E700641C39 /* NotificationServiceExtensionContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotificationServiceExtensionContext.swift; sourceTree = "<group>"; };
8981C8F64D94D3C52EB67A2C /* Pods-SignalTests.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalTests.test.xcconfig"; path = "Pods/Target Support Files/Pods-SignalTests/Pods-SignalTests.test.xcconfig"; sourceTree = "<group>"; };
8EEE74B0753448C085B48721 /* Pods-SignalMessaging.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalMessaging.app store release.xcconfig"; path = "Pods/Target Support Files/Pods-SignalMessaging/Pods-SignalMessaging.app store release.xcconfig"; sourceTree = "<group>"; };
948239851C08032C842937CC /* Pods-SignalMessaging.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalMessaging.test.xcconfig"; path = "Pods/Target Support Files/Pods-SignalMessaging/Pods-SignalMessaging.test.xcconfig"; sourceTree = "<group>"; };
@ -1492,6 +1513,7 @@
E85DB184824BA9DC302EC8B3 /* Pods-SignalTests.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalTests.app store release.xcconfig"; path = "Pods/Target Support Files/Pods-SignalTests/Pods-SignalTests.app store release.xcconfig"; sourceTree = "<group>"; };
EF764C331DB67CC5000D9A87 /* UIViewController+Permissions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+Permissions.h"; path = "util/UIViewController+Permissions.h"; sourceTree = "<group>"; };
EF764C341DB67CC5000D9A87 /* UIViewController+Permissions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+Permissions.m"; path = "util/UIViewController+Permissions.m"; sourceTree = "<group>"; };
F62ECF7B8AF4F8089AA705B3 /* Pods-LokiPushNotificationService.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LokiPushNotificationService.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LokiPushNotificationService/Pods-LokiPushNotificationService.debug.xcconfig"; sourceTree = "<group>"; };
FC3BD9871A30A790005B96BB /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; };
FC5CDF371A3393DD00B47253 /* error_white@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "error_white@2x.png"; sourceTree = "<group>"; };
FC5CDF381A3393DD00B47253 /* warning_white@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "warning_white@2x.png"; sourceTree = "<group>"; };
@ -1517,6 +1539,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
7BC01A38241F40AB00BC7C55 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
390650A6D345BFE01E006DB0 /* Pods_LokiPushNotificationService.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D221A086169C9E5E00537ABF /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@ -2596,6 +2626,17 @@
path = views;
sourceTree = "<group>";
};
7BC01A3C241F40AB00BC7C55 /* LokiPushNotificationService */ = {
isa = PBXGroup;
children = (
7BDCFC07242186E700641C39 /* NotificationServiceExtensionContext.swift */,
7BDCFC0424206E7300641C39 /* LokiPushNotificationService.entitlements */,
7BC01A3D241F40AB00BC7C55 /* NotificationService.swift */,
7BC01A3F241F40AB00BC7C55 /* Info.plist */,
);
path = LokiPushNotificationService;
sourceTree = "<group>";
};
9404664EC513585B05DF1350 /* Pods */ = {
isa = PBXGroup;
children = (
@ -2611,6 +2652,8 @@
9B533A9FA46206D3D99C9ADA /* Pods-SignalMessaging.debug.xcconfig */,
948239851C08032C842937CC /* Pods-SignalMessaging.test.xcconfig */,
8EEE74B0753448C085B48721 /* Pods-SignalMessaging.app store release.xcconfig */,
F62ECF7B8AF4F8089AA705B3 /* Pods-LokiPushNotificationService.debug.xcconfig */,
18D19142FD6E60FD0A5D89F7 /* Pods-LokiPushNotificationService.app store release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
@ -2856,6 +2899,7 @@
D221A093169C9E5E00537ABF /* Signal */,
453518691FC635DD00210559 /* SignalShareExtension */,
453518931FC63DBF00210559 /* SignalMessaging */,
7BC01A3C241F40AB00BC7C55 /* LokiPushNotificationService */,
D221A08C169C9E5E00537ABF /* Frameworks */,
D221A08A169C9E5E00537ABF /* Products */,
9404664EC513585B05DF1350 /* Pods */,
@ -2869,6 +2913,7 @@
D221A0AA169C9E5F00537ABF /* SignalTests.xctest */,
453518681FC635DD00210559 /* SignalShareExtension.appex */,
453518921FC63DBF00210559 /* SignalMessaging.framework */,
7BC01A3B241F40AB00BC7C55 /* LokiPushNotificationService.appex */,
);
name = Products;
sourceTree = "<group>";
@ -2914,6 +2959,7 @@
0F94C85CB0B235DA37F68ED0 /* Pods_SignalShareExtension.framework */,
748A5CAEDD7C919FC64C6807 /* Pods_SignalTests.framework */,
264242150E87D10A357DB07B /* Pods_SignalMessaging.framework */,
04912E453971FB16E5E78EC6 /* Pods_LokiPushNotificationService.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@ -3082,6 +3128,24 @@
productReference = 453518921FC63DBF00210559 /* SignalMessaging.framework */;
productType = "com.apple.product-type.framework";
};
7BC01A3A241F40AB00BC7C55 /* LokiPushNotificationService */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7BC01A45241F40AB00BC7C55 /* Build configuration list for PBXNativeTarget "LokiPushNotificationService" */;
buildPhases = (
4B4609DACEC6E462A2394D2F /* [CP] Check Pods Manifest.lock */,
7BC01A37241F40AB00BC7C55 /* Sources */,
7BC01A38241F40AB00BC7C55 /* Frameworks */,
7BC01A39241F40AB00BC7C55 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = LokiPushNotificationService;
productName = LokiPushNotificationService;
productReference = 7BC01A3B241F40AB00BC7C55 /* LokiPushNotificationService.appex */;
productType = "com.apple.product-type.app-extension";
};
D221A088169C9E5E00537ABF /* Signal */ = {
isa = PBXNativeTarget;
buildConfigurationList = D221A0BC169C9E5F00537ABF /* Build configuration list for PBXNativeTarget "Signal" */;
@ -3103,6 +3167,7 @@
dependencies = (
453518711FC635DD00210559 /* PBXTargetDependency */,
453518981FC63DBF00210559 /* PBXTargetDependency */,
7BC01A41241F40AB00BC7C55 /* PBXTargetDependency */,
);
name = Signal;
productName = RedPhone;
@ -3137,7 +3202,8 @@
D221A080169C9E5E00537ABF /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
DefaultBuildSystemTypeForWorkspace = Original;
LastSwiftUpdateCheck = 1130;
LastTestingUpgradeCheck = 0600;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "Open Whisper Systems";
@ -3168,6 +3234,11 @@
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
7BC01A3A241F40AB00BC7C55 = {
CreatedOnToolsVersion = 11.3.1;
DevelopmentTeam = SUQ8J2PCT7;
ProvisioningStyle = Automatic;
};
D221A088169C9E5E00537ABF = {
DevelopmentTeam = SUQ8J2PCT7;
LastSwiftMigration = 1020;
@ -3280,6 +3351,7 @@
D221A0A9169C9E5F00537ABF /* SignalTests */,
453518671FC635DD00210559 /* SignalShareExtension */,
453518911FC63DBF00210559 /* SignalMessaging */,
7BC01A3A241F40AB00BC7C55 /* LokiPushNotificationService */,
);
};
/* End PBXProject section */
@ -3307,6 +3379,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
7BC01A39241F40AB00BC7C55 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7BDCFC0B2421EB7600641C39 /* Localizable.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D221A087169C9E5E00537ABF /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@ -3495,6 +3575,28 @@
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\n# disabled for now. too many lint errors outside of the scope of this branch\n#(cd Signal && swiftlint)\n# never fail.\nexit 0\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
};
4B4609DACEC6E462A2394D2F /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-LokiPushNotificationService-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
59C9DBA462715B5C999FFB02 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -3513,7 +3615,6 @@
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
"${BUILT_PRODUCTS_DIR}/HKDFKit/HKDFKit.framework",
"${BUILT_PRODUCTS_DIR}/Mantle/Mantle.framework",
"${BUILT_PRODUCTS_DIR}/Mixpanel/Mixpanel.framework",
"${BUILT_PRODUCTS_DIR}/NVActivityIndicatorView/NVActivityIndicatorView.framework",
"${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework",
"${BUILT_PRODUCTS_DIR}/PureLayout/PureLayout.framework",
@ -3543,7 +3644,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HKDFKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mantle.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mixpanel.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NVActivityIndicatorView.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PromiseKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PureLayout.framework",
@ -3850,6 +3950,16 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
7BC01A37241F40AB00BC7C55 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7BDCFC08242186E700641C39 /* NotificationServiceExtensionContext.swift in Sources */,
7BC01A3E241F40AB00BC7C55 /* NotificationService.swift in Sources */,
7BDCFC092421894900641C39 /* MessageFetcherJob.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D221A085169C9E5E00537ABF /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@ -4171,6 +4281,11 @@
target = 453518911FC63DBF00210559 /* SignalMessaging */;
targetProxy = 453518971FC63DBF00210559 /* PBXContainerItemProxy */;
};
7BC01A41241F40AB00BC7C55 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 7BC01A3A241F40AB00BC7C55 /* LokiPushNotificationService */;
targetProxy = 7BC01A40241F40AB00BC7C55 /* PBXContainerItemProxy */;
};
B6AFCEBB19A93DA60098CFCB /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = D221A088169C9E5E00537ABF /* Signal */;
@ -4487,6 +4602,117 @@
};
name = "App Store Release";
};
7BC01A43241F40AB00BC7C55 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F62ECF7B8AF4F8089AA705B3 /* Pods-LokiPushNotificationService.debug.xcconfig */;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = LokiPushNotificationService/LokiPushNotificationService.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = SUQ8J2PCT7;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = LokiPushNotificationService/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.loki-project.loki-messenger.LokiPushNotificationService";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
7BC01A44241F40AB00BC7C55 /* App Store Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 18D19142FD6E60FD0A5D89F7 /* Pods-LokiPushNotificationService.app store release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_ENTITLEMENTS = LokiPushNotificationService/LokiPushNotificationService.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = SUQ8J2PCT7;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = LokiPushNotificationService/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.loki-project.loki-messenger.LokiPushNotificationService";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = "App Store Release";
};
D221A0BA169C9E5F00537ABF /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -4912,6 +5138,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "App Store Release";
};
7BC01A45241F40AB00BC7C55 /* Build configuration list for PBXNativeTarget "LokiPushNotificationService" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7BC01A43241F40AB00BC7C55 /* Debug */,
7BC01A44241F40AB00BC7C55 /* App Store Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "App Store Release";
};
D221A083169C9E5E00537ABF /* Build configuration list for PBXProject "Signal" */ = {
isa = XCConfigurationList;
buildConfigurations = (

View File

@ -28,7 +28,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A16588799C7A0AB3A5ACEF8339CCB8BC"
BlueprintIdentifier = "56FEAC3FCA8ADA9B6D3602FBA38B2527"
BuildableName = "SignalServiceKit.framework"
BlueprintName = "SignalServiceKit"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -72,7 +72,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "24F8DED46F845407BED93AD1BC0D4E85"
BlueprintIdentifier = "3FC719A0D2B2FA321E696D83720CAC6F"
BuildableName = "SignalServiceKit-Unit-Tests.xctest"
BlueprintName = "SignalServiceKit-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -82,7 +82,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3966AB1BF4A267B3775E55BB346C42BB"
BlueprintIdentifier = "3AC929F2E4978F42ED9E9EA232D7247B"
BuildableName = "SignalCoreKit-Unit-Tests.xctest"
BlueprintName = "SignalCoreKit-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -92,7 +92,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FBEFD7D60C586B4EBC4A2D8A609B1884"
BlueprintIdentifier = "5B34FB0B5ABA685EF33F1BA1C388F016"
BuildableName = "AxolotlKit-Unit-Tests.xctest"
BlueprintName = "AxolotlKit-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -102,7 +102,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "217139450FBCFCCE72F03EFEE0C5DA38"
BlueprintIdentifier = "D85B45003BA81D72F606FDF3EB4B4E1C"
BuildableName = "Curve25519Kit-Unit-Tests.xctest"
BlueprintName = "Curve25519Kit-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -112,7 +112,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CB39B3A5A9E8A82A835D8CD5DEBB7CDC"
BlueprintIdentifier = "F9C2DA0BADF4F69559F0AA5BB4FC1E06"
BuildableName = "HKDFKit-Unit-Tests.xctest"
BlueprintName = "HKDFKit-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -122,7 +122,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B620B404CB76E484E77870B9AD32320E"
BlueprintIdentifier = "92057C418B970541FF6BE6E64A49D8C2"
BuildableName = "SignalMetadataKit-Unit-Tests.xctest"
BlueprintName = "SignalMetadataKit-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">

View File

@ -5,15 +5,11 @@
<key>BuildDetails</key>
<dict>
<key>CarthageVersion</key>
<string>0.33.0</string>
<key>DateTime</key>
<string>Fri Mar 6 00:51:56 UTC 2020</string>
<string>0.34.0</string>
<key>OSXVersion</key>
<string>10.15.3</string>
<key>WebRTCCommit</key>
<string>1445d719bf05280270e9f77576f80f973fd847f8 M73</string>
<key>XCodeVersion</key>
<string>1100.1130</string>
</dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>

View File

@ -255,10 +255,10 @@ NS_ASSUME_NONNULL_BEGIN
OWSFailDebug(@"Not registered.");
return;
}
if (!CurrentAppContext().isMainApp) {
OWSFail(@"Not the main app.");
return;
}
// if (!CurrentAppContext().isMainApp) {
// OWSFail(@"Not the main app.");
// return;
// }
OWSLogInfo(@"Handling decrypted envelope: %@.", [self descriptionForEnvelope:envelope]);
@ -1881,6 +1881,15 @@ NS_ASSUME_NONNULL_BEGIN
if (incomingMessage.isFriendRequest) {
[thread removeOldIncomingFriendRequestMessagesIfNeededWithTransaction:transaction];
}
//
// if (!CurrentAppContext().isMainApp) {
// dispatch_async(dispatch_get_main_queue(), ^{
// [self.typingIndicators didReceiveIncomingMessageInThread:masterThread
// recipientId:(masterThread.contactIdentifier ?: envelope.source)
// deviceId:envelope.sourceDevice];
// });
// return;
// }
// Any messages sent from the current user - from this device or another - should be automatically marked as read.
if ([(masterThread.contactIdentifier ?: envelope.source) isEqualToString:self.tsAccountManager.localNumber]) {

View File

@ -60,6 +60,11 @@ public class TypingIndicatorMessage: TSOutgoingMessage {
public override var isOnline: Bool {
return true
}
@objc
public override var ttl: UInt32 {
return UInt32(10 * kMinuteInMs)
}
private func protoAction(forAction action: TypingIndicatorAction) -> SSKProtoTypingMessage.SSKProtoTypingMessageAction {
switch action {

View File

@ -29,4 +29,9 @@ public class FeatureFlags: NSObject {
public static var useCustomPhotoCapture: Bool {
return true
}
@objc
public static var notificationServiceExtension: Bool {
return true
}
}