@@ -801,7 +801,8 @@ private command revSaveAsMobileStandaloneMain pStack, pAppBundle, pTarget, pSett
801801 -- try
802802 -- Perform the codesigning of the main bundle
803803 local tResult
804- put shell ("/usr/bin/codesign --verbose -f -s" && quote & tCertificate & quote && \
804+ __CodesignFrameworks pAppBundle , tCertificate , tEntitlementsFile
805+ put shell ("/usr/bin/codesign --deep --verbose -f -s" && quote & tCertificate & quote && \
805806 "--entitlements" && quote & tEntitlementsFile & quote && \
806807 quote & pAppBundle & quote ) into tResult
807808 -- MM-2012-10-25: [[ Bug ]] try catch finally oddness meant that any errors here were being ignored.
@@ -817,6 +818,23 @@ private command revSaveAsMobileStandaloneMain pStack, pAppBundle, pTarget, pSett
817818 end if
818819end revSaveAsMobileStandaloneMain
819820
821+ private command __CodesignFrameworks pPath, pCertificate, pEntitlements
822+ local tFrameworks
823+ put folders (pPath ) into tFrameworks
824+ filter tFrameworks with "*.framework"
825+ repeat for each line tFramework in tFrameworks
826+ __CodesignFrameworks pPath & "/" & tFramework & "/Frameworks" , pCertificate , pEntitlements
827+
828+ local tResult
829+ put shell ("/usr/bin/codesign --deep --verbose -f -s" && quote & pCertificate & quote && \
830+ "--entitlements" && quote & pEntitlements & quote && \
831+ quote & pPath & "/" & tFramework & quote ) into tResult
832+ if not (tResult contains "signed bundle" or tResult contains "signed app bundle" ) then
833+ throw "codesigning failed with" && tResult
834+ end if
835+ end repeat
836+ end __CodesignFrameworks
837+
820838command revSaveAsMobileDeployer pDeployAppBundle, pAppBundle, pAppName, pAppId, pAppExecutables
821839 create folder pDeployAppBundle
822840 create folder pDeployAppBundle & slash & "Contents"
0 commit comments