File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
iOS_SDK/OneSignalSDK/Source Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -474,16 +474,12 @@ + (NSString*)getDeviceVariant {
474474 let systemInfoMachine = [self getSystemInfoMachine ];
475475
476476 // x86_64 could mean an iOS Simulator or Catalyst app on macOS
477- if ([systemInfoMachine isEqualToString: @" x86_64" ]) {
478- let systemName = UIDevice.currentDevice .systemName ;
479- if ([systemName isEqualToString: @" iOS" ]) {
480- let model = UIDevice.currentDevice .model ;
481- return [@" Simulator " stringByAppendingString: model];
482- } else {
483- return @" Mac" ;
484- }
485- }
486-
477+ #if TARGET_OS_MACCATALYST
478+ return @" Mac" ;
479+ #elif TARGET_OS_SIMULATOR
480+ let model = UIDevice.currentDevice .model ;
481+ return [@" Simulator " stringByAppendingString: model];
482+ #endif
487483 return systemInfoMachine;
488484}
489485
You can’t perform that action at this time.
0 commit comments