From bc5400e8612120d46b2b64d2b6fd8e16acc00b11 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 24 Aug 2018 16:23:56 +0200 Subject: [PATCH] [mmp] Show an error if trying to build a 32-bit app with Xcode 10. Fixes #4569. (#4684) (#4690) Fixes https://github.com/xamarin/xamarin-macios/issues/4569. --- docs/website/mmp-errors.md | 12 ++++++++++++ docs/website/mtouch-errors.md | 2 ++ tools/mmp/driver.cs | 6 ++++++ 3 files changed, 20 insertions(+) diff --git a/docs/website/mmp-errors.md b/docs/website/mmp-errors.md index c0c832f675..bffa33c982 100644 --- a/docs/website/mmp-errors.md +++ b/docs/website/mmp-errors.md @@ -158,6 +158,18 @@ As a last-straw solution, use an older version of Xamarin.Mac that does not requ +#### MM0138: Building 32-bit apps is not possible when using Xcode 10. Please migrate project to the Unified API. + +Xcode 10 does not support building 32-bit applications. + +The project must be [migrated to a Unified project](https://docs.microsoft.com/en-us/xamarin/cross-platform/macios/unified/updating-mac-apps) in order to support 64-bit. + +#### MM0139: Building 32-bit apps is not possible when using Xcode 10. Please change the architecture in the project's Mac Build options to 'x86_64'. + +Xcode 10 does not support building 32-bit applications. + +Change the architecture in the project's Mac Build options to 'x86_64' in order to build a 64-bit application. + # MM1xxx: file copy / symlinks (project related) ### MM1034: Could not create symlink '{file}' -> '{target}': error {number} diff --git a/docs/website/mtouch-errors.md b/docs/website/mtouch-errors.md index f1391feada..fcc65a8858 100644 --- a/docs/website/mtouch-errors.md +++ b/docs/website/mtouch-errors.md @@ -699,6 +699,8 @@ that can't be found. mtouch may in certain cases still find references at a later point, which means that if the build otherwise succeeds, this warning can be ignored. + + # MT1xxx: Project related error messages ### MT10xx: Installer / mtouch diff --git a/tools/mmp/driver.cs b/tools/mmp/driver.cs index 277ff4b1a2..8bcd7ea7eb 100644 --- a/tools/mmp/driver.cs +++ b/tools/mmp/driver.cs @@ -484,6 +484,12 @@ namespace Xamarin.Bundler { // InitializeCommon needs SdkVersion set to something valid ValidateSDKVersion (); + if (action != Action.RunRegistrar && XcodeVersion.Major >= 10 && !Is64Bit) { + if (IsClassic) + throw ErrorHelper.CreateError (138, "Building 32-bit apps is not possible when using Xcode 10. Please migrate project to the Unified API."); + throw ErrorHelper.CreateError (139, "Building 32-bit apps is not possible when using Xcode 10. Please change the architecture in the project's Mac Build options to 'x86_64'."); + } + // InitializeCommon needs the current profile if (IsClassic) Profile.Current = new MonoMacProfile ();