* 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}
()
| 153 | * @return {string} |
| 154 | */ |
| 155 | getIosVersionString() { |
| 156 | if (!this.isIos()) { |
| 157 | return ''; |
| 158 | } |
| 159 | return ( |
| 160 | self.navigator.userAgent |
| 161 | ?.match(/OS ([0-9]+[_.][0-9]+([_.][0-9]+)?)\b/)?.[1] |
| 162 | ?.replace(/_/g, '.') || '' |
| 163 | ); |
| 164 | }, |
| 165 | |
| 166 | /** |
| 167 | * Returns the major ios version in number. |