Skip to content

Commit

Permalink
fix(ios): guard simulator check for Ti.Platform.model with define
Browse files Browse the repository at this point in the history
  • Loading branch information
sgtcoolguy committed Dec 15, 2020
1 parent 0eb0524 commit 1bcf4d6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions iphone/Classes/PlatformModule.m
Expand Up @@ -86,11 +86,11 @@ - (id)init
uname(&u);

// detect simulator
if (strcmp(u.machine, "i386") == 0 || strcmp(u.machine, "x86_64") == 0) {
model = [[NSString stringWithFormat:@"%s (Simulator)", getenv("SIMULATOR_MODEL_IDENTIFIER")] retain];
} else {
model = [[NSString alloc] initWithUTF8String:u.machine];
}
#if TARGET_IPHONE_SIMULATOR
model = [[NSString stringWithFormat:@"%s (Simulator)", getenv("SIMULATOR_MODEL_IDENTIFIER")] retain];
#else
model = [[NSString alloc] initWithUTF8String:u.machine];
#endif
architecture = [[TiUtils currentArchitecture] retain];

// needed for platform displayCaps orientation to be correct
Expand Down

0 comments on commit 1bcf4d6

Please sign in to comment.