Build Unity iOS projects on Windows
Export from Unity as usual, then build it on Windows like any other iOS project.
Build the iOS project that Unity exports on Windows, install it on your iPhone and debug the native layer. Export from Unity as usual and treat the export folder as a regular Xcode project. You don't need a Unity plugin or any change to your Unity project settings.
Steps
Develop in Unity and export an Xcode project
Develop your project in Unity as usual. With the iOS Build Support module installed, switch the platform to iOS in Build Settings and build to a folder. Then open that folder in VS Code with File > Open Folder….
Run doctor
Doctor checks your build environment and fixes anything missing. If you use plugins with iOS dependencies, such as Firebase or Google Mobile Ads, the export folder contains a Podfile. In that case, run pod install in the export folder afterwards. See CocoaPods.
Use either of these
-
VS Code extension
In the title bar of the KXBuild view, open the ··· menu and run Doctor (fix environment).
-
Command line
> kxbuild doctor .\Unity-iPhone.xcodeproj
Write code
Keep writing C# scripts in Unity and export again after changes. The Objective-C plugin code in the export folder gets completion and go to definition in VS Code.
Debug
Connect your iPhone over USB, select it in the KXBuild view and press F5. Debug native code with breakpoints in VS Code and C# scripts with Unity's own debugger. The two work independently.
Release
Build with the Release configuration to get an .ipa in the export folder. To upload it to App Store Connect, see Release and App Store submission.
Use either of these
-
VS Code extension
Switch the configuration to Release in the Build configuration node of the KXBuild view, then run KXBuild: Build from the Command Palette.
-
Command line
The target is always Unity-iPhone. Run the command for your export folder.
No Podfile
> kxbuild build .\Unity-iPhone.xcodeproj -c Release -t Unity-iPhonePodfile, after pod install
> kxbuild build .\Unity-iPhone.xcworkspace -c Release -t Unity-iPhone
Next steps
Build and configure
Debug versus Release, choosing a scheme, target and configuration, overriding build settings, where build products go, when you get an .ipa and when Swift package dependencies resolve.
Release and App Store submission
Build Release with a Distribution certificate to get an .ipa, upload it to App Store Connect with Transporter or Appuploader, then go through TestFlight and App Review. Ad Hoc and enterprise distribution work the same way.
Don't see your framework?
kxbuild is a general-purpose build toolchain, so if your framework produces an Xcode project, KXBuild can build it. The list above covers common cases only. Tell us about your setup.