You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ios info is pretty slow command and we can determine type at once on setup and remember in metadata.
there is no chance that phone becomes tablet with the same udid :)
if [[ -n "$physical" ]]; then
deviceClass=$(ios info --udid=$udid | jq -r ".DeviceClass")
if [ "$deviceClass" = "iPad" ]; then
export DEVICETYPE='Tablet'
fi
if [ "$deviceClass" = "AppleTV" ]; then
export DEVICETYPE='tvOS'
fi
else
export simulatorType=$(cat ${SIMULATORS} | jq -r ".devices[][] | select (.udid==\"$udid\" and .isAvailable==true) | .deviceTypeIdentifier")
#echo simulatorType: $simulatorType
if [[ -n "$simulatorType" ]]; then
export simulator=$(cat ${SIMULATORS} | jq -r ".devices[][] | select (.udid==\"$udid\" and .isAvailable==true) | .name")
fi
# define valid DEVICETYPE using $simulatorType
# Phone: com.apple.CoreSimulator.SimDeviceType.iPhone-13-Pro
# Tablet: com.apple.CoreSimulator.SimDeviceType.iPad-Pro-12-9-inch-5th-generation
# tvOS: com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-2nd-generation-1080p
#TODO: define strategy for 'Apple Watch' com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm
if [[ "$simulatorType" == *iPad* ]]; then
export DEVICETYPE='Tablet'
fi
if [[ "$simulatorType" == *Apple-TV* ]]; then
export DEVICETYPE='tvOS'
fi
fi
The text was updated successfully, but these errors were encountered:
done. special ./metaData/device-$udid.json is generated during setup where we collect all output from ios info --udid=$udud.
as result this pretty slow and most problematic call we do at once.
So far only device type (phone, tablet or tv) is parsed later. Make sure in future don't parse non static values like platform version, device name etc.
./metaData/device-$udid.json is generated with common info about device
after services starts/restarts etc appium configuration file has valid deviceType capability (./metaData/$udid.json). Applicable only for non phones, i.e. tablets and TVs. So ideally to setup any iPad for verification.
ios info is pretty slow command and we can determine type at once on setup and remember in metadata.
there is no chance that phone becomes tablet with the same udid :)
The text was updated successfully, but these errors were encountered: