Sample Header Ad - 728x90

How to develop and test a macOS app that supports multiple versions of macOS using one MacBook Pro?

4 votes
1 answer
615 views
I am an iOS/macOS app developer. I have an app that supports macOS 12/13/14. I have a new (November 2023) M3 MacBook Pro running macOS 14.3.1. I have a need to also run macOS 12 and macOS 13 on this same MacBook Pro so I can test the app to ensure all functionality works correctly on all supported versions of macOS. I originally intended to install macOS 12 and 13 in their own partitions and use dual (triple) boot as needed. However, this failed because the new Mac doesn't support anything older than macOS 14.1. See [How to install macOS Ventura on an M3 MacBook Pro?](https://apple.stackexchange.com/questions/469154/how-to-install-macos-ventura-on-an-m3-macbook-pro?noredirect=1#comment697872_469154) for a related post I made about trying to get macOS Ventura installed on the new Mac. Post an answer there if you know of a solution for that. Such a solution would render most of this post moot. Then I moved to virtualization. I downloaded and setup [UTM](https://mac.getutm.app) . I had no issue installing macOS 13.6 after downloading the appropriate ipsw file from Apple. But then the roadblock showed up. It turns out that macOS running in a virtual machine on an Apple Silicon host does not support the ability to log into an AppleID. See https://developer.apple.com/forums/thread/707682 for tons of comments on this. The post by Apple employee "Eskimo" near the top of the thread has the most relevant info: >- Apple silicon macOS virtual machine don’t support Apple ID logins. >- This has been true since the Virtualization framework was introduced in macOS 11. >- It’s still true in macOS 14 (currently in beta). >- This means that a number of important workflows don’t work in such VMs. >- Apple has made no official announcement about whether this will change in the future. This restriction causes the following pain points trying to do app development and testing: - You can't download any software via the App Store app since you can't log into the store. This is easy enough to work around by downloading on the host and copying to the guest VM. - You can't download any TestFlight test apps since you can't log into TestFlight. - You can't test any iCloud functionality in the app since you can't log into iCloud. I've attempted to work around some of these issues. - Running Xcode on the host, I built a development build of the app. I then copied the resulting app to a shared folder available to the guest VM. When I then attempt to run that version of the app from the guest VM, I get a dialog popup that states that "The application XXX can't be opened". - I submitted a build and made it available via TestFlight. I downloaded the app via TestFlight on the host. I then copied the resulting app to a shared folder available to the guest VM. When I then attempt to run that version of the app from the guest VM, I get a dialog popup that states that the app is no longer available due to the provisioning profile being invalid. So I can't run a development build and I can't run a TestFlight build. I did verify that I can download the app from the App Store on the host, copy that to the VM, and then successfully run it from the guest VM. It's only the development and TestFlight builds that fail. If I could run TestFlight in the guest VM then I'm sure that would work. But since you can't log into the AppleID in the guest VM, that's not an option. **How do I build my app on my host Mac in such a way that I can run it in one or more guest VMs?***
Asked by HangarRash (169 rep)
Feb 12, 2024, 12:05 AM
Last activity: Feb 12, 2024, 04:54 AM