mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 23:18:27 +02:00
Re-enable NSException on Share extension dismiss.
Disable crash logging in the share extension because of this.
This commit is contained in:
@@ -30,4 +30,9 @@ public extension Bundle {
|
||||
}
|
||||
return bundle
|
||||
}
|
||||
|
||||
/// Whether or not the bundle is the RiotShareExtension.
|
||||
var isShareExtension: Bool {
|
||||
bundleURL.lastPathComponent.contains("RiotShareExtension.appex")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,8 +121,13 @@ import AnalyticsEvents
|
||||
|
||||
MXLog.debug("[Analytics] Started.")
|
||||
|
||||
// Catch and log crashes
|
||||
MXLogger.logCrashes(true)
|
||||
if Bundle.main.isShareExtension {
|
||||
// Don't log crashes in the share extension
|
||||
} else {
|
||||
// Catch and log crashes
|
||||
MXLogger.logCrashes(true)
|
||||
}
|
||||
|
||||
MXLogger.setBuildVersion(AppInfo.current.buildInfo.readableBuildVersion)
|
||||
}
|
||||
|
||||
|
||||
@@ -99,6 +99,10 @@
|
||||
{
|
||||
[self dismissViewControllerAnimated:true completion:^{
|
||||
[self.presentingViewController dismissViewControllerAnimated:false completion:nil];
|
||||
|
||||
// FIXME: Share extension memory usage increase when launched several times and then crash due to some memory leaks.
|
||||
// For now, we force the share extension to exit and free memory.
|
||||
[NSException raise:@"Kill the app extension" format:@"Free memory used by share extension"];
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
1
changelog.d/5805.bugfix
Normal file
1
changelog.d/5805.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Share Extension: Stop logging crashes due to intentional exception that frees up memory and handle changes to MXRoom in the SDK.
|
||||
Reference in New Issue
Block a user