Skip to content

Add build support for Apple visionOS #131999

Open

Description

@colincornaby

Feature or enhancement

Proposal:

I've been using CPython in my iOS app successfully - but I need to bring my app to visionOS.

Happy to try adding support to the build myself - but I don't know the configure scripts very well. I do have hardware and would also be happy to test.

To be clear - not asking for any sort of specific support. Would just be happy to have build output for visionOS similar to tvOS/watchOS.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Activity

  1. sobolevn commented on Apr 2, 2025

    @sobolevn
    Member
  2. freakboy3742 commented on Apr 2, 2025

    @freakboy3742
    Contributor

    FWIW - I have a patch adding tvOS and watchOS support. We had a recent contribution of a macCatalyst patch (see beeware/Python-Apple-support#117); that work that got close to being merged, but didn't quite get there before the contributor ran out of time to contribute. I expect the changes needed to add support for visionOS will essentially the same as those patches, substituting macCatalyst platform markers for visionOS/xros as appropriate.

    The only additional changes that I would expect might be needed are:

    • a modification to config.sub to correctly identify the visionOS compiler triple (it looks like arm64-apple-xros and arm64-apple-xros-simulator aren't currently supported); and
    • modifications around L5267-5314 of the patched configure.ac that enable/disable features that autoconf can't correctly identify.

    I'm happy to act as a core team rep for any of these platforms (i.e., tvOS, watchOS, visionOS or macCatalyst); but I'm unlikely to have the volunteer time to develop the initial patches for visionOS and macCatalyst myself. I can probably find the resources to implement those patches if someone wants to fund the development of those patches; if that's an option you're interested in, reach out by email (my details are in my GitHub profile) and we can see what can be done.

  3. changed the title [-]Add build support for visionOS[/-] [+]Add build support for Apple visionOS[/+] on Apr 2, 2025
  4. freakboy3742 commented on Apr 23, 2025

    @freakboy3742
    Contributor

    FYI - thanks to contributions from @johnzhou721, https://github.com/beeware/Python-Apple-support now has the tooling in place to support building Python.framework for visionOS.

    I haven't published any official builds yet, but the main branch is able to build a visionOS support package for CPython 3.14.0a7.

  5. johnzhou721 commented on Apr 23, 2025

    @johnzhou721
    Contributor

    @freakboy3742 But two unit tests are failing.

  6. freakboy3742 commented on Apr 23, 2025

    @freakboy3742
    Contributor

    @johnzhou721 I wasn't seeing any failures on my most recent test pass; If you're seeing an error, we can continue the discussion (and bug fixing) on Python-Apple-support

  7. freakboy3742 commented on Apr 23, 2025

    @freakboy3742
    Contributor

    Closing the loop on this - the tests are passing, as long as you've updated your branch. There is a minor issue with the Makefile that produces build artefacts, which should be fixed shortly.

  8. colincornaby commented on Apr 26, 2025

    @colincornaby
    Author

    Woah - amazing! I wasn't prepared for this to be done so quickly - so my use case is still being held back by one other dependency before I can build. But happy to help test where I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-iosbuildThe build process and cross-buildtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions