From dbc191d66e02613912ea63e838d728a33d4e7b69 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 25 Apr 2020 22:15:27 +0800 Subject: remove sign for codesign --- xmake/modules/private/tools/codesign.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/xmake/modules/private/tools/codesign.lua b/xmake/modules/private/tools/codesign.lua index 5631312ee..73e7b918d 100644 --- a/xmake/modules/private/tools/codesign.lua +++ b/xmake/modules/private/tools/codesign.lua @@ -104,6 +104,22 @@ function dump() print(mobile_provisions()) end +-- remove signature +function unsign(programdir) + + -- only for macosx + assert(is_host("macosx"), "codesign: only support for macOS!") + + -- get codesign + local codesign = find_tool("codesign") + if not codesign then + return + end + + -- remove signature + os.vrunv(codesign.program, {"--remove-signature", programdir}) +end + -- main entry function main (programdir, codesign_identity, mobile_provision) -- cgit v1.3.1