From 457b8888ff28d0248440d92524f3ea8620fad774 Mon Sep 17 00:00:00 2001 From: David Britch Date: Mon, 13 Nov 2023 14:50:40 +0000 Subject: [PATCH 1/2] Troubleshoot a remote build. --- docs/includes/remote-ios-build-net8.md | 20 +++++++++++++++++++ docs/ios/deployment/publish-cli.md | 2 ++ docs/ios/pair-to-mac.md | 2 ++ .../mac-catalyst/deployment/publish-ad-hoc.md | 1 + .../deployment/publish-outside-app-store.md | 1 + 5 files changed, 26 insertions(+) create mode 100644 docs/includes/remote-ios-build-net8.md diff --git a/docs/includes/remote-ios-build-net8.md b/docs/includes/remote-ios-build-net8.md new file mode 100644 index 0000000000..b8b85afc29 --- /dev/null +++ b/docs/includes/remote-ios-build-net8.md @@ -0,0 +1,20 @@ +--- +ms.topic: include +ms.date: 11/13/2023 +--- + +::: moniker range=">=net-maui-8.0" + +### Troubleshoot a remote build + +If a `RuntimeIdentifier` isn't specified when building remotely from the command line on Windows, the architecture of the Windows machine will be used. This occurs because the `RuntimeIdentifier` has to be set early in the build process, before the build can connect to the Mac to derive its architecture. + +if a `RuntimeIdentifier` isn't specified when building remotely using Visual Studio on Windows, the IDE will detect the architecture of the remote Mac and set it accordingly. Overriding the default can be achieved by setting the `$(ForceSimulatorX64ArchitectureInIDE)` build property: + +```xml + + true + +``` + +::: moniker-end diff --git a/docs/ios/deployment/publish-cli.md b/docs/ios/deployment/publish-cli.md index c32369ff1e..9de3040e21 100644 --- a/docs/ios/deployment/publish-cli.md +++ b/docs/ios/deployment/publish-cli.md @@ -167,6 +167,8 @@ During the publishing process it maybe necessary to allow `codesign` to run on y :::image type="content" source="media/publish/codesign.png" alt-text="Allow codesign to sign your app on your paired Mac."::: +[!INCLUDE [Troubleshoot a remote build in .NET 8](~/includes/remote-ios-build-net8.md)] + ## Distribute the app The *.ipa* file can be distributed with one of the following approaches: diff --git a/docs/ios/pair-to-mac.md b/docs/ios/pair-to-mac.md index 4ed68d428a..034deae47c 100644 --- a/docs/ios/pair-to-mac.md +++ b/docs/ios/pair-to-mac.md @@ -167,3 +167,5 @@ The parameters passed to `dotnet` in the above example are: The first time Pair to Mac logs in to a Mac build host from either Visual Studio 2022 or the command-line, it sets up SSH keys. With these keys, future logins won't require a username or password. Newly created keys are stored in **%LOCALAPPDATA%\Xamarin\MonoTouch**. If the `ServerPassword` parameter is omitted from a command-line build invocation, Pair to Mac attempts to log in to the Mac build host using the saved SSH keys. + +[!INCLUDE [Troubleshoot a remote build in .NET 8](~/includes/remote-ios-build-net8.md)] diff --git a/docs/mac-catalyst/deployment/publish-ad-hoc.md b/docs/mac-catalyst/deployment/publish-ad-hoc.md index 8b8ab8674e..bd7056b273 100644 --- a/docs/mac-catalyst/deployment/publish-ad-hoc.md +++ b/docs/mac-catalyst/deployment/publish-ad-hoc.md @@ -167,6 +167,7 @@ To publish your Mac Catalyst app from the command line on a Mac, open a terminal | `-p:CodesignKey` | The name of the code signing key. Set to the name of your distribution certificate, as displayed in Keychain Access. | | `-p:CodesignProvision` | The provisioning profile to use when signing the app bundle. | | `-p:CodesignEntitlements` | The path to the entitlements file that specifies the entitlements the app requires. Set to `Platforms\MacCatalyst\Entitlements.plist`. | +| `-p:RuntimeIdentifier` | The runtime identifier (RID) for the project. Release builds of .NET MAUI Mac Catalyst apps default to using `maccatalyst-x64` and `maccatalyst-arm64` as runtime identifiers, to support universal apps. To support only a single architecture, specify `maccatalyst-x64` or `maccatalyst-arm64`. | | `-p:UseHardenedRuntime` | Set to `true` to enable the hardened runtime, which is required for Mac Catalyst apps that are distributed outside of the Mac App Store. | [!INCLUDE [Additional build parameters](../includes/additional-build-parameters.md)] diff --git a/docs/mac-catalyst/deployment/publish-outside-app-store.md b/docs/mac-catalyst/deployment/publish-outside-app-store.md index 58bb9df166..147ae0529d 100644 --- a/docs/mac-catalyst/deployment/publish-outside-app-store.md +++ b/docs/mac-catalyst/deployment/publish-outside-app-store.md @@ -214,6 +214,7 @@ To publish your Mac Catalyst app from the command line on a Mac, open a terminal | `-p:CodesignProvision` | The provisioning profile to use when signing the app bundle. | | `-p:CodesignEntitlements` | The path to the entitlements file that specifies the entitlements the app requires. Set to `Platforms\MacCatalyst\Entitlements.plist`. | | `-p:PackageSigningKey` | The package signing key to use when signing the package. Set to the name of your installer certificate, as displayed in Keychain Access. | +| `-p:RuntimeIdentifier` | The runtime identifier (RID) for the project. Release builds of .NET MAUI Mac Catalyst apps default to using `maccatalyst-x64` and `maccatalyst-arm64` as runtime identifiers, to support universal apps. To support only a single architecture, specify `maccatalyst-x64` or `maccatalyst-arm64`. | | `-p:UseHardenedRuntime` | Set to `true` to enable the hardened runtime, which is required for Mac Catalyst apps that are distributed outside of the Mac App Store. | [!INCLUDE [Additional build parameters](../includes/additional-build-parameters.md)] From d85f37a246f6bf8746591188a7b4b5f3e611bdd9 Mon Sep 17 00:00:00 2001 From: David Britch Date: Mon, 13 Nov 2023 15:01:20 +0000 Subject: [PATCH 2/2] Edits. --- docs/includes/remote-ios-build-net8.md | 20 -------------------- docs/ios/deployment/publish-cli.md | 16 +++++++++++++++- docs/ios/pair-to-mac.md | 2 +- 3 files changed, 16 insertions(+), 22 deletions(-) delete mode 100644 docs/includes/remote-ios-build-net8.md diff --git a/docs/includes/remote-ios-build-net8.md b/docs/includes/remote-ios-build-net8.md deleted file mode 100644 index b8b85afc29..0000000000 --- a/docs/includes/remote-ios-build-net8.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -ms.topic: include -ms.date: 11/13/2023 ---- - -::: moniker range=">=net-maui-8.0" - -### Troubleshoot a remote build - -If a `RuntimeIdentifier` isn't specified when building remotely from the command line on Windows, the architecture of the Windows machine will be used. This occurs because the `RuntimeIdentifier` has to be set early in the build process, before the build can connect to the Mac to derive its architecture. - -if a `RuntimeIdentifier` isn't specified when building remotely using Visual Studio on Windows, the IDE will detect the architecture of the remote Mac and set it accordingly. Overriding the default can be achieved by setting the `$(ForceSimulatorX64ArchitectureInIDE)` build property: - -```xml - - true - -``` - -::: moniker-end diff --git a/docs/ios/deployment/publish-cli.md b/docs/ios/deployment/publish-cli.md index 9de3040e21..a0322f338c 100644 --- a/docs/ios/deployment/publish-cli.md +++ b/docs/ios/deployment/publish-cli.md @@ -167,7 +167,21 @@ During the publishing process it maybe necessary to allow `codesign` to run on y :::image type="content" source="media/publish/codesign.png" alt-text="Allow codesign to sign your app on your paired Mac."::: -[!INCLUDE [Troubleshoot a remote build in .NET 8](~/includes/remote-ios-build-net8.md)] +::: moniker range=">=net-maui-8.0" + +### Troubleshoot a remote build + +If a `RuntimeIdentifier` isn't specified when building remotely from the command line on Windows, the architecture of the Windows machine will be used. This occurs because the `RuntimeIdentifier` has to be set early in the build process, before the build can connect to the Mac to derive its architecture. + +If a `RuntimeIdentifier` isn't specified when building remotely using Visual Studio on Windows, the IDE will detect the architecture of the remote Mac and set it accordingly. Overriding the default can be achieved by setting the `$(ForceSimulatorX64ArchitectureInIDE)` build property: + +```xml + + true + +``` + +::: moniker-end ## Distribute the app diff --git a/docs/ios/pair-to-mac.md b/docs/ios/pair-to-mac.md index 034deae47c..4d36e303d0 100644 --- a/docs/ios/pair-to-mac.md +++ b/docs/ios/pair-to-mac.md @@ -168,4 +168,4 @@ The first time Pair to Mac logs in to a Mac build host from either Visual Studio If the `ServerPassword` parameter is omitted from a command-line build invocation, Pair to Mac attempts to log in to the Mac build host using the saved SSH keys. -[!INCLUDE [Troubleshoot a remote build in .NET 8](~/includes/remote-ios-build-net8.md)] +For more information about building iOS apps from the Windows command-line, see [Publish an iOS app using the command line](~/ios/deployment/publish-cli.md).