Remove ObjCExceptionCatcher from iOS target

This commit is contained in:
Mitchell Hashimoto
2026-02-25 09:00:51 -08:00
parent 304823d560
commit da045d2fb3
2 changed files with 1 additions and 14 deletions

View File

@@ -231,6 +231,7 @@
Helpers/LastWindowPosition.swift,
Helpers/MetalView.swift,
Helpers/NonDraggableHostingView.swift,
Helpers/ObjCExceptionCatcher.m,
Helpers/PermissionRequest.swift,
Helpers/Private/CGS.swift,
Helpers/Private/Dock.swift,

View File

@@ -1,9 +1,6 @@
#import "ObjCExceptionCatcher.h"
#import <TargetConditionals.h>
#if TARGET_OS_OSX
#import <AppKit/AppKit.h>
#endif
BOOL GhosttyAddTabbedWindowSafely(
id parent,
@@ -11,7 +8,6 @@ BOOL GhosttyAddTabbedWindowSafely(
NSInteger ordered,
NSError * _Nullable * _Nullable error
) {
#if TARGET_OS_OSX
// AppKit occasionally throws NSException while reparenting tabbed windows.
// We must catch it in Objective-C; letting this cross into Swift is unsafe.
@try {
@@ -30,14 +26,4 @@ BOOL GhosttyAddTabbedWindowSafely(
return NO;
}
#else
if (error != NULL) {
*error = [NSError errorWithDomain:@"Ghostty.ObjCException"
code:2
userInfo:@{
NSLocalizedDescriptionKey: @"GhosttyAddTabbedWindowSafely is unavailable on this platform.",
}];
}
return NO;
#endif
}