0

(Answering own question; see my answer below.)

When I tried to run my Today extension in the iOS simulator, Xcode 6 would ask me to choose an app to attach the debugger. After I chose the "Today" app, Xcode would report "Running Today-View on iPhone" but the Today-View would never appear. If I manually pull down the Today-View, my Today extension would not be there.

The funny thing is that, even if I add a brand new app target and a brand new Today extension target to my Xcode project, I still couldn't get Xcode to run and debug a brand new Today extension in the iOS simulator.

I've compared the build settings of my legacy Xcode project against the same of a new Xcode project. There does not seem to be any significant differences between the two.

Why can't Xcode run my Today extension in the iOS simulator against my legacy Xcode project?

user444731
  • 173
  • 1
  • 6

1 Answers1

0

My legacy Xcode project's build directory was relative to the location of the Xcode project. That is, the build products were not placed in the "derived data" directory under ~/Library/Developer/Xcode/DerivedData/... I hypothesized that Xcode could not find the Today extension when located relative to the Xcode project. Consequently, Xcode could not run it with the Today-View app for debugging in the simulator

Then, how to move the build directory from the legacy location to the "derived data" location?

  1. With the legacy Xcode project open, go to "File > Project Settings..."
  2. Click on "Advanced..."
  3. Change the build location from "Legacy" to "Xcode Default" (which is probably your "derived data" directory.)

(Thanks to this question: Why doesn't Xcode 4 create any products?)

After this change, I could finally debug my Today extension through the iOS simulator!

Community
  • 1
  • 1
user444731
  • 173
  • 1
  • 6