Skip to content

Commit 3b738fa

Browse files
depilzShchvova
andauthored
iOS/tvOS: packaging (#850)
Co-authored-by: Vlad Shcherban <[email protected]>
1 parent ff6dfb2 commit 3b738fa

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

platform/resources/iPhonePackageApp.lua

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -513,19 +513,13 @@ local function generateXcent( options )
513513
local data = templateXcent
514514

515515
-- Set "get-task-allow" to the same value as in the provisioning profile
516-
local get_task_allow_setting = captureCommandOutput("security cms -D -i '".. options.mobileProvision .."' | plutil -p - | fgrep 'get-task-allow'")
516+
local get_task_allow_setting = captureCommandOutput("security cms -D -i '".. options.mobileProvision .."' | plutil -extract Entitlements.get-task-allow raw -o - -")
517517
if debugBuildProcess and debugBuildProcess ~= 0 then
518518
print("get_task_allow_setting: ".. tostring(get_task_allow_setting))
519519
end
520520
if get_task_allow_setting ~= "" then
521-
-- set the value appropriately
522-
if nil ~= string.find( get_task_allow_setting, "1", 1, true ) then
523-
templateGetTaskAllow, numMatches = string.gsub( templateGetTaskAllow, "{{GET_TASK}}", "true" )
524-
assert( numMatches == 1 )
525-
else
526-
templateGetTaskAllow, numMatches = string.gsub( templateGetTaskAllow, "{{GET_TASK}}", "false" )
527-
assert( numMatches == 1 )
528-
end
521+
templateGetTaskAllow, numMatches = string.gsub( templateGetTaskAllow, "{{GET_TASK}}", get_task_allow_setting )
522+
assert( numMatches == 1 )
529523
data, numMatches = string.gsub( data, "{{GET_TASK_ALLOW}}", templateGetTaskAllow )
530524
assert( numMatches == 1 )
531525
else

platform/resources/tvosPackageApp.lua

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -880,20 +880,13 @@ local function generateXcent( options )
880880
local data = templateXcent
881881

882882
-- Set "get-task-allow" to the same value as in the provisioning profile
883-
local get_task_allow_setting = captureCommandOutput("security cms -D -i '".. options.mobileProvision .."' | plutil -p - | fgrep 'get-task-allow'")
883+
local get_task_allow_setting = captureCommandOutput("security cms -D -i '".. options.mobileProvision .."' | plutil -extract Entitlements.get-task-allow raw -o - -")
884884
if debugBuildProcess and debugBuildProcess ~= 0 then
885885
print("get_task_allow_setting: ".. tostring(get_task_allow_setting))
886886
end
887-
888887
if get_task_allow_setting ~= "" then
889-
-- set the value appropriately
890-
if nil ~= string.find( get_task_allow_setting, "1", 1, true ) then
891-
templateGetTaskAllow, numMatches = string.gsub( templateGetTaskAllow, "{{GET_TASK}}", "true" )
892-
assert( numMatches == 1 )
893-
else
894-
templateGetTaskAllow, numMatches = string.gsub( templateGetTaskAllow, "{{GET_TASK}}", "false" )
895-
assert( numMatches == 1 )
896-
end
888+
templateGetTaskAllow, numMatches = string.gsub( templateGetTaskAllow, "{{GET_TASK}}", get_task_allow_setting )
889+
assert( numMatches == 1 )
897890
data, numMatches = string.gsub( data, "{{GET_TASK_ALLOW}}", templateGetTaskAllow )
898891
assert( numMatches == 1 )
899892
else

0 commit comments

Comments
 (0)