xcrun

What is xcrun cache directory?


Where is xcrun cache stored? Also does anyone know how to use xcrun command to clean cache?

I assume this is the option:

-k, --kill-cache            invalidate all existing cache entries

Solution

  • Look at the console log, you can find the path where the temporary files are:

    Done checking the original app
    + /usr/bin/codesign -d --entitlements /var/folders/29/lb71hkjn46b2g7zfvcxpb4br0000gp/T/SXfVLy4n3G/entitlements_rawnyg500kb /var/folders/29/lb71hkjn46b2g7zfvcxpb4br0000gp/T/SXfVLy4n3G/Payload/Test.app
    Program /usr/bin/codesign returned 0 : [Executable=/private/var/folders/29/lb71hkjn46b2g7zfvcxpb4br0000gp/T/SXfVLy4n3G/Payload/Test.app/Test
    ]
    + /usr/libexec/PlistBuddy -c Set :get-task-allow NO /var/folders/29/lb71hkjn46b2g7zfvcxpb4br0000gp/T/SXfVLy4n3G/entitlements_plistvl0d7HId
    Program /usr/libexec/PlistBuddy returned 0 : []
    + /usr/bin/plutil -lint /var/folders/29/lb71hkjn46b2g7zfvcxpb4br0000gp/T/SXfVLy4n3G/entitlements_plistvl0d7HId
    Program /usr/bin/plutil returned 0 : [/var/folders/29/lb71hkjn46b2g7zfvcxpb4br0000gp/T/SXfVLy4n3G/entitlements_plistvl0d7HId: OK
    ]
    

    The cache directory of this run is: /private/var/folders/29/lb71hkjn46b2g7zfvcxpb4br0000gp/T/SXfVLy4n3G/

    It's good idea to write script clean up the files after.

    rm -rf /private/var/folders/29/lb71hkjn46b2g7zfvcxpb4br0000gp/T/SXfVLy4n3G/