Waiting for attach - running watch app on simulator

https://devforums.apple.com/message/1130381#1130381

I had the same problem as description on the above link. I applied the solution about removing armv7 from valid architecture on both iPhone and Watch extension app, Then did the following steps:


  1. Build & run your iOS app in the simulator.
  2. Wait for it to finish launching, then hit the stop button in Xcode.
  3. Switch your active target to your WatchKit app, build, and run it.
  4. When the Watch app has finished launching, tap your iOS app's icon in the main simulator window.
  5. In Xcode's menu bar select Debug > Attach to Process.
  6. Select your iOS app from the list. Chances are you'll find it under Likely Targets.


But xcode still display complain message "waiting for attach", I would be very appreciate it if someone could help.

Thank you ( :

Answered by ukeyeee in 13421022

Hi Dirk,


It doesn't really work for me. I can not fix the problem. It works when I delete the old watchExtension and watch app from the target and recreated everything, the watch app is running normally on the simulator, but I'm afraid if the above problem happens again, I need to delete everything and redo it again...


There must be a solution but I'm still trying to figure out why it causes that watch app deconnected without any reason by unperdicable-randomly chance.


Thanks again for answering my question.🙂

Hi,


I've the best results when I start noth the iPhone and the Watch Simulator from Xcode (XCode / Open Developer Tool).

When both simulators are running, I switch to the WatchApp target and run the app. And I keep both simulators running between multiple runs.


Dirk

Accepted Answer

Hi Dirk,


It doesn't really work for me. I can not fix the problem. It works when I delete the old watchExtension and watch app from the target and recreated everything, the watch app is running normally on the simulator, but I'm afraid if the above problem happens again, I need to delete everything and redo it again...


There must be a solution but I'm still trying to figure out why it causes that watch app deconnected without any reason by unperdicable-randomly chance.


Thanks again for answering my question.🙂

If you go to edit the target then Run, is it set to Launch automatically or does it say Wait for executable to be launched? It might be that you need to launch it manually.

The following solution (from another forum thread) worked for me:

"you can work around this problem by checking 'Supports Running without iOS App Installation' in the General tab of the WatchKit Extension target."

Waiting for attach - running watch app on simulator
 
 
Q