Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I clean xcode build cache?

Any change I do in Xcode, build successfully but when I review it in simulator or transfer it to my iPhone, the previous successful build which was sent to the store is running.

It was a working application with history of changes in app store, then I decided to change the name and unique identifier. All went well and I was able to deploy first changes to the store, after that xcode started to show this odd behavior. I made changes, built successfully but the previous version showed up in simulator etc. Then I found a silly workaround, every change I made, I rebuilt the environment by pull the code from my repo and

#cordova add platform [email protected]
#pod update
#pod setup
#pod install

Then open the Xcode and built the project, then everything was as expected. but unfortunately this trick stopped working as well and I stuck. I do clean I do clear DerivedData folder I do use "watchdog" application to do cleaning

Did I miss anything?

like image 932
Ali Shahnazi Avatar asked Oct 31 '25 12:10

Ali Shahnazi


1 Answers

How to clear Xcode cache manually

1. Clean the build

Tip: If you’re trying to fix a problem with Xcode crashing, it’s worth cleaning the project build first. This will get rid of the current build and create a new one next time you run the code.

With the project open in code, go to the menu bar, choose Product, and select Clean or: With the project open, press Command + Shift + K.

2. Clean out the build folder

To clean out the build folder, and get rid of cache files, do the following:

In the Code project, click on the Product menu while holding down the Option (Alt) key and choose Clean build folder, or: Press Command + Shift + Option + K.

3. Reset Simulator content and settings

If neither of the steps above resolves your problem, try resetting the simulator content and settings:

Go to the menu and choose iOS Simulator, then click Reset Content and Settings.

4. Delete derived data

If you’re still having problems, try deleting derived data, which will force Xcode to recreate it when you next run it.

In the menu, choose Window, then Organizer. Now select Projects, and then click Select your project. Choose the project whose derived data you want to delete. In the window that opens, you’ll see see the Derived Data folder listed, along with its Finder path. To the right of the folder, there’s a Delete button. Press it. Now, delete the module cache.

Go to: ~/Library/Developer/Xcode/DerivedData/ModuleCache. Drag the files from the ModuleCache folder to the Trash and empty it.


Source: https://macpaw.com/how-to/clear-xcode-cache

like image 136
Troy Avatar answered Nov 04 '25 09:11

Troy