'Are m1 macs able to run watch apps?

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



Solution 1:[1]

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

Solution 2:[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.

Solution 3:[3]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Amit
Solution 2 Iskandir
Solution 3 Gautham Vijayan