vishalaksh
vishalaksh

Reputation: 2154

Why do I need to clean the xcode project everytime I build the project?

I have an iOS app written in Swift. Whenever I run the project, it gives Shell Script Invocation Errors: enter image description here

When I clean the project, the subsequent build performs ok. But again, if I build the project next time, it again gives the same error.

Cleaning and rebuilding the project takes a lot of time. Is there some way around it?

Upvotes: 3

Views: 2093

Answers (1)

Scriptable
Scriptable

Reputation: 19750

It's difficult to know exactly what is causing this issue as it could be a number of things, So the question is quite broad.

Few things to try...

  • Check your build phases in the project and look for anything that might not be expected
  • Try checking out your project (if using version control) in another location such as your Documents folder to make sure there isn't a permissions issue.
  • Try cleaning the build folder using alt, cmd, shift + k.

If your still having issues after that try providing additonal information.

  1. What version of xcode are you using?
  2. Are you using any xcode plugins?
  3. Are you using any package management solutions? carthage? pods?
  4. Have you tried to build your project on another computer?
  5. Are you using the latest version of the command line tools?

Upvotes: 3

Related Questions