Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xCode removed target still in the project

Tags:

xcode

ios

So basically I had an app extension (Today extension) in my project, then I created another one and deleted the first one. The deleted target isn't shown anywhere in the project, neither listed under "Targets" in the main project file, however, it is still compiling and showing up on the tests, both on the phone and on the simulator, even if I delete the app and reinstall it.

The major problem? Well, now I've changed the bundle id for both projects (the main app, and the app extension I created before), the project compiles but claims it can't be installed because:

"This app contains an app extension with an illegal bundle identifier. App extension bundle identifiers must have a prefix consisting of their containing application's bundle identifier followed by a '.'."

Although the remaining app extension bundle is correct, and matching this requirement. I'm pretty sure it is talking about the deleted target which now I can't configure. What can I do?

Thanks in advance :)

like image 590
Matheus Rocha Avatar asked Sep 17 '25 12:09

Matheus Rocha


1 Answers

I fixed it by doing the following:

  1. Find your project's .xcodeproj file.
  2. Right click the it and select 'Show Package Contents'.
  3. Navigating to root_dir.xcuserdatad/xcschemes/
  4. Delete the offending .xcscheme file.
  5. Restart xcode and it should be gone.
like image 88
Mark Avatar answered Sep 20 '25 02:09

Mark