Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix target conditional for vision simulator #131

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion GoogleUtilities/Environment/GULAppEnvironmentUtil.m
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ + (NSString *)deviceSimulatorModel {
model = @"watchOS Simulator";
#elif TARGET_OS_TV
model = @"tvOS Simulator";
#elif TARGET_OS_IPHONE
#elif TARGET_OS_IOS
switch ([[UIDevice currentDevice] userInterfaceIdiom]) {
case UIUserInterfaceIdiomPhone:
model = @"iOS Simulator (iPhone)";
Expand All @@ -179,6 +179,8 @@ + (NSString *)deviceSimulatorModel {
model = @"iOS Simulator (Unknown)";
break;
}
#elif TARGET_OS_VISION
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think moving #elif TARGET_OS_VISION above #elif TARGET_OS_IOS would allow this to work on both Xcode 15.0 and Xcode 15.1 Beta.

Note: In the current ordering, it'll go in the TARGET_OS_IOS path on Xcode 15.0 where the value of TARGET_OS_IOS is still 1 on visionOS.

model = @"visionOS Simulator";
#endif
#elif TARGET_OS_EMBEDDED
model = [GULAppEnvironmentUtil getSysctlEntry:"hw.machine"];
Expand Down
Loading