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

Add visionOS as a known platform. #857

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions FBControlCore/Configuration/FBiOSTargetConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ typedef NS_ENUM(NSUInteger, FBControlCoreProductFamily) {
FBControlCoreProductFamilyAppleTV = 3,
FBControlCoreProductFamilyAppleWatch = 4,
FBControlCoreProductFamilyMac = 5,
FBControlCoreProductFamilyVision = 7,
};

/**
Expand Down Expand Up @@ -108,6 +109,7 @@ extern FBDeviceModel const FBDeviceModelAppleWatchSeries5_40mm;
extern FBDeviceModel const FBDeviceModelAppleWatchSeries5_44mm;
extern FBDeviceModel const FBDeviceModelAppleWatchSeries6_40mm;
extern FBDeviceModel const FBDeviceModelAppleWatchSeries6_44mm;
extern FBDeviceModel const FBDeviceModelAppleVisionPro;

/**
OS Versions Name Enumeration.
Expand Down Expand Up @@ -188,6 +190,7 @@ extern FBOSVersionName const FBOSVersionNamewatchOS_6_1;
extern FBOSVersionName const FBOSVersionNamewatchOS_6_2;
extern FBOSVersionName const FBOSVersionNamewatchOS_7_0;
extern FBOSVersionName const FBOSVersionNamewatchOS_7_1;
extern FBOSVersionName const FBOSVersionNamexrOS_1_0;
extern FBOSVersionName const FBOSVersionNamemac;

#pragma mark Screen
Expand Down
15 changes: 14 additions & 1 deletion FBControlCore/Configuration/FBiOSTargetConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
FBDeviceModel const FBDeviceModelAppleWatchSeries5_44mm = @"Apple Watch Series 5 - 44mm";
FBDeviceModel const FBDeviceModelAppleWatchSeries6_40mm = @"Apple Watch Series 6 - 40mm";
FBDeviceModel const FBDeviceModelAppleWatchSeries6_44mm = @"Apple Watch Series 6 - 44mm";
FBDeviceModel const FBDeviceModelAppleVisionPro = @"Apple Vision Pro";

FBOSVersionName const FBOSVersionNameiOS_7_1 = @"iOS 7.1";
FBOSVersionName const FBOSVersionNameiOS_8_0 = @"iOS 8.0";
Expand Down Expand Up @@ -179,6 +180,7 @@
FBOSVersionName const FBOSVersionNamewatchOS_7_1 = @"watchOS 7.1";
FBOSVersionName const FBOSVersionNamewatchOS_7_2 = @"watchOS 7.2";
FBOSVersionName const FBOSVersionNamewatchOS_7_4 = @"watchOS 7.4";
FBOSVersionName const FBOSVersionNamexrOS_1_0 = @"xrOS 1.0";

FBOSVersionName const FBOSVersionNamemac = @"macOS";

Expand Down Expand Up @@ -301,6 +303,12 @@ + (instancetype)watchWithModel:(FBDeviceModel)model productTypes:(NSArray<NSStri
return [[self alloc] initWithModel:model productTypes:[NSSet setWithArray:productTypes] deviceArchitecture:deviceArchitecture family:FBControlCoreProductFamilyAppleWatch];
}

+ (instancetype)visionWithModel:(FBDeviceModel)model
productTypes:(NSArray<NSString *> *)productTypes
deviceArchitecture:(FBArchitecture)deviceArchitecture {
return [[self alloc] initWithModel:model productTypes:[NSSet setWithArray:productTypes] deviceArchitecture:deviceArchitecture family:FBControlCoreProductFamilyVision];
}

+ (instancetype)genericWithModel:(NSString *)model
{
return [[self alloc] initWithModel:model productTypes:[NSSet set] deviceArchitecture:FBArchitectureArm64 family:FBControlCoreProductFamilyUnknown];
Expand Down Expand Up @@ -428,6 +436,10 @@ + (instancetype)watchOSWithName:(FBOSVersionName)name
return [[self alloc] initWithName:name families:[NSSet setWithObject:@(FBControlCoreProductFamilyAppleWatch)]];
}

+ (instancetype)xrOSWithName:(FBOSVersionName)name {
return [[self alloc] initWithName:name families:[NSSet setWithObject:@(FBControlCoreProductFamilyVision)]];
}

+ (instancetype)macOSWithName:(FBOSVersionName)name
{
return [[self alloc] initWithName:name families:[NSSet setWithObject:@(FBControlCoreProductFamilyMac)]];
Expand Down Expand Up @@ -528,7 +540,7 @@ @implementation FBiOSTargetConfiguration
[FBDeviceType watchWithModel:FBDeviceModelAppleWatchSeries5_44mm productTypes:@[@"Watch5,2", @"Watch5,4"] deviceArchitecture:FBArchitectureArm64],
[FBDeviceType watchWithModel:FBDeviceModelAppleWatchSeries6_40mm productTypes:@[@"Watch6,1", @"Watch6,3"] deviceArchitecture:FBArchitectureArm64],
[FBDeviceType watchWithModel:FBDeviceModelAppleWatchSeries6_44mm productTypes:@[@"Watch6,2", @"Watch6,4"] deviceArchitecture:FBArchitectureArm64],

[FBDeviceType visionWithModel:FBDeviceModelAppleVisionPro productTypes:@[ @"RealityDevice14,1" ] deviceArchitecture:FBArchitectureArm64],
];
});
return deviceConfigurations;
Expand Down Expand Up @@ -626,6 +638,7 @@ @implementation FBiOSTargetConfiguration
[FBOSVersion tvOSWithName:FBOSVersionNamewatchOS_7_1],
[FBOSVersion tvOSWithName:FBOSVersionNamewatchOS_7_2],
[FBOSVersion tvOSWithName:FBOSVersionNamewatchOS_7_4],
[FBOSVersion xrOSWithName:FBOSVersionNamexrOS_1_0],
[FBOSVersion macOSWithName:FBOSVersionNamemac],
];
});
Expand Down
1 change: 1 addition & 0 deletions FBDeviceControl/Management/FBAMDevice.m
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ + (NSString *)osVersionForDeviceClass:(NSString *)deviceClass productVersion:(NS
NSDictionary<NSString *, NSString *> *deviceClassOSPrefixMapping = @{
@"iPhone" : @"iOS",
@"iPad" : @"iOS",
@"RealityDevice" : @"xrOS",
};
NSString *osPrefix = deviceClassOSPrefixMapping[deviceClass];
if (!osPrefix) {
Expand Down
2 changes: 2 additions & 0 deletions FBSimulatorControl/Management/FBSimulator.m
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ - (FBControlCoreProductFamily)productFamily
return FBControlCoreProductFamilyAppleTV;
case 4:
return FBControlCoreProductFamilyAppleWatch;
case 7:
return FBControlCoreProductFamilyVision;
default:
return FBControlCoreProductFamilyUnknown;
}
Expand Down