Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static async _getDeviceStringPlatformVersion (platformVersion) {
let reqVersion = platformVersion;
if (!reqVersion) {
reqVersion = await xcode.getMaxIOSSDK();
log.warn(`No platform version set. Using max SDK version: ${reqVersion}`);
// this will be a number, and possibly an integer (e.g., if max iOS SDK is 9)
// so turn it into a string and add a .0 if necessary
if (!_.isString(reqVersion)) {
reqVersion = (reqVersion % 1) ? String(reqVersion) : `${reqVersion}.0`;
}
}
return reqVersion;
}