Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[META] Xcode 16.0 Support for .NET 8/9 and MAUI #24819

Closed
jfversluis opened this issue Sep 18, 2024 · 51 comments
Closed

[META] Xcode 16.0 Support for .NET 8/9 and MAUI #24819

jfversluis opened this issue Sep 18, 2024 · 51 comments
Labels
s/triaged Issue has been reviewed

Comments

@jfversluis
Copy link
Member

jfversluis commented Sep 18, 2024

Description below is copied from the .NET for iOS repository, please check that issue for the latest actual state.


⚠️ Xcode 16 support is now released for .NET 8, please see release notes https://github.com/xamarin/xamarin-macios/releases/tag/dotnet-8.0.1xx-xcode16.0-8303 for installation instructions. This version of the macios workloads will be also included in the next version of Visual Studio 17.11.5.


The current plan is to release Xcode 16 support with .NET 9 in November.

The current stable version of our workload is not compatible with Xcode 16. We recommend against upgrading until .NET 9 is released.

Warning

Xcode 15.4 does not support macOS 15 (Sequoia). This also means that we don't recommend upgrading your macOS development machines until .NET 9.


You can follow our progress here:

https://github.com/xamarin/xamarin-macios/wiki/xcode16.0-Bindings-Status

@jfversluis jfversluis pinned this issue Sep 18, 2024
@dotnet-policy-service dotnet-policy-service bot added the s/triaged Issue has been reviewed label Sep 18, 2024
@dotnet dotnet deleted a comment from github-actions bot Sep 18, 2024
@phillippschmedt
Copy link

phillippschmedt commented Sep 19, 2024

Thanks a lot for your work. I would kindly ask you to provide XCode 16 support for .NET 8/MAUI. We need a break from updating and bug fixing. Please.

