iOS spike build 2: app icon, scene manifest, crash-proof self-test on demand
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
77d6e459b2
commit
c9ad186de1
@@ -0,0 +1,13 @@
|
||||
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// Runs `block`, turning an Objective-C exception (AVAudioEngine raises them for
|
||||
/// misuse, and Swift can't catch them, so they crash the app) into a returned
|
||||
/// description. Returns nil when the block finished normally.
|
||||
NSString *_Nullable SPKTry(NS_NOESCAPE void (^block)(void));
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,13 @@
|
||||
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#import "SPKTry.h"
|
||||
|
||||
NSString *_Nullable SPKTry(NS_NOESCAPE void (^block)(void)) {
|
||||
@try {
|
||||
block();
|
||||
return nil;
|
||||
} @catch (NSException *e) {
|
||||
return [NSString stringWithFormat:@"%@: %@", e.name, e.reason ?: @"(no reason)"];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user