Weird architectures when adding Watch target to existing project

I have project with 2 targets, one for a "lite" versione of the app and another for the "pro". When I add targets for the Apple Watch (2.0, app and notification):

- The Architectures are set to armv7k - ($ARCHS_STANDARD), this seems fine

- Valid Architectures are set to "armv7 armv7s arm64". This seems quite weird, since when I create a new project from scratch, valid architectures are also set to "armv7k", which would seem like the right one.


When I try to run the app or notification, I get the following error when compiling:


"No architectures to compile for (ARCHS=i386, VALID_ARCHS=armv7 armv7s arm64)."


It doesn't matter if I change the valid architectures to "armv7k" manually, I get a similar error with VALID_ARCHS=armv7k. The only way to test on the simulators is to add "i386" to Valid Architectures. This doesn't happen on a project started from scratch. In it both "architectures" and "valid architectures" are set to "armv7k" and I don't have to add i386 to valid arechitectures to run the Watch app or notification.


Is there an issue when adding Watch apps to an existing project? Any help would be appreciated. For the moment, in order to move forward, I have added i386 to valid architectures. I have not tested on real devices yet.


Raúl.

Same issue in Xcode 7 beta 6.

I got mine to compile by resetting Valid Architectures in the watchkit extension to $(ARCHS_STANDARD) which converts to armv7k. Seemed to work for me so far.

Hi Raul,


I was wondering if you had any resolution to this issue. We here have the EXACT same problem. We have an app, with watchOS1 accompanying app. When we create a watchOS2 app as a new target, we get the exact same No architectures to compile for (ARCHS=i386, VALID_ARCHS=armv7k). error. I have searched EVERYWHERE for the occurrence of the string i386 (not found anywhere), I have deleted our watchOS1 app, and created a new watchOS2 app, and we have the same error. I have added i386 to the list of architectures, and it compiles, but it will not launch - then I get a The operation couldn’t be completed. (LaunchServicesError error 0.) from the simulator. I have even been thinking about creating a new project in Xcode7 from scratch, and copying everything over file-by-file.


If you have any fix, I would really like to know what it was.


Regards, Alex.

Weird architectures when adding Watch target to existing project
 
 
Q