skip to Main Content

I have an m1 mac. And I’m trying to create a watch target for my iOS app. After numerous tries, I’ve not been able to run to any watch (either real or simulator).

I also downloaded open source watchOS projects and couldn’t run any of them. I get the error “Could not attach to pid: 18362” “attach failed ((os/kern) invalid argument)enter image description here

Has anybody faced this challenge? How did they fix it? Is it caused by the m1, cos I was able to create it on another Mac

4

Answers


  1. Chosen as BEST ANSWER

    Found out the hard way.

    As of March 2021, the new Mac M1s cannot run WatchKit apps and CarPlay apps. You either end up with the error in the question or another error.

    But these errors do not pop up on regular macs.


  2. Had a similar issue with playground / xcode projects.

    When opening the playground the issue appears like this
    enter image description here

    The Solution for me was to activate the "Rosetta Mode" when having a xcode project and deactivate the "Rosetta Mode" when using the playground.

    You can activate / deactivate it by searching for Xcode in your finder (cmd+space, type "Xcode" scroll below and found it) do a right click an click on "Get info" and in the "General" tab you use the "Open using Rosetta" -button.

    Maybe this is also a solution for your problem.

    Login or Signup to reply.
  3. Try to uncheck the open with rosetta option for xcode. For me it was working perfectly in my m1 mac book air.

    Login or Signup to reply.
  4. For building I enable rosetta, otherwise build process fails.
    Then if you to launch the build on watch it debugger fails to attach to debugger (same error as above).

    Then go and disable Rosetta and then launch watch build once again. It works. Hopefully it helps

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search