Monterey is the latest macOS version released (October 2021). This version only officially supports Xcode 13 or higher (reference).
As a result, since GeneXus 17 Upgrade 5 and prior versions require previous versions of Xcode, it is not possible to directly compile Apple applications with those GeneXus versions.
Note: Xcode 13 can be installed in macOS Big Sur, the version previous to Monterey (Xcode 13 Release Notes).
However, there is a way to compile Apple apps generated in GeneXus versions previous to GeneXus 17 Upgrade 6 in a Mac with macOS Monterey.
Download the installer (.xip file) of the desired Xcode version (i.e. 12.5.1) from the Apple Developer site.
Install Xcode using the .xip file previously downloaded. After the installation process, the Xcode icon will show an incompatibility sign.
Warning: The filename of each Xcode version in the Mac must not include spaces. Note that in the above example underscores are used.
If the recently installed Xcode version is opened, the OS displays a compatibility error message.
The Mac now has two (or more) Xcode installations. Check that the names of these versions in the Mac do not include spaces.
Compile the Apple app from GeneXus using, for example, GeneXus 17 Upgrade 5. The compilation process will finish without errors. This is possible because GeneXus could successfully find an Xcode version compatible with the GeneXus version used to build the application. In order to achieve this, remember to follow Step 3.
Execute the Xcode version prior to version 13 in the Mac using the Terminal (reference).
- Open Terminal
- Drag the Xcode icon to the Terminal (path to the Xcode application is displayed)
- Add the following to the end of the path: "/Contents/MacOS/Xcode"
After this, the desired version of Xcode is opened. From this moment, you can work in Xcode as usual, performing build actions or executing the generated application in emulators or physical devices.