Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into auth-swift
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 committed May 8, 2024
2 parents e81bfdb + 317a553 commit 1a0d39a
Show file tree
Hide file tree
Showing 162 changed files with 671 additions and 515 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ jobs:
run: scripts/third_party/travis/retry.sh pod spec lint GoogleAppMeasurement.podspec --platforms=${{ matrix.target }} --sources=https://github.com/firebase/SpecsDev.git,https://github.com/firebase/SpecsStaging.git,https://cdn.cocoapods.org/
- name: FirebaseAnalytics
run: scripts/third_party/travis/retry.sh pod spec lint FirebaseAnalytics.podspec --platforms=${{ matrix.target }} --sources=https://github.com/firebase/SpecsDev.git,https://github.com/firebase/SpecsStaging.git,https://cdn.cocoapods.org/
- name: FirebaseAnalyticsSwift
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAnalyticsSwift.podspec --allow-warnings --platforms=${{ matrix.target }}
# The following steps are only run on `ios` due to product availability.
- name: GoogleAppMeasurementOnDeviceConversion
run: scripts/third_party/travis/retry.sh pod spec lint GoogleAppMeasurementOnDeviceConversion.podspec --platforms=ios --sources=https://github.com/firebase/SpecsDev.git,https://github.com/firebase/SpecsStaging.git,https://cdn.cocoapods.org/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
runs-on: macos-14
strategy:
matrix:
podspec: [FirebaseDatabase.podspec, FirebaseDatabaseSwift.podspec --allow-warnings]
podspec: [FirebaseDatabase.podspec]
target: [ios, tvos, macos]
flags: [
'--skip-tests --use-static-frameworks'
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/firestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ jobs:
podspec: [
'FirebaseFirestoreInternal.podspec',
'FirebaseFirestore.podspec',
'FirebaseFirestoreSwift.podspec',
]

steps:
Expand Down Expand Up @@ -391,7 +390,6 @@ jobs:
podspec: [
'FirebaseFirestoreInternal.podspec',
'FirebaseFirestore.podspec',
'FirebaseFirestoreSwift.podspec',
]
platforms: [
'macos',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/inappmessaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

strategy:
matrix:
podspec: [FirebaseInAppMessaging.podspec, FirebaseInAppMessagingSwift.podspec --allow-warnings]
podspec: [FirebaseInAppMessaging.podspec]
os: [macos-14, macos-13]
include:
- os: macos-14
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/remoteconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
matrix:
# TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532
target: [ios, tvos, macos --skip-tests, watchos]
podspec: [FirebaseRemoteConfig.podspec, FirebaseRemoteConfigSwift.podspec --allow-warnings --skip-tests]
podspec: [FirebaseRemoteConfig.podspec]
os: [macos-14, macos-13]
include:
- os: macos-14
Expand Down
42 changes: 29 additions & 13 deletions .github/workflows/zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ jobs:
run: |
mkdir -p release_zip_dir
sh -x scripts/build_zip.sh release_zip_dir \
"${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git' }}"
"${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git' }}" \
build-release \
static
- uses: actions/upload-artifact@v4
with:
name: Firebase-release-zip-zip
Expand All @@ -68,6 +70,9 @@ jobs:
# Don't run on private repo.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
needs: build
strategy:
matrix:
linking_type: [static, dynamic]
runs-on: macos-14
steps:
- uses: actions/checkout@v4
Expand All @@ -84,10 +89,11 @@ jobs:
mkdir -p zip_output_dir
sh -x scripts/build_zip.sh \
zip_output_dir "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git,https://github.com/firebase/SpecsDev.git' }}" \
build-head
build-head \
${{ matrix.linking_type }}
- uses: actions/upload-artifact@v4
with:
name: Firebase-actions-dir
name: ${{ matrix.linking_type == 'static' && 'Firebase-actions-dir' || 'Firebase-actions-dir-dynamic' }}
# Zip the entire output directory since the builder adds subdirectories we don't know the
# name of.
path: zip_output_dir
Expand All @@ -103,6 +109,7 @@ jobs:
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
- os: macos-13
xcode: Xcode_15.2
Expand All @@ -114,7 +121,7 @@ jobs:
- name: Get framework dir
uses: actions/download-artifact@v4
with:
name: Firebase-actions-dir
name: ${{ matrix.artifact }}
- uses: ruby/setup-ruby@v1
- name: Setup Bundler
run: ./scripts/setup_bundler.sh
Expand Down Expand Up @@ -164,6 +171,7 @@ jobs:
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
- os: macos-13
xcode: Xcode_15.2
Expand All @@ -175,7 +183,7 @@ jobs:
- name: Get framework dir
uses: actions/download-artifact@v4
with:
name: Firebase-actions-dir
name: ${{ matrix.artifact }}
- uses: ruby/setup-ruby@v1
- name: Setup Bundler
run: ./scripts/setup_bundler.sh
Expand Down Expand Up @@ -217,6 +225,7 @@ jobs:
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
- os: macos-13
xcode: Xcode_15.2
Expand All @@ -228,7 +237,7 @@ jobs:
- name: Get framework dir
uses: actions/download-artifact@v4
with:
name: Firebase-actions-dir
name: ${{ matrix.artifact }}
- uses: ruby/setup-ruby@v1
- name: Setup Bundler
run: ./scripts/setup_bundler.sh
Expand Down Expand Up @@ -268,6 +277,7 @@ jobs:
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
- os: macos-13
xcode: Xcode_15.2
Expand All @@ -279,7 +289,7 @@ jobs:
- name: Get framework dir
uses: actions/download-artifact@v4
with:
name: Firebase-actions-dir
name: ${{ matrix.artifact }}
- uses: ruby/setup-ruby@v1
- name: Setup Bundler
run: ./scripts/setup_bundler.sh
Expand Down Expand Up @@ -343,6 +353,7 @@ jobs:
matrix:
os: [macos-13]
xcode: [Xcode_15.2]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
# TODO: Building FirebaseUI fails on Xcode 15 because it needs to sign the resources.
# - os: macos-13
# xcode: Xcode_15.2
Expand All @@ -352,7 +363,7 @@ jobs:
- name: Get framework dir
uses: actions/download-artifact@v4
with:
name: Firebase-actions-dir
name: ${{ matrix.artifact }}
- uses: ruby/setup-ruby@v1
- name: Setup Bundler
run: ./scripts/setup_bundler.sh
Expand Down Expand Up @@ -396,6 +407,7 @@ jobs:
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
- os: macos-13
xcode: Xcode_15.2
Expand All @@ -407,7 +419,7 @@ jobs:
- name: Get framework dir
uses: actions/download-artifact@v4
with:
name: Firebase-actions-dir
name: ${{ matrix.artifact }}
- uses: ruby/setup-ruby@v1
- name: Setup Bundler
run: ./scripts/setup_bundler.sh
Expand Down Expand Up @@ -456,14 +468,15 @@ jobs:
# matrix:
# # TODO: Building FirebaseUI fails on Xcode 15 because it needs to sign the resources.
# os: [macos-13]
# artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
# xcode: [Xcode_15.2]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v4
# - name: Get framework dir
# uses: actions/download-artifact@v4
# with:
# name: Firebase-actions-dir
# name: ${{ matrix.artifact }}
# - uses: ruby/setup-ruby@v1
# - name: Setup Bundler
# run: ./scripts/setup_bundler.sh
Expand Down Expand Up @@ -536,6 +549,7 @@ jobs:
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
- os: macos-13
xcode: Xcode_15.2
Expand All @@ -547,7 +561,7 @@ jobs:
- name: Get framework dir
uses: actions/download-artifact@v4
with:
name: Firebase-actions-dir
name: ${{ matrix.artifact }}
- uses: ruby/setup-ruby@v1
- name: Setup Bundler
run: ./scripts/setup_bundler.sh
Expand Down Expand Up @@ -592,6 +606,7 @@ jobs:
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
- os: macos-13
xcode: Xcode_15.2
Expand All @@ -603,7 +618,7 @@ jobs:
- name: Get framework dir
uses: actions/download-artifact@v4
with:
name: Firebase-actions-dir
name: ${{ matrix.artifact }}
- uses: ruby/setup-ruby@v1
- name: Setup Bundler
run: ./scripts/setup_bundler.sh
Expand Down Expand Up @@ -647,6 +662,7 @@ jobs:
strategy:
matrix:
os: [macos-13, macos-14]
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
include:
- os: macos-13
xcode: Xcode_15.2
Expand All @@ -658,7 +674,7 @@ jobs:
- name: Get framework dir
uses: actions/download-artifact@v4
with:
name: Firebase-actions-dir
name: ${{ matrix.artifact }}
- uses: ruby/setup-ruby@v1
- name: Setup Bundler
run: ./scripts/setup_bundler.sh
Expand Down
3 changes: 3 additions & 0 deletions Crashlytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Unreleased
- [added] Added support for catching the SIGTERM signal (#12881).

# 10.25.0
- [changed] Removed usages of user defaults API from internal Firebase Sessions
dependency to eliminate required reason impact.
Expand Down
2 changes: 2 additions & 0 deletions Crashlytics/Crashlytics/Controllers/FIRCLSMetricKitManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ - (NSString *)getSignalName:(NSNumber *)signalCode {
return @"SIGSYS";
case SIGTRAP:
return @"SIGTRAP";
case SIGTERM:
return @"SIGTERM";
default:
return @"UNKNOWN";
}
Expand Down
2 changes: 2 additions & 0 deletions Crashlytics/Crashlytics/Handlers/FIRCLSMachException.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ exception_mask_t FIRCLSMachExceptionMaskForSignal(int signal) {
return EXC_MASK_CRASH;
case SIGFPE:
return EXC_MASK_ARITHMETIC;
case SIGTERM:
return EXC_MASK_CRASH;
}

return 0;
Expand Down
16 changes: 14 additions & 2 deletions Crashlytics/Crashlytics/Handlers/FIRCLSSignal.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,17 @@
#include <stdlib.h>

#if CLS_SIGNAL_SUPPORTED
static const int FIRCLSFatalSignals[FIRCLSSignalCount] = {SIGABRT, SIGBUS, SIGFPE, SIGILL,
SIGSEGV, SIGSYS, SIGTRAP};
static const int FIRCLSFatalSignals[FIRCLSSignalCount] = {
SIGABRT, SIGBUS, SIGFPE, SIGILL,
SIGSEGV, SIGSYS, SIGTRAP,
// SIGTERM can be caught and is usually sent by iOS and variants
// when Apple wants to try and gracefully shutdown the app
// before sending a SIGKILL (which can't be caught).
// Some areas I've seen this happen are:
// - When the OS updates an app.
// - In some circumstances for Watchdog Events.
// - Resource overuse (CPU, Disk, ...).
SIGTERM};

#if CLS_USE_SIGALTSTACK
static void FIRCLSSignalInstallAltStack(FIRCLSSignalReadContext *roContext);
Expand Down Expand Up @@ -237,6 +246,9 @@ void FIRCLSSignalNameLookup(int number, int code, const char **name, const char
case SIGTRAP:
*name = "SIGTRAP";
break;
case SIGTERM:
*name = "SIGTERM";
break;
default:
*name = "UNKNOWN";
break;
Expand Down
3 changes: 2 additions & 1 deletion Crashlytics/Crashlytics/Handlers/FIRCLSSignal.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
#endif

#if CLS_SIGNAL_SUPPORTED
#define FIRCLSSignalCount (7)
// keep in sync with the list in _FIRCLSFatalSignals_.
#define FIRCLSSignalCount (8)

typedef struct {
const char* path;
Expand Down
2 changes: 1 addition & 1 deletion Example/tvOSSample/tvOSSample/AuthViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class AuthViewController: UIViewController {
// MARK: - Internal Helpers

private func setUserSignedIn(_ user: User?) {
if let user = user {
if let user {
providers.isHidden = true
signedIn.isHidden = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class NotificationService: UNNotificationServiceExtension {
self.contentHandler = contentHandler
bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)

if let bestAttemptContent = bestAttemptContent {
if let bestAttemptContent {
// Modify the notification content here...
bestAttemptContent.title = "\(bestAttemptContent.title) 👩‍💻"

Expand All @@ -39,7 +39,7 @@ class NotificationService: UNNotificationServiceExtension {
// 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 bestAttemptContent = bestAttemptContent {
if let contentHandler, let bestAttemptContent {
contentHandler(bestAttemptContent)
}
}
Expand Down
Loading

0 comments on commit 1a0d39a

Please sign in to comment.