Skip to content

Commit

Permalink
Warn when building 32-bit macOS applications (xamarin#3564)
Browse files Browse the repository at this point in the history
  • Loading branch information
chamons committed Feb 22, 2018
1 parent 6495235 commit dc0f991
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/website/mmp-errors.md
Expand Up @@ -136,6 +136,16 @@ See [Build optimizations](https://developer.xamarin.com/guides/cross-platform/ma

### <a name="MM0133"/>MM0133: Found more than 1 assembly matching '{0}' choosing first: '{1}'

### <a name="MM0134"/>MM0134: 32-bit applications should be migrated to 64-bit.

Apple has announced that it will not allow macOS App Store submissions of 32-bit apps (starting January 2018).

In addition 32-bit applications will not run on the version of macOS after High Sierra "without compromises".

For more details: https://developer.apple.com/news/?id=06282017a

Consider updating your application and any dependencies to 64-bit.


# MM1xxx: file copy / symlinks (project related)

Expand Down
2 changes: 2 additions & 0 deletions docs/website/mtouch-errors.md
Expand Up @@ -658,6 +658,8 @@ See [Build optimizations](https://developer.xamarin.com/guides/cross-platform/ma

When using --recursive-directories, only 1 assembly should match

<!-- 0134 used by mmp -->

# MT1xxx: Project related error messages

### MT10xx: Installer / mtouch
Expand Down
17 changes: 17 additions & 0 deletions tests/mmptest/src/MMPTest.cs
Expand Up @@ -240,6 +240,23 @@ public void Unified_HelloWorld_ShouldHaveNoWarnings ()
});
}

[Test]
public void Unified_HelloWorld_ShouldWarnOn32Bit ()
{
RunMMPTest (tmpDir => {
TI.UnifiedTestConfig test = new TI.UnifiedTestConfig (tmpDir) {
CSProjConfig = "<XamMacArch>i386</XamMacArch>"
};
string buildResults = TI.TestUnifiedExecutable (test).BuildOutput;
Assert.True (buildResults.Contains ("MM0134"), "32-bit Modern did not contain MM0134");
test.XM45 = true;
buildResults = TI.TestUnifiedExecutable (test).BuildOutput;
Assert.True (buildResults.Contains ("MM0134"), "32-bit Full did not contain MM0134");
});
}

[Test]
public void Unified_HelloWorld_ShouldHaveNoRegistrarWarnings ()
{
Expand Down
3 changes: 3 additions & 0 deletions tools/mmp/driver.cs
Expand Up @@ -1237,6 +1237,9 @@ static int Compile ()
if (IsUnified && !arch_set)
arch = "x86_64";

if (arch != "x86_64")
ErrorHelper.Warning (134, "32-bit applications should be migrated to 64-bit.");

try {
var args = new StringBuilder ();
if (App.EnableDebug)
Expand Down

0 comments on commit dc0f991

Please sign in to comment.