From a029c449bcdf47f87437215be10b13a6223afaed Mon Sep 17 00:00:00 2001 From: sheepliu Date: Wed, 17 May 2023 19:46:51 +0800 Subject: [PATCH] Fix app_uuid may be empty in the report --- .../MemoryLogger/StackFrames/bundle_name_helper.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix/matrix-iOS/Matrix/WCMemoryStat/MemoryLogger/StackFrames/bundle_name_helper.mm b/matrix/matrix-iOS/Matrix/WCMemoryStat/MemoryLogger/StackFrames/bundle_name_helper.mm index f030483aa..602714ce2 100644 --- a/matrix/matrix-iOS/Matrix/WCMemoryStat/MemoryLogger/StackFrames/bundle_name_helper.mm +++ b/matrix/matrix-iOS/Matrix/WCMemoryStat/MemoryLogger/StackFrames/bundle_name_helper.mm @@ -22,7 +22,7 @@ void bundleHelperGetAppBundleName(char *outBuffer, unsigned int bufferSize) { return; } - NSString *bundleName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; + NSString *bundleName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleExecutable"]; if (bundleName) { const char *cStr = [[NSString stringWithFormat:@"/%@.app/", bundleName] cStringUsingEncoding:NSUTF8StringEncoding]; strncpy(outBuffer, cStr, bufferSize); @@ -37,7 +37,7 @@ void bundleHelperGetAppName(char *outBuffer, unsigned int bufferSize) { return; } - NSString *bundleName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; + NSString *bundleName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleExecutable"]; if (bundleName) { const char *cStr = [[NSString stringWithFormat:@"/%@.app/%@", bundleName, bundleName] cStringUsingEncoding:NSUTF8StringEncoding]; strncpy(outBuffer, cStr, bufferSize);