@@ -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
0 commit comments