Don't filter iOS devices by name

Summary:
Well this is embarassing. My iPhone is called iPhone, so I assumed instruments always outputs "iPhone" for iPhones, but it doesn't if they've got a different name.

Pointed out in https://github.com/facebook/flipper/issues/262

Reviewed By: nikoant

Differential Revision: D22066872

fbshipit-source-id: 847e1baf28103692dc9472d9730b6384ec719be0
This commit is contained in:
John Knox
2020-06-16 08:13:20 -07:00
committed by Facebook GitHub Bot
parent c995fc8fc2
commit 77bc432a81

View File

@@ -56,10 +56,7 @@ async function targets(): Promise<Array<DeviceTarget>> {
.map((line) => line.trim())
.map((line) => /(.+) \([^(]+\) \[(.*)\]( \(Simulator\))?/.exec(line))
.filter(notNull)
.filter(
([_match, name, _udid, isSim]) =>
!isSim && (name.includes('iPhone') || name.includes('iPad')),
)
.filter(([_match, _name, _udid, isSim]) => !isSim)
.map(([_match, name, udid]) => {
return {udid: udid, type: 'physical', name: name};
}),