Skip to content

Commit

Permalink
ignore productModel for tvos
Browse files Browse the repository at this point in the history
  • Loading branch information
saikrishna321 committed May 6, 2024
1 parent 25b9ba9 commit bc95b93
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/device-managers/IOSDeviceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,15 +315,21 @@ export default class IOSDeviceManager implements IDeviceManager {
}

static getProductModel(deviceTypes: any, device: IDevice) {
return deviceTypes.filter(
(deviceType: any) => deviceType.identifier === device.deviceTypeIdentifier,
)[0].modelIdentifier;
if (device.platform === 'tvos') {
return undefined;
} else {
return deviceTypes.filter(
(deviceType: any) => deviceType.identifier === device.deviceTypeIdentifier,
)[0].modelIdentifier;
}
}

findKeyByValue(model: string): any {
for (const [key, value] of Object.entries(IOSDeviceInfoMap)) {
if (model === key) {
return value;
if (model !== undefined) {
for (const [key, value] of Object.entries(IOSDeviceInfoMap)) {
if (model === key) {
return value;
}
}
}
}
Expand Down

0 comments on commit bc95b93

Please sign in to comment.