diff --git a/Sources/Sentry/SentryProfiler.mm b/Sources/Sentry/SentryProfiler.mm index ba28ed1207..2614209e6e 100644 --- a/Sources/Sentry/SentryProfiler.mm +++ b/Sources/Sentry/SentryProfiler.mm @@ -78,6 +78,28 @@ } } +namespace { +NSString * +getDeviceModel() +{ + utsname info; + if (SENTRY_PROF_LOG_ERRNO(uname(&info)) == 0) { + return [NSString stringWithUTF8String:info.machine]; + } + return @""; +} + +NSString * +getOSBuildNumber() +{ + char str[32]; + size_t size = sizeof(str); + int cmd[2] = { CTL_KERN, KERN_OSVERSION }; + if (SENTRY_PROF_LOG_ERRNO(sysctl(cmd, sizeof(cmd) / sizeof(*cmd), str, &size, NULL, 0)) == 0) { + return [NSString stringWithUTF8String:str]; + } +} + @implementation SentryProfiler { NSMutableDictionary *_profile; uint64_t _startTimestamp;