skip to Main Content

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?

2

Answers


  1. Is there any difference between these two separate build targets?

    Initially, I thought the Any watchOS device is gonna be 64-bit and the other is 32-bit, but after looking at the archives, they both indicate arm64.

    Likewise, I see both of those build targets without adding the Series 3. After comparing the xcarchive files, they appear to be identical which deepens the mystery. 🤔 🤷‍♂️

    Also found this guy, talking about CPU architectures in general: https://docs.elementscompiler.com/Platforms/Cocoa/CpuArchitectures/

    arm64_32 is a variant of arm64 with 32-bit pointer sizes, used on
    Apple Watch Series 4 and later.

    Back to the question:

    which one should I be using for submitting to the App Store for
    maximum compatibility?

    I’d go with the less specific option Any watchOS device until you discover a reason to choose otherwise.

    Login or Signup to reply.
  2. 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.

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