Skip to content

Commit

Permalink
Remove call to os_proc_available_memory() on Mac Catalyst due to miss…
Browse files Browse the repository at this point in the history
…ing API implementation on earlier Catalyst version
  • Loading branch information
kstenerud committed Aug 15, 2024
1 parent 2328a0f commit 7b328ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Bugsnag/Helpers/BSGRunContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,10 @@ static void UpdateTaskMemory(void) {
if (task_vm.limit_bytes_remaining) {
setMemoryUsage(footprint, task_vm.limit_bytes_remaining);
} else {
#if !TARGET_OS_OSX
if (@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macCatalyst 13.1, *)) {
#if !TARGET_OS_OSX && !TARGET_OS_MACCATALYST
// We disable access to os_proc_available_memory() entirely on Catalyst
// because earlier versions are missing the API, causing linker errors on launch.
if (@available(iOS 13.0, tvOS 13.0, watchOS 6.0, *)) {
setMemoryUsage(footprint, os_proc_available_memory());
}
#endif
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

## TBD

### Bug Fixes

* Disable calls to os_proc_available_memory() on Catalyst due to missing API in earlier versions.
[1689](https://github.com/bugsnag/bugsnag-cocoa/pull/1689)

## 6.30.1 (2024-07-25)

### Bug Fixes
Expand Down

0 comments on commit 7b328ed

Please sign in to comment.