Skip to content

Commit 1efba5e

Browse files
author
minggo
authored
fix iOS version comparing (#427)
1 parent f4513b6 commit 1efba5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/plugin_run/project_run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ def _get_simulator_id(self):
121121
# get the matched data
122122
typeNum = int(match.group(2))
123123
tmpType = match.group(1)
124-
tmpIOSVer = int(match.group(3).replace('.', ''))
124+
tmpIOSVer = match.group(3)
125125

126126
if ((typeNum > phoneTypeNum) or
127127
(typeNum == phoneTypeNum and tmpType > phoneType) or
128-
(typeNum == phoneTypeNum and tmpType == phoneType and tmpIOSVer > iosVer)):
128+
(typeNum == phoneTypeNum and tmpType == phoneType and cocos.version_compare(tmpIOSVer, '>', iosVer))):
129129
# find the max phone type number first
130130
ret = id
131131
retName = name.strip()

0 commit comments

Comments
 (0)