CocoaPods: Set IPHONEOS_DEPLOYMENT_TARGET, and bump it to 12.2

By default, Rust targets iOS 7, which is unnecessary but fine for our
purposes. However, BoringSSL has some assembly files that were getting
compiled for the "latest" version (based on the SDK). Address both of
these by setting IPHONEOS_DEPLOYMENT_TARGET explicitly when building
as a CocoaPod.

While here, bump the CocoaPod minimum iOS version to 12.2, which
matches the main Signal app and will allow SignalCoreKit to do the
same.
This commit is contained in:
Jordan Rose
2022-08-30 13:28:39 -07:00
parent d270e06127
commit aead532aaf

View File

@@ -14,7 +14,10 @@ Pod::Spec.new do |s|
s.source = { :git => 'https://github.com/signalapp/libsignal.git', :tag => "v#{s.version}" }
s.swift_version = '5'
s.platform = :ios, '10'
# We use this to set IPHONEOS_DEPLOYMENT_TARGET below.
# The Rust compiler driver expects this to always be in the form 'major.minor'.
min_deployment_target = '12.2'
s.platform = :ios, min_deployment_target
s.dependency 'SignalCoreKit'
@@ -67,8 +70,9 @@ Pod::Spec.new do |s|
}
]
s.prepare_command = %q(
s.prepare_command = %Q(
set -euo pipefail
export IPHONEOS_DEPLOYMENT_TARGET=#{min_deployment_target}
CARGO_BUILD_TARGET=aarch64-apple-ios swift/build_ffi.sh --release
CARGO_BUILD_TARGET=x86_64-apple-ios swift/build_ffi.sh --release
CARGO_BUILD_TARGET=aarch64-apple-ios-sim swift/build_ffi.sh --release