Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions app/src/app_ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,40 @@
#include "app/src/util.h"
#include "app/src/util_ios.h"

#include <cstdarg>
#include <cstdio>
#include <cstdlib>

// Workaround for Xcode 15+ / Swift 5.10+ Concurrency and C++ verbose abort
// crash on older iOS versions (iOS 15/16).
// By providing this symbol in our own binary, we prevent dyld from
// crashing when it is missing from the system libc++ on older OSs.
#if defined(_LIBCPP_VERBOSE_ABORT_NOEXCEPT)
#define FIREBASE_LIBCPP_VERBOSE_ABORT_NOEXCEPT _LIBCPP_VERBOSE_ABORT_NOEXCEPT
#elif defined(__apple_build_version__) && __apple_build_version__ >= 16000000 && \
__apple_build_version__ < 20000000
#define FIREBASE_LIBCPP_VERBOSE_ABORT_NOEXCEPT
#else
#define FIREBASE_LIBCPP_VERBOSE_ABORT_NOEXCEPT noexcept
#endif

#ifndef _LIBCPP_ABI_NAMESPACE
#define _LIBCPP_ABI_NAMESPACE __1
#endif

namespace std {
inline namespace _LIBCPP_ABI_NAMESPACE {
__attribute__((weak)) void __libcpp_verbose_abort(const char* format,
...) FIREBASE_LIBCPP_VERBOSE_ABORT_NOEXCEPT {
std::va_list list;
va_start(list, format);
std::vfprintf(stderr, format, list);
va_end(list);
std::abort();
}
} // namespace _LIBCPP_ABI_NAMESPACE
} // namespace std
Comment thread
AustinBenoit marked this conversation as resolved.

#include "FIROptions.h"

@interface FIRApp ()
Expand Down
4 changes: 4 additions & 0 deletions release_build_files/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,10 @@ workflow use only during the development of your app, not for publicly shipping
code.

## Release Notes
### Upcoming
- Changes
- General (iOS): Fixed a startup crash on iOS 15 and 16 due to a missing `__libcpp_verbose_abort` symbol.

### 13.9.0
- Changes
- General (Android): Update to Firebase Android BoM version 34.15.0.
Expand Down
32 changes: 0 additions & 32 deletions testing/sample_framework/src/app_framework.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,6 @@
#include <cstring>
#include <ctime>

#if defined(__APPLE__)
#include <TargetConditionals.h>
// Workaround for Xcode 15 / Swift 5.10 Concurrency and C++ verbose abort
// crash on older iOS versions (iOS 15/16).
// By providing these symbols in our own binary, we prevent dyld from
// crashing when they are missing from the system libraries on older OSs.

// In Xcode 16, libc++ removed the noexcept specifier from
// __libcpp_verbose_abort.
#if defined(_LIBCPP_VERBOSE_ABORT_NOEXCEPT)
#define FIREBASE_LIBCPP_VERBOSE_ABORT_NOEXCEPT _LIBCPP_VERBOSE_ABORT_NOEXCEPT
#elif defined(__apple_build_version__) && \
__apple_build_version__ >= 16000000 && __apple_build_version__ < 20000000
#define FIREBASE_LIBCPP_VERBOSE_ABORT_NOEXCEPT
#else
#define FIREBASE_LIBCPP_VERBOSE_ABORT_NOEXCEPT noexcept
#endif

namespace std {
inline namespace __1 {
__attribute__((weak)) void __libcpp_verbose_abort(const char* format, ...)
FIREBASE_LIBCPP_VERBOSE_ABORT_NOEXCEPT {
va_list list;
va_start(list, format);
vfprintf(stderr, format, list);
va_end(list);
abort();
}
} // namespace __1
} // namespace std
#endif

namespace app_framework {

// Base logging methods, implemented by platform-specific files.
Expand Down
Loading