* Returns the minor ios version in string. * The ios version can contain two numbers (10.2) or three numbers (10.2.1). * Direct string equality check is not suggested, use startWith instead. * @return {string}
()
| 171 | * @return {string} |
| 172 | */ |
| 173 | getIosVersionString() { |
| 174 | if (!this.isIos()) { |
| 175 | return ''; |
| 176 | } |
| 177 | return ( |
| 178 | this.navigator_.userAgent |
| 179 | ?.match(/OS ([0-9]+[_.][0-9]+([_.][0-9]+)?)\b/)?.[1] |
| 180 | ?.replace(/_/g, '.') || '' |
| 181 | ); |
| 182 | } |
| 183 | |
| 184 | /** |
| 185 | * Returns the major ios version in number. |
no test coverage detected