.NET 8 is suppose to be supported until November 10, 2026 (https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core)
.NET 8 MAUI is suppose to be supported until May 14, 2025 (https://dotnet.microsoft.com/en-us/platform/support/policy/maui)

@davidortinau
Copy link
Contributor

We are currently validating Xcode 16 compatible builds for .NET 8 and .NET 9. Thanks for your patience as we complete that QA work.

In the meantime, let me recommend that you verify all your tools and SDKs are compatible with a major OS release before you update your primary development environment. I also recommend you don't allow key things like macOS, Xcode, Android, etc. to auto-update, at least to major breaking versions.

@yalamandarao
Copy link

Currently I'm also facing same issue after I update Mac OS and Xcode 16. I'm unable to run the application.

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8030/targets/Xamarin.Shared.Sdk.targets(2260,3): error : /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8030/tools/bin/mlaunch exited with code 1: [/Users/testmac/Desktop/Delete/TTTT_iOS2/iOSApp1/iOSApp1.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8030/targets/Xamarin.Shared.Sdk.targets(2260,3): error : error HE0004: Could not load the framework 'IDEDistribution' (path: /Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution):  [/Users/testmac/Desktop/Delete/TTTT_iOS2/iOSApp1/iOSApp1.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8030/targets/Xamarin.Shared.Sdk.targets(2260,3): error : dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution, 0x0001): Library not loaded: @rpath/AppThinning.framework/Versions/A/AppThinning [/Users/testmac/Desktop/Delete/TTTT_iOS2/iOSApp1/iOSApp1.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8030/targets/Xamarin.Shared.Sdk.targets(2260,3): error :   Referenced from: <33FF2F3B-A96F-37B4-BA4E-887BD882BF9D> /Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution [/Users/testmac/Desktop/Delete/TTTT_iOS2/iOSApp1/iOSApp1.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8030/targets/Xamarin.Shared.Sdk.targets(2260,3): error :   Reason: tried: '/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8030/tools/lib/mlaunch/mlaunch.app/Contents/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8030/tools/lib/mlaunch/mlaunch.app/Contents/Frameworks/AppThinning.fra [/Users/testmac/Desktop/Delete/TTTT_iOS2/iOSApp1/iOSApp1.csproj]

@AuriR
Copy link

AuriR commented Sep 24, 2024

The XCode 16 auto-update broke our ability to publish. Can we use the preview version of VS while we wait? It seems unreasonable - and I'd imagine some would say unacceptable - that you'd know there's a breaking change and advise "just wait until November."

@AuriR
Copy link

AuriR commented Sep 24, 2024

I did fix the sudden "Entitlements.plist" issue that occurred after realizing XCode had auto-updated. Simply added an Entitlements.plist file (with empty XML, not just empty) and build worked fine for debug. However, Publish ability is completely broken, regardless of which device I target, updated to iOS 18 or not. Microsoft's been very good about day-and-date support with Xamarin in the past - is that continuing with MAUI, please? :)

@AuriR
Copy link

AuriR commented Sep 24, 2024

And thanks Dave - I hope I'm not coming across as a ranter, friend :)

@AuriR
Copy link

AuriR commented Sep 24, 2024

Heads up - If you have Rider, you can target the previous XCode 15.4 and continue to build/publish apparently. Even on Sequoia.

@AuriR
Copy link

AuriR commented Sep 25, 2024

I was able to successfully downgrade to XCode 15.4 and build again. I'm still on Sonoma, though. Agreed about staying away from new macOS builds, as they limit your downgradability.

@sindrevr
Copy link

Installing Xcode 15.4 workaround works... but still hot reload does not. Any workarounds to have hot reload up running again?

@AuriR
Copy link

AuriR commented Sep 25, 2024

Installing Xcode 15.4 workaround works... but still hot reload does not. Any workarounds to have hot reload up running again?

On an iOS 18 device? Might need to stick with a 17.x device for now. Unless Preview supports it - but haven't tried.

@sindrevr
Copy link

Both iOS 18 and 17, on simulator & real device.

@victorivan1692
Copy link

La instalación de Xcode 15.4 funciona, pero la recarga en caliente no. ¿Existe alguna solución alternativa para que la recarga en caliente vuelva a funcionar?

¿En un dispositivo iOS 18? Es posible que deba quedarse con un dispositivo con la versión 17.x por ahora, a menos que Preview lo admita, pero no lo he probado.

I am getting the following error:
Error loading partial Info.plist template file 'obj\Release\net8.0-ios\ios-arm64\resizetizer\sp\MauiInfo.plist': No se puede encontrar una parte de la ruta de acceso 'D:\Apps\FalconSAT\FalconSAT.DxSuppNostics\obj\Release\net8.0-ios\ios-arm64\resizetizer\sp\MauiInfo.plist'

@MarcoErlwein
Copy link

How do we solve the blank screen problem for users who updated their devices to IOS 18.0 version?

@AuriR
Copy link

AuriR commented Sep 26, 2024

How do we solve the blank screen problem for users who updated their devices to IOS 18.0 version?

I imagine if it hasn't been reported, report it, with full repro steps. I haven't had blank screens fyi. But I'm using a MAUI/Blazor Hybrid app.

@rcarde
Copy link

rcarde commented Sep 27, 2024

@jfversluis Not sure where this sits; however, the .NET for iOS team (xamarin-macios @dalexsoto) just pushed out Xcode 16 and iOS 18 support in dotnet workload set version 8.0.402.1. This breaks our pipelines that pull in the latest workload with linker errors.

##[warning]ILLINK(0,0): Warning MT0079: The recommended Xcode version for Microsoft.iOS 18.0.8303 is Xcode 16.0 or later. The current Xcode version (found in /Applications/Xcode_15.4.app/Contents/Developer) is 15.4.

Error MT4162: The type 'UIKit.UITextFormattingViewController' (used as a parameter in UIKit.UITextView/_UITextViewDelegate.DidEndFormatting) is not available in iOS 17.5 (it was introduced in iOS 18.0). Please build with a newer iOS SDK (usually done by using the most recent version of Xcode).

Probably need a warning somewhere about sticking with workload set version 8.0.402.

@dasunmax89
Copy link

dasunmax89 commented Sep 27, 2024

Hi all,
I also mistakenly upgraded mac os to Sequoia and non of above methods worked for me. (MAUI)
then I switched to Jetbrains Rider IDE and installed XCode 15.4 in a separate folder and set the sdk location to there. yikes it works. simulators are loading and can debug.
I still couldn't test with real device so far because my dev environment really f'ed up and wasted nearly one week to fix that
you will definitely need to set the Xcode command line tools to 15.4

for that simply invoke this command to open obsolete Xcode
simply paste in terminal hit enter
/[path]/[to]/[XXXXCode 15.4]/Xcode.app/Contents/MacOS/Xcode
for me
/Users/dasunnayanajith/Documents/Xcode.app/Contents/MacOS/Xcode


Same thing in Shakespeare form hereby
Greetings to all,

In mine folly, I too hath been led astray and didst unwittingly upgrade mine macOS to Sequoia, whereupon none of the methods heretofore mentioned hath borne fruit. Alas, no solution was to be found! Thus, I did forsake my usual implements and took to Jetbrains Rider IDE. In sooth, I did install Xcode 15.4 in a separate chamber (folder, forsooth) and didst set the SDK path to that location. Behold! It doth work. The simulators now spring to life, and I can, at long last, partake in the sacred art of debugging.

Yet, lo, I hath not yet tested upon the flesh and blood of real devices, for mine development environment lies in utter ruin, and I have squandered a full week's time in pursuit of resolution.

Verily, thou must also adjust thy Xcode command line tools to the version 15.4.

To do this, invoke the command that opens the elder Xcode.

@Cheesebaron
Copy link
Contributor

@dasunmax89 tried updating your workloads and running with xcode 16? They were updated today.

@dasunmax89
Copy link

@dasunmax89 tried updating your workloads and running with xcode 16? They were updated today.

@Cheesebaron wow. I need to try that. but my company officially purchased Jetbrains rider and I will go with that dude.
thanks for the reply.

@jfversluis
Copy link
Member Author

Please see the update to the initial comment. Xcode 16 support for .NET 8 is out now!

@Cheesebaron
Copy link
Contributor

Seems like Rider EAP 2024.3 doesn't support it yet. Devices not detected: https://youtrack.jetbrains.com/issue/RIDER-118000/Refreshing-devices-not-working-with-Xcode-16

@Cheesebaron
Copy link
Contributor

So updated to .NET SDK 8.0.402 and latest iOS workload 18.0.8303.

brew upgrade dotnet-sdk
sudo dotnet workload install ios

Running and debugging in VSCode works well 🤘

image

@NatWobble
Copy link

@Cheesebaron

It seems to be running Ok on Rider 2024.2.5

@Cheesebaron
Copy link
Contributor

@Cheesebaron

It seems to be running Ok on Rider 2024.2.5

Yeah seems like it is only the 2024.3 EAP 1 that is having issues finding them, latest stable 2024.2.5 seems ok. Neat!

@AuriR
Copy link

AuriR commented Sep 27, 2024

Please see the update to the initial comment. Xcode 16 support for .NET 8 is out now!

Fantastic, thanks! Is that in Preview or a nuget update? I didn't see any VS updates. Great work, all!

@Cheesebaron
Copy link
Contributor

Please see the update to the initial comment. Xcode 16 support for .NET 8 is out now!

Fantastic, thanks! Is that in Preview or a nuget update? I didn't see any VS updates. Great work, all!

It is all in the dotnet SDK. So update the SDK to 8.0.402 and update the dotnet workloads

@omghb
Copy link

omghb commented Sep 27, 2024

I think something like this could work:

sudo dotnet workload install ios --version 8.0.401

See: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-workload-sets

👍 Thanks, your solution works fine.

I tried with a rollback-file first. This works too but I prefer your approach.

dotnet workload install ios maui --source https://api.nuget.org/v3/index.json --from-rollback-file https://github.com/dotnet/maui/releases/download/8.0.82/8.0.82.json

@MichaelLHerman
Copy link

I think something like this could work:

sudo dotnet workload install ios --version 8.0.401

See: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-workload-sets

@Cheesebaron Can you provide a global.json that would do the same thing? My build process is using dotnet workload restore and is still pulling in 18.0.8303

@MarcoErlwein
Copy link

I resolved this way:

Install Xcode 16
Install Simulators 18.0
Add the lines of code from the attached image, line 25 to 29

IOS18

@pininfarino
Copy link

Our iOS build is broken since yesterday:

ILLink : iOS error IL7000: An error occurred while executing the custom linker steps. Please review the build log for more information. [/___.csproj::TargetFramework=net8.0-ios]
/Users/builder/azdo/_work/1/s/xamarin-macios/src/build/dotnet/ios/generated-sources/UIKit/UITextView.g.cs(3343): error MT4162: The type 'UIKit.UITextFormattingViewController' (used as a parameter in UIKit.UITextView/_UITextViewDelegate.DidBeginFormatting) is not available in iOS 17.5 (it was introduced in iOS 18.0). Please build with a newer iOS SDK (usually done by using the most recent version of Xcode). [/___.csproj::TargetFramework=net8.0-ios]

Our build servers install the workload with dotnet workload install ios maui --source https://api.nuget.org/v3/index.json. Yesterday a new ios workload was published which does not work anymore with Xcode 15.4.

ios                        18.0.8303/8.0.100      SDK 8.0.400

How can we install the previous workload?

ios                        17.5.8030/8.0.100      SDK 8.0.400

A have same problem into Azure DevOps

@nll
Copy link

nll commented Sep 27, 2024

For people on .NET 8.0.400 band (probably check the global.json file)

  • For Xcode 16 - dotnet workload install ios --version 8.0.402.1
  • For Xcode 15.4 - dotnet workload install ios --version 8.0.402.0

We can see the workload set versions here and documentation here how it can be specified on global.json file.

@rcarde
Copy link

rcarde commented Sep 27, 2024

I think something like this could work:

sudo dotnet workload install ios --version 8.0.401

See: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-workload-sets

You can also pin 8.0.402. The point release 8.0.402.1 breaks Xcode 15.4 used in pipelines.

@zijianhuang
Copy link

If you have upgraded to xcode v16 and macos Sequoia 15, this is not the end of the world, before November when the magic may come.
At least in this instance, you don't need to download xCode to v15.4 or alike.

Don't run to such situation again

Before upgrading xCode, make sure checking https://github.com/dotnet/maui/wiki/Release-Versions since Visual Studio could be a few weeks or a few months behind the latest xCode.

Remarks:

  • I have great respects to Xamarin/MAUI teams, since I understand the difficulty of developing cross platforms dev tools, as I have been through qt and Kylix etc.
  • I urge app developers to be patient, especially the .NET and MAUI teams might have suffered from recent massive layoff of staffs.

What you can do before November

You can do local test with AdHoc profile though without debugging, and build with production profile, as long as you can pair with the mac, yes, VS 2022 v17.11.4 can pair with xcode v16 and macos Sequoia 15, even though in VS:

  1. Emulators not appearing
  2. iOS devices connected to Mac not appearing.
  3. You can see only "Remote device, Local device, Simulators (xcode mismatch)

For testing, though without debugging, you can do these steps:

  1. Build with the AdHoc profile locked with your iOS devices. Making debug build is for saving build time, while release build is OK too. And the IPA file will be generated on the mac side: (/Users/myUserName/Library/Caches/Xamarin/mtbs/builds/My.App.iOS/5415201399a22f416e1bab831c712aee75c7d2a4c970ced5391e2/bin/Debug or Release/net8.0-ios/ios-arm64/
  2. On Mac, go to "xCode/Window/Devices and Simulator". And in the Devices tab, you see the connected devices, click one of them, Mac may try to pair with it and copy some dev needed files. You may get a warning asking you to put your iOS device to Developer Mode, and do it.
  3. On Mac, locate the IPA file and drag & drop (or Plus) it to "Installed Apps", then Mac will upload the IPA to your device.
  4. Then run the app on your iOS device.

Without debugging, it may not be good for new app development, or legacy apps with dirty codes, which need intensive debugging, often with simulators. Other than this, this workaround is just less ideal than the November magic.

@yalamandarao
Copy link

@ronanj2 thank you. We are also facing same issue for iOS and macOS application while submitting the app to AppStore.

Any one know how to fix the issue ?

@mackayn
Copy link

mackayn commented Sep 30, 2024

Please see the update to the initial comment. Xcode 16 support for .NET 8 is out now!

I know I've asked on Twitter but would appreciate any workarounds to allow us VS2022 users to install and use the XCode 16 support.

Tried adding global.json but when the build host is paired and the .net workloads are installed, it seems to fallback

{
  "tools": {
    "dotnet": "8.0.402"
  },
  "sdk": {
    "workloadVersion": "18.0.8303"
    "allowPrerelease": false
	"rollForward": "disable"
  }
}

@MysterDru
Copy link

MysterDru commented Sep 30, 2024

This is the global.json we are using across our 3 MAUI projects.

{
  "sdk": {
    "version": "8.0.401",
    "workloadVersion": "8.0.401.0",
    "rollForward": "disable",
    "allowPrerelease": false
  }
}

We've pinned the dotnet sdk & workload set to 8.0.401 as we haven't done any testing against 8.0.402.

I did confirm that the same settings would work for 402 to pull in the correct iOS sdk version.

To pull in the 17.5 ios sdk

{
  "sdk": {
    "version": "8.0.402",
    "workloadVersion": "8.0.402"
 }

To pull in the 18.0 ios sdk.

{
  "sdk": {
    "version": "8.0.402",
    "workloadVersion": "8.0.402.1"
 }

@mackayn
Copy link

mackayn commented Sep 30, 2024

This is the global.json we are using across our 3 MAUI projects.

{
  "sdk": {
    "version": "8.0.401",
    "workloadVersion": "8.0.401.0",
    "rollForward": "disable",
    "allowPrerelease": false
  }
}

We've pinned the dotnet sdk & workload set to 8.0.401 as we haven't done any testing against 8.0.402.

I did confirm that the same settings would work for 402 to pull in the correct iOS sdk version.

To pull in the 17.5 ios sdk

{
  "sdk": {
    "version": "8.0.402",
    "workloadVersion": "8.0.402"
 }

To pull in the 18.0 ios sdk.

{
  "sdk": {
    "version": "8.0.402",
    "workloadVersion": "8.0.402.1"
 }

Are you using VS2022 to a remote mac build host ?

@MysterDru
Copy link

This is the global.json we are using across our 3 MAUI projects.

{
  "sdk": {
    "version": "8.0.401",
    "workloadVersion": "8.0.401.0",
    "rollForward": "disable",
    "allowPrerelease": false
  }
}

We've pinned the dotnet sdk & workload set to 8.0.401 as we haven't done any testing against 8.0.402.
I did confirm that the same settings would work for 402 to pull in the correct iOS sdk version.
To pull in the 17.5 ios sdk

{
  "sdk": {
    "version": "8.0.402",
    "workloadVersion": "8.0.402"
 }

To pull in the 18.0 ios sdk.

{
  "sdk": {
    "version": "8.0.402",
    "workloadVersion": "8.0.402.1"
 }

Are you using VS2022 to a remote mac build host ?

No, we use rider on a mac for local development and a macOS-14 agent in azure Devops for our pipelines.

This global.json configuration was not tested on a VS2022 windows environment as we have no developers on our team with that setup.

@jcmanke
Copy link
Contributor

jcmanke commented Sep 30, 2024

For people on .NET 8.0.400 band (probably check the global.json file)

  • For Xcode 16 - dotnet workload install ios --version 8.0.402.1
  • For Xcode 15.4 - dotnet workload install ios --version 8.0.402.0

We can see the workload set versions here and documentation here how it can be specified on global.json file.

Is there something I'm missing that clearly documents what the dependencies are of a specific workload version short of installing it and reading the output for what it pulls down?

@nll
Copy link

nll commented Sep 30, 2024

@jcmanke the sdk documentation refer to the package that contains the workload set information, we can open it and check the json inside that contains all the workloads versions (for instance using "Open in NuGet Package Explorer").

As far as I understand from other issue comments we may have a new command to display that information.

I'm not sure if there is anything else besides installing a particular version and list the workloads after.

I did compile a list of workload versions per workload set for 8.0.400 if that can be useful

Workload 8.0.400.0 8.0.401.0 8.0.401.1 8.0.402.0 8.0.402.1
Microsoft.NET.Sdk.Aspire 8.1.0 8.1.0 8.2.0 8.2.0 8.2.1
Microsoft.NET.Workload.Emscripten.net6 8.0.8 8.0.8 8.0.8 8.0.8 8.0.8
Microsoft.NET.Workload.Mono.ToolChain.net6 8.0.8 8.0.8 8.0.8 8.0.8 8.0.8
Microsoft.NET.Workload.Mono.ToolChain.Current 8.0.8 8.0.8 8.0.8 8.0.8 8.0.8
Microsoft.NET.Sdk.Maui 8.0.71 8.0.72 8.0.72 8.0.82 8.0.82
Microsoft.NET.Workload.Emscripten.net7 8.0.8 8.0.8 8.0.8 8.0.8 8.0.8
Microsoft.NET.Workload.Emscripten.Current 8.0.8 8.0.8 8.0.8 8.0.8 8.0.8
Microsoft.NET.Workload.Mono.ToolChain.net7 8.0.8 8.0.8 8.0.8 8.0.8 8.0.8
Microsoft.NET.Sdk.iOS 17.2.8078 17.5.8020 17.5.8020 17.5.8030 18.0.8303
Microsoft.NET.Sdk.MacCatalyst 17.2.8078 17.5.8020 17.5.8020 17.5.8030 18.0.8303
Microsoft.NET.Sdk.macOS 14.2.8078 14.5.8020 14.5.8020 14.5.8030 15.0.8303
Microsoft.NET.Sdk.tvOS 17.2.8078 17.5.8020 17.5.8020 17.5.8030 18.0.8303
Microsoft.NET.Sdk.Android 34.0.113 34.0.113 34.0.113 34.0.138 34.0.138

@DarkWingDuck1020

This comment was marked as off-topic.

@mackayn

This comment was marked as off-topic.

@mackayn
Copy link

mackayn commented Oct 1, 2024

Description below is copied from the .NET for iOS repository, please check that issue for the latest actual state.

⚠️ Xcode 16 support is now released for .NET 8, please see release notes https://github.com/xamarin/xamarin-macios/releases/tag/dotnet-8.0.1xx-xcode16.0-8303 for installation instructions. This version of the macios workloads will be also included in the next version of Visual Studio 17.11.5.

The current plan is to release Xcode 16 support with .NET 9 in November.

The current stable version of our workload is not compatible with Xcode 16. We recommend against upgrading until .NET 9 is released.

Warning

Xcode 15.4 does not support macOS 15 (Sequoia). This also means that we don't recommend upgrading your macOS development machines until .NET 9.

You can follow our progress here:

https://github.com/xamarin/xamarin-macios/wiki/xcode16.0-Bindings-Status

Any ideas when 17.11.5 might become available. Need to give some realistic timescales to management.

@Kalyxt

This comment was marked as off-topic.

@mackayn

This comment was marked as off-topic.

@DarkWingDuck1020

This comment was marked as off-topic.

@jfversluis
Copy link
Member Author

I think we're getting a bit sidetracked here. The initial support is out now and I think this issue now describes most scenarios and how to get into a working state. As such, I think we can close this one! Thanks everyone!

@Kremed
Copy link

Kremed commented Oct 4, 2024

After updating to Xcode 16 and trying to build my .NET MAUI iOS project (targeting net8.0-ios), I encountered an error during the publishing process when attempting to build for Release or Debug on a simulator. The error occurred while running the strip tool, which resulted in the following error message:

strip exited with code 139

Steps taken:

  1. Updated to the latest stable workload: Workload version: 8.0.402.1.
  2. Re-synced both Windows and Mac machines to ensure they both had the same version.
  3. Cleared Xamarin Shared cache files.
  4. Confirmed that the issue persisted with the same error message after reattempting the build.

Here’s the exact output from the build log showing the error:

C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8303\tools\msbuild\iOS\Xamarin.Shared.targets(2848,3): error : strip exited with code 139 [C:\Users\USER\OneDrive\Desktop\SwapPay\Swapay\Mobile\Mobile.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8303\tools\msbuild\iOS\Xamarin.Shared.targets(2848,3): error :          [C:\Users\USER\OneDrive\Desktop\SwapPay\Swapay\Mobile\Mobile.csproj::TargetFramework=net8.0-ios]

Temporary Workaround:
I discovered a solution that allows the build process to continue successfully. By adding the following tag to the iOS Release property in the .csproj file, I was able to bypass the strip error:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
  <_ExportSymbolsExplicitly>false</_ExportSymbolsExplicitly>
</PropertyGroup>

Environment Details:
Workload version: 8.0.402.1

Installed Workload Id      Installation Source
----------------------------------------------------------
android                    SDK 8.0.400, VS 17.11.35312.102
aspire                     SDK 8.0.400, VS 17.11.35312.102
ios                        SDK 8.0.400, VS 17.11.35312.102
maccatalyst                SDK 8.0.400, VS 17.11.35312.102
maui-windows               SDK 8.0.400, VS 17.11.35312.102
wasm-tools                 SDK 8.0.400, VS 17.11.35312.102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s/triaged Issue has been reviewed
Projects
None yet
Development

No branches or pull requests