Why does my .NET MAUI 8.0.100 iOS TestFlight app using Microsoft.Data.SqlClient crash immediately

Kurt K 176 Reputation points
2025-04-07T01:01:17.5833333+00:00

I submitted my app for Apple's TestFlight. After deploying using TestFlight to my iPhone, it crashes immediately, not getting to any of my application code.

This also an iOS device I've provisioned for development testing, so on my Mac build machine, I was able to click the "Open Console" button on the Xcode "Devices and Simulators" window to monitor startup.

Here are 2 lines from the console log seem relevant:

error 20:57:41.143824-0700 TmMobile error: * Assertion at /Users/runner/work/1/s/src/mono/mono/mini/aot-runtime.c:1579, condition `data' not met

default 20:57:41.144581-0700 kernel TmMobile[397] Corpse allowed 1 of 5

... and later in the log:

default 20:57:41.164308-0700 SpringBoard [app<com.plusonepro.tmmobile((null))>:397] Connection to remote process was not established.

default 20:57:41.164576-0700 SpringBoard [app<com.plusonepro.tmmobile((null))>:397] Now flagged as pending exit for reason: launch failed

default 20:57:41.164633-0700 SpringBoard [app<com.plusonepro.tmmobile((null))>:397] Process exited: <RBSProcessExitContext| specific, status:<RBSProcessExitStatus| domain:signal(2) code:SIGABRT(6)>>.

(I can provide all of the log if necessary.)

Prior to submission to Apple's TestFlight program, I tested extensively in Release mode using my development provisioning profile. No problems.

This is my 4th submission to Apple's TestFlight program. The 1st 3 went fine.

There are 2 major differences in app features between the last successful TestFlight submission and this one:

  1. Using .NET MAUI version 8.0.100 rather than version 8.0.82
  2. Using Microsoft.Data.SqlClient rather than System.Data.SqlClient

I made the choice to use Microsoft.Data.SqlClient since it is the recommended replacement for System.Data.SqlClient, and I want to connect to Azure SQL Database, including enabling encrypted connections to the database.

The app works great until I test the app submitted to Apple's TestFlight.

I decided to submit another version where System.Data.SqlClient is installed instead of Microsoft.Data.SqlClient. That version works fine!

Some background: I submitted a question about using Microsoft.Data.SqlClient back in 2022:

https://learn.microsoft.com/en-us/answers/questions/1100604/net-maui-ios-build-error-using-microsoft-data-sqlc

At that time it was a build error that was stopping me. It has been 3 years, so I thought I would try again. Now the app builds and runs fine using Microsoft.Data.SqlClient until I test a version submitted to Apple's TestFlight program.

Also, back in 2022 I was only interested in local network connections. As you can see from the final answer to this, it was OK for me to use System.Data.SqlClient as long as it still exists.

Now I want to connect to Azure SQL Database, so I want to use the latest/recommended SqlClient from Microsoft.

Can you please clarify the status of using Microsoft.Data.SqlClient in .NET MAUI, and explain why only an app submitted to TestFlight fails to work properly? Perhaps there a configuration setting I can use? I plan on going to .NET MAUI using .NET 9 a.s.a.p. Perhaps it will work with .NET 9?

Thank you.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,094 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Kurt K 176 Reputation points
    2025-05-06T00:37:39.0666667+00:00

    After upgrading from .NET MAUI 8 to 9, now the publish for Apple App Store / TestFlight (build that includes Microsoft.Data.SqlClient) runs fine!

    I will eventually test with Native AOT, since it has some benefits, but this lets me move forward.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.