The NSE should only run on iOS 13.3 or later where the "filtering" entitlement is available since our notifications don't contain any content and will often not trigger any user visible content. We control this by setting the deployment target to iOS 13.3. This does not handle calls as it's currently impossible to wake the main app or launch CallKit from within the NSE. Should we reach a point where we need to use this extension in production the service will need to be able to differentiate between call and non-call messages and deliver them as VOIP or Vanilla pushes as appropriate. Alternatively, Apple may introduce some way for us to signal the main app that a call message has been received. This does not currently address the potential for the NSE and the main app to be running and trying to process messages at the same time. As long as the websocket is connected and the main app is processing messages in a timely fashion the NSE will never be called since the service will not send pushes for these messages, but censorship circumvention users and users where the websocket is disconnected for some reason will legitimately receive pushes and we will want to process those messages. How we will handle these cases requires further thought since just terminating the NSE when the app launches is not sufficient. We could potentially do something like terminate the NSE everytime the main app runs the message fetcher job which should only happen if either the user pulls-to-refresh on the conversation list or the websocket is actively connected and receiving messsages. I plan to address this in a follow-up pull request. Currently this code will not ever be run since the service never sends vanilla push notifications. Eventually we will need to add logic into the main app to: a) detect we're on iOS 13.3 or later and b) update a flag on the service telling it to stop using VOIP pushes for non-call messages. The API for requesting this from the service does not yet exist.
156 lines
5.9 KiB
Ruby
156 lines
5.9 KiB
Ruby
platform :ios, '10.0'
|
|
plugin 'cocoapods-binary'
|
|
|
|
use_frameworks!
|
|
|
|
###
|
|
# OWS Pods
|
|
###
|
|
|
|
pod 'SignalCoreKit', git: 'https://github.com/signalapp/SignalCoreKit.git', testspecs: ["Tests"]
|
|
# pod 'SignalCoreKit', path: '../SignalCoreKit', testspecs: ["Tests"]
|
|
|
|
pod 'AxolotlKit', git: 'https://github.com/signalapp/SignalProtocolKit.git', branch: 'master', testspecs: ["Tests"]
|
|
# pod 'AxolotlKit', path: '../SignalProtocolKit', testspecs: ["Tests"]
|
|
|
|
pod 'HKDFKit', git: 'https://github.com/signalapp/HKDFKit.git', testspecs: ["Tests"]
|
|
# pod 'HKDFKit', path: '../HKDFKit', testspecs: ["Tests"]
|
|
|
|
pod 'Curve25519Kit', git: 'https://github.com/signalapp/Curve25519Kit', testspecs: ["Tests"]
|
|
# pod 'Curve25519Kit', path: '../Curve25519Kit', testspecs: ["Tests"]
|
|
|
|
pod 'SignalMetadataKit', git: 'https://github.com/signalapp/SignalMetadataKit', testspecs: ["Tests"]
|
|
# pod 'SignalMetadataKit', path: '../SignalMetadataKit', testspecs: ["Tests"]
|
|
|
|
pod 'blurhash', git: 'https://github.com/signalapp/blurhash', branch: 'addPodspec'
|
|
|
|
pod 'SignalServiceKit', path: '.', testspecs: ["Tests"]
|
|
|
|
pod 'ZKGroup', git: 'https://github.com/signalapp/signal-zkgroup-swift', testspecs: ["Tests"]
|
|
# pod 'ZKGroup', path: '../signal-zkgroup-swift', testspecs: ["Tests"]
|
|
|
|
pod 'Argon2', git: 'https://github.com/signalapp/Argon2.git', submodules: true, testspecs: ["Tests"]
|
|
# pod 'Argon2', path: '../Argon2', testspecs: ["Tests"]
|
|
|
|
# Project does not compile with PromiseKit 6.7.1
|
|
# see: https://github.com/mxcl/PromiseKit/issues/990
|
|
pod 'PromiseKit', "6.5.3"
|
|
|
|
# pod 'GRDB.swift/SQLCipher', path: '../GRDB.swift'
|
|
pod 'GRDB.swift/SQLCipher'
|
|
|
|
pod 'SQLCipher', ">= 4.0.1"
|
|
|
|
###
|
|
# forked third party pods
|
|
###
|
|
|
|
# Forked for performance optimizations that are not likely to be upstreamed as they are specific
|
|
# to our limited use of Mantle
|
|
pod 'Mantle', git: 'https://github.com/signalapp/Mantle', branch: 'signal-master'
|
|
# pod 'Mantle', path: '../Mantle'
|
|
|
|
# Forked for compatibily with the ShareExtension, changes have an open PR, but have not been merged.
|
|
pod 'YapDatabase/SQLCipher', :git => 'https://github.com/signalapp/YapDatabase.git', branch: 'signal-release'
|
|
# pod 'YapDatabase/SQLCipher', path: '../YapDatabase'
|
|
|
|
# Forked to incorporate our self-built binary artifact.
|
|
pod 'GRKOpenSSLFramework', git: 'https://github.com/signalapp/GRKOpenSSLFramework', branch: 'mkirk/1.0.2t'
|
|
#pod 'GRKOpenSSLFramework', path: '../GRKOpenSSLFramework'
|
|
|
|
pod 'Starscream', git: 'https://github.com/signalapp/Starscream.git', branch: 'signal-release'
|
|
# pod 'Starscream', path: '../Starscream'
|
|
|
|
pod 'libPhoneNumber-iOS', git: 'https://github.com/signalapp/libPhoneNumber-iOS', branch: 'signal-master'
|
|
# pod 'libPhoneNumber-iOS', path: '../libPhoneNumber-iOS'
|
|
|
|
###
|
|
# third party pods
|
|
####
|
|
|
|
pod 'AFNetworking', inhibit_warnings: true
|
|
pod 'PureLayout', :inhibit_warnings => true
|
|
pod 'Reachability', :inhibit_warnings => true
|
|
pod 'lottie-ios', :inhibit_warnings => true
|
|
pod 'YYImage', :inhibit_warnings => true
|
|
pod 'ZXingObjC', git: 'https://github.com/TheLevelUp/ZXingObjC', :binary => true
|
|
|
|
target 'Signal' do
|
|
# Pods only available inside the main Signal app
|
|
pod 'SSZipArchive', :inhibit_warnings => true
|
|
pod 'SignalRingRTC', path: 'ThirdParty/SignalRingRTC.podspec', inhibit_wranings: true
|
|
|
|
target 'SignalTests' do
|
|
inherit! :search_paths
|
|
end
|
|
|
|
target 'SignalPerformanceTests' do
|
|
inherit! :search_paths
|
|
end
|
|
end
|
|
|
|
# These extensions inherit all of the pods
|
|
target 'SignalShareExtension'
|
|
target 'SignalMessaging'
|
|
target 'NotificationServiceExtension'
|
|
|
|
post_install do |installer|
|
|
enable_extension_support_for_purelayout(installer)
|
|
configure_warning_flags(installer)
|
|
configure_testable_build(installer)
|
|
disable_bitcode(installer)
|
|
end
|
|
|
|
# PureLayout by default makes use of UIApplication, and must be configured to be built for an extension.
|
|
def enable_extension_support_for_purelayout(installer)
|
|
installer.pods_project.targets.each do |target|
|
|
if target.name.end_with? "PureLayout"
|
|
target.build_configurations.each do |build_configuration|
|
|
if build_configuration.build_settings['APPLICATION_EXTENSION_API_ONLY'] == 'YES'
|
|
build_configuration.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = ['$(inherited)', 'PURELAYOUT_APP_EXTENSIONS=1']
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
# We want some warning to be treated as errors.
|
|
#
|
|
# NOTE: We have to manually keep this list in sync with what's in our
|
|
# Signal.xcodeproj config in Xcode go to:
|
|
# Signal Project > Build Settings > Other Warning Flags
|
|
def configure_warning_flags(installer)
|
|
installer.pods_project.targets.each do |target|
|
|
target.build_configurations.each do |build_configuration|
|
|
build_configuration.build_settings['WARNING_CFLAGS'] = ['$(inherited)',
|
|
'-Werror=incompatible-pointer-types',
|
|
'-Werror=protocol',
|
|
'-Werror=incomplete-implementation',
|
|
'-Werror=objc-literal-conversion']
|
|
end
|
|
end
|
|
end
|
|
|
|
def configure_testable_build(installer)
|
|
installer.pods_project.targets.each do |target|
|
|
target.build_configurations.each do |build_configuration|
|
|
next unless ["Testable Release", "Debug"].include?(build_configuration.name)
|
|
|
|
build_configuration.build_settings['OTHER_CFLAGS'] ||= '$(inherited) -DTESTABLE_BUILD'
|
|
build_configuration.build_settings['OTHER_SWIFT_FLAGS'] ||= '$(inherited) -DTESTABLE_BUILD'
|
|
build_configuration.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= '$(inherited) TESTABLE_BUILD=1'
|
|
build_configuration.build_settings['ENABLE_TESTABILITY'] = 'YES'
|
|
build_configuration.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
|
|
end
|
|
end
|
|
end
|
|
|
|
|
|
def disable_bitcode(installer)
|
|
installer.pods_project.targets.each do |target|
|
|
target.build_configurations.each do |config|
|
|
config.build_settings['ENABLE_BITCODE'] = 'NO'
|
|
end
|
|
end
|
|
end
|