maui: MAUI Blazor. Publish iOS. Can not create an IOS archive. Code object is not signed at all. In subcomponent. SQLLitePCLRaw.lib.e_sqllite.ios.aotdata.arm64

Description

The app is working fine on windows, android and with ios hotreload with local connected iPhone.

The app uses sqllite.

I followed this guide . Now I have connected Mac in cloud and all the apple ids, certificates etc.

When I try to publish a new MAUI Blazor app everything works as expected.

But when I try to publish my app I have this error in Archive Manager window after about 5 minutes of execution:

Can not create an IOS archive..... Process can not be executed on XMA server...... codesign exited with code 1: code object is not signed at all..... In subcomponent..... SQLLitePCLRaw.lib.e_sqllite.ios.aotdata.arm64

Then I tried to unload projects which use sqllite and to remove references to them in MAUI project. The error changed to

Can not create an IOS archive..... Process can not be executed on XMA server...... codesign exited with code 1: code object is not signed at all..... In subcomponent..... System.Security.Cryptography.aotdata.arm64

It seems that it is similar issue which was reported here with pipelines

Other issues I have with iOS. Maybe it would help to understand the core of the main issue:

  1. When I try to just rebuild project in Release, iOS -> RemoteDevice I get this error
  2. Before the last VS update I was able to run iOS 14.2 Emulator. However it showed only white screen. Both for my project and for the new MAUI Blazor project. But now in output I just see that the project was sucessfully rebuild and published and that it took a couple of minutes. Then the debugging just stops and Emulator window doesn’t appear.

Steps to Reproduce

  1. Open the project
  2. Follow the official guide how to publish it to App Store.

Link to public reproduction project repository

https://drive.google.com/file/d/1xhVdTjSpxnjMbiQF64QHjeA_sBiFFP2W/view?usp=sharing

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

xcode 14.2

Did you find any workaround?

No response

Relevant log output

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

The problem is that the app bundle contains a Resources directory. Removing this directory makes the app sign correctly.

This is the file in the directory:

Resources/Raw/client.db

which seems to come from this in the csproj:

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />

Note the attempt to put the remove the “Resources\Raw” part of these paths - which was unsuccessful since files ended up in the Resources\Raw subdirectory.

I had a look at the binlog, and the problem seems to be in the ProcessMauiAssets target, because the GetMauiAssetsPath doesn’t take the LogicalName metadata into account:

Target Name=ProcessMauiAssets Project=Emily.Client.MAUI.csproj
    GetMauiAssetPath
        Assembly = /usr/local/share/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/7.0.59/targets/Microsoft.Maui.Resizetizer.dll
        Parameters
            Input
                Resources/Raw/client.db
                    CopyToOutputDirectory = Always
                    LogicalName = client.db
            ProjectDirectory = /Users/rolf/Downloads/Emily.Client/Emily.Client.MAUI
        OutputItems
            Content
                Resources/Raw/client.db
                    CopyToOutputDirectory = Always
                    LogicalName = client.db
                    Link = Resources/Raw/client.db

Note how the Link metadata contains “Resources/Raw” in the output item.

As a workaround, it seems that setting the Link metadata instead of the LogicalName metadata works:

<MauiAsset Include="Resources\Raw\**" Link="%(RecursiveDir)%(Filename)%(Extension)" />

@jfversluis this looks like it’s a bug in MAUI.

Note: I can reproduce this on a Mac.

Hi @jfversluis. First of all thank you for your videos! They are really heplful.

I updated the first post. I added the link to the zip file with the project. And also I added information about 2 other issues I have with iOS. Maybe they are related.