| name | description |
|---|---|
| build_ios_client | Instructions for pairing with a Mac host, configuring provisioning profiles, and building the .NET MAUI iOS app on Windows. |
👉 This skill outlines the process of building the GnollHack iOS client from Windows, utilizing a paired Mac for native compilation and deployment.
🍎 Prerequisites and Mac Setup
1. Mac Build Host
- A Mac computer running macOS with Xcode installed.
- The Mac must be accessible over the network from your Windows machine.
- Apple Developer account credentials added to Xcode.
2. Windows Setup
- Visual Studio with .NET MAUI workloads.
- Pair to Mac: In Visual Studio, use the Pair to Mac button in the toolbar to connect to your Mac build host.
3. Provisioning Profiles
- Create an Apple Developer account.
- Generate development and distribution provisioning profiles for the App ID
com.soundmindgames.GnollHackMon the Apple Developer portal. - In Visual Studio, navigate to Tools -> Options -> Xamarin -> Apple Accounts, add your account, and download all profiles.
- Configure
GnollHackM.csprojto use your provisioning profiles for Debug and Release configurations.
📱 Building the Native iOS Library
- Open the native solution
win\win32\vs\GnollHack.slnin Visual Studio. - Ensure you are paired to the Mac.
- Rebuild the solution.
- Visual Studio delegates the compilation of the C core to the paired Mac, producing the static library
libgnollhackios.a. - MSBuild targets (
aftergnollhackios.proj) automatically copylibgnollhackios.afrom the Mac output (C:\mac-out\) to the appropriate native references directory inwin\win32\xpl\GnollHackM\Platforms\iOS\libs\. - Other necessary assets (
nhdat, tilesets) are also copied over via MSBuild tasks.
- Visual Studio delegates the compilation of the C core to the paired Mac, producing the static library
🚀 Building the MAUI iOS Client
- Open the MAUI solution
win\win32\xpl\GnollHackM\GnollHackM.sln. - Connect your iOS device to the Mac via USB.
- In Visual Studio (Windows), select your iOS device from the iOS Remote Devices dropdown.
- Select the desired configuration (Debug or Release).
- Rebuild the
GnollHackM.slnsolution. - Start debugging. The application will be deployed to the device connected to the Mac.
🔧 Troubleshooting
- If builds fail or hang, try cleaning the solution, or deleting the
objandbindirectories inGnollHackM. - On the Mac host, clearing the
~/Library/Caches/mtbsor~/Library/Caches/XMAdirectories can resolve stale build states.