Search code examples
xcodewatchosxcode12swift-package-manager

watchOS Multiple Build Targets: "Any watchOS Device" vs "armv7k, arm64_32"


I have a watchOS-only Xcode project targeting watchOS 6 and above, written in SwiftUI and all its dependencies handled by Swift Package Manager. I've noticed in Xcode 12 there are actually 2x build targets for this project.

One is labelled "Any watchOS device" and the other is labelled "Any watchOS device (armv7k, arm64_32)".

watchOS deployment targets, including 2x build targets

As a probable aside, I manually added 2x Series 3 simulators to debug a production issue that one user was encountering.

Is there any difference between these two separate build targets? If so, which one should I be using for submitting to the App Store for maximum compatibility?


Solution

  • After doing some research, I believe I have an explanation.

    I have run the following command to inspect the various ARCHS build settings:

    xcodebuild -showBuildSettings -workspace MyWorkspace.xcworkspace -scheme Watch -sdk watchos | grep ARCHS
    

    The valid destinations list has only one watchOS entry:

    { platform:watchOS, id:dvtdevice-DVTiOSDevicePlaceholder-watchos:placeholder, name:Any watchOS Device }
    

    And the build settings are:

        ARCHS = armv7k arm64_32
        ARCHS_STANDARD = armv7k arm64_32
        ARCHS_STANDARD_32_BIT = armv7k arm64_32
        VALID_ARCHS = arm64_32 armv7k
    

    I believe the disparate destinations in Xcode are a UI bug, stemming from the fact that the order of params differs between ARCHS_STANDARD and VALID_ARCHS. If you were to build the app from the command line, there would not be two choices.