Archiving .NET MAUI iOS apps not working #3777
Labels
area-publishing
Issues with the app packaging/publishing process (ipk/apk/msix/trimming)
fixed-in-6.0.200-preview.12
Look for this fix in 6.0.200-preview.12!
platform/iOS 🍎
t/bug
Something isn't working
Description
Note: this has already been discussed inside the team (on Teams), so sorry if I go a bit fast with the information here 😅 some things might not look right because I'm copy/pasting some things from the conversation as well
TL;DR: something about
LaunchScreen.xib
is messing up the archiving because it causes invalid path names on Windows. At this time we're not sure how and why theLaunchScreen.xib
is there because we don't even seem to need it. Full story below.Here is the LaunchScreen.xib.zip from my project, maybe it will give us some hint where it comes from. Inside it has a label with "copyright (c) 2017" and "Sample.iOS"?
Content seems to be identical to this file in the templates and in the Blazor templates.
Full Story
I'm trying to archive my .NET MAUI iOS app (just a File > New project) with this command:
dotnet publish -f:net6.0-ios -c:Release /p:ServerAddress=192.168.1.77 /p:ServerUser=jfversluis /p:TcpPort=58181 /p:ArchiveOnBuild=true /p:_DotNetRootRemoteDirectory=/Users/jfversluis/Library/Caches/Xamarin/XMA/SDKs/dotnet/
It seems to go fine for the most part, but then gives me a lot of errors with IL stripping it seems. Binlog can be reviewed here. All the errors are the same except for the filename:
error MSB3030: Could not copy the file "obj/Release/net6.0-ios/ios-arm64//stripped/Microsoft.Extensions.Configuration.Abstractions.dll" because it was not found.
Notice how it has a double slash at the
stripped
folder. If I look at the filesystem and ignore the double slash, all those files are actually in that folder so it seems to mess up the path somehow.I then added the
/p:EnableAssemblyILStripping=false
switch to thepublish
command which skipped the IL stripping and made the process continue. However, a new error came:Binlog of this one is here.
The mentioned zip file from there error above is there, but notice there is a weird additional
C:\
near the end of the path.Since this all happens while paired to a Mac, I was investigating the Mac side of things and looked in the cache for my app. There I found a path like this:
/Users/jfversluis/Library/Caches/Xamarin/mtbs/builds/MauiApp14/2a3e956683debac356cc9a5640c1d9d5fd5b17c9cd2cb8fb47201e1b4b4f4cc1/bin/Release/net6.0-ios/ios-arm64/MauiApp14.app/C:/Users/joverslu/source/repos/MauiApp14/MauiApp14/Platforms/iOS/Resources/LaunchScreen.xib
Again, note how there is a folder with
C:/
in there. On Mac this works, when copied back to Windows, it causes trouble.Then there was some investigation (internal link to Teams conversation) but it seems the way the
MauiSplashscreen
is generated and setup seems OK.Which leaves us with two potential issues at this time: 1 the existance of it causing issues, and 2 we don't want it there anyway. It being the
LaunchScreen.xib
.cc: @Redth @chamons tried to get all the relevant bits out of our conversation, let me know if there is still something missing or I need to provide :)
Steps to Reproduce
dotnet publish -f:net6.0-ios -c:Release /p:ServerAddress=192.168.1.77 /p:ServerUser=jfversluis /p:TcpPort=58181 /p:ArchiveOnBuild=true /p:_DotNetRootRemoteDirectory=/Users/jfversluis/Library/Caches/Xamarin/XMA/SDKs/dotnet/
Version with bug
Preview 10 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
Not tied to a specific iOS version
Did you find any workaround?
Not at this time
Relevant log output
See inline and attached files in Description
The text was updated successfully, but these errors were encountered: