Skip to content

Commit aa9c8d6

Browse files
authored
Troubleshoot a remote build. (#1879)
* Troubleshoot a remote build. * Edits.
1 parent 11b2ceb commit aa9c8d6

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

docs/ios/deployment/publish-cli.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,22 @@ During the publishing process it maybe necessary to allow `codesign` to run on y
167167

168168
:::image type="content" source="media/publish/codesign.png" alt-text="Allow codesign to sign your app on your paired Mac.":::
169169

170+
::: moniker range=">=net-maui-8.0"
171+
172+
### Troubleshoot a remote build
173+
174+
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.
175+
176+
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:
177+
178+
```xml
179+
<PropertyGroup Condition="'$(Configuration)' == 'Release' And '$(TargetFramework)' == 'net8.0-ios'">
180+
<ForceSimulatorX64ArchitectureInIDE>true</ForceSimulatorX64ArchitectureInIDE>
181+
</PropertyGroup>
182+
```
183+
184+
::: moniker-end
185+
170186
## Distribute the app
171187

172188
The *.ipa* file can be distributed with one of the following approaches:

docs/ios/pair-to-mac.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,5 @@ The parameters passed to `dotnet` in the above example are:
167167
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**.
168168
169169
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.
170+
171+
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).

docs/mac-catalyst/deployment/publish-ad-hoc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ To publish your Mac Catalyst app from the command line on a Mac, open a terminal
167167
| `-p:CodesignKey` | The name of the code signing key. Set to the name of your distribution certificate, as displayed in Keychain Access. |
168168
| `-p:CodesignProvision` | The provisioning profile to use when signing the app bundle. |
169169
| `-p:CodesignEntitlements` | The path to the entitlements file that specifies the entitlements the app requires. Set to `Platforms\MacCatalyst\Entitlements.plist`. |
170+
| `-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`. |
170171
| `-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. |
171172

172173
[!INCLUDE [Additional build parameters](../includes/additional-build-parameters.md)]

docs/mac-catalyst/deployment/publish-outside-app-store.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ To publish your Mac Catalyst app from the command line on a Mac, open a terminal
214214
| `-p:CodesignProvision` | The provisioning profile to use when signing the app bundle. |
215215
| `-p:CodesignEntitlements` | The path to the entitlements file that specifies the entitlements the app requires. Set to `Platforms\MacCatalyst\Entitlements.plist`. |
216216
| `-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. |
217+
| `-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`. |
217218
| `-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. |
218219

219220
[!INCLUDE [Additional build parameters](../includes/additional-build-parameters.md)]

0 commit comments

Comments
 (0)