Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 283ad3c

Browse files
Merge pull request #1901 from montegoulding/bugfix-20332b
[[ Bug 20332 ]] Handle unset app id and set for user
2 parents 195db20 + e0dfc2c commit 283ad3c

1 file changed

Lines changed: 42 additions & 3 deletions

File tree

Toolset/palettes/standalone settings/revstandalonesettingsiosbehavior.livecodescript

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,49 @@ on checkSettingsCompatible pName, pValue
428428
delete item 1 of tProfile["appid"]
429429

430430
local tID
431-
filter tAppID with tProfile["appid"] into tID
432-
if tID is empty then
433-
answer error revIDELocalise("The chosen provisioning profile requires an app ID matching:" && tProfile["appid"])
431+
if tAppID is empty then
432+
if tProfile["appid"] is "*" then
433+
-- do nothing as we are already default
434+
exit repeat
435+
end if
436+
else
437+
filter tAppID with tProfile["appid"] into tID
438+
if tID is not empty then
439+
-- already matches so do nothing
440+
exit repeat
441+
end if
434442
end if
443+
444+
if tProfile["appid"] contains "*" then
445+
repeat with tIndex = 1 to max(3, the number of items of tProfile["appid"])
446+
get item tIndex of tProfile["appid"]
447+
if it is empty or it is "*" then
448+
if tIndex > 3 then
449+
-- if we have a long wildcard just keep apending `id` for *
450+
put "id" into item tIndex of tID
451+
else
452+
put item tIndex of "com.yourcompany.yourapp" into item tIndex of tID
453+
end if
454+
else
455+
put it into item tIndex of tID
456+
end if
457+
end repeat
458+
else
459+
put tProfile["appid"] into tID
460+
end if
461+
462+
local tVars
463+
put tProfile["appid"] into tVars[1]
464+
put tID into tVars[2]
465+
466+
answer error revIDELocalise("The chosen provisioning profile requires an app ID matching %1" & return & return & \
467+
"Would you like to change to %2", tVars) with revIDELocalise("OK") or revIDELocalise("Cancel")
468+
469+
if it is "OK" then
470+
setSetting "ios,bundle id", tID
471+
put tID into field "Bundle Id"
472+
end if
473+
435474
exit repeat
436475
end if
437476
end repeat

0 commit comments

Comments
 (0)