dotnet maui blazor app crashes on iphone device just by adding builder.Services.AddSingleton

Build Setup: Macbook Air(M1, 2020) Version 12.3.1

VsCode:Version: 1.67.2 (Universal) MacOS

Dotnet: 6.0.300

  1. Created a new Maui App: dotnet new maui-blazor

  2. dotnet publish MyMauiBlazorApp.csproj -f:net6.0-ios -c:Release /p:ServerAddress=myipaddree /p:ServerUser=myuser /p:TcpPort=58181 /p:ArchiveOnBuild=true /p:_DotNetRootRemoteDirectory=/Users//Library/Caches/Xamarin/XMA/SDKs/dotnet/ /p:EnableAssemblyILStripping=false /p:ServerPassword=myuserpassword

  3. Did all ceremonies for publishing to App Store (app,cert,profile)

  4. Published app with Transporter and Test flight

  5. Download and Ran app. All Good and app works normally

  6. Added to iOS/Info.plist

    <key>MinimumOSVersion</key>
    <string>14.2</string>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict> 
  1. Added to MauiProgram.cs
        builder.Services.AddSingleton<IConnectivity>(Connectivity.Current);
  1. Ran thru the same process as before to build .ipa and published to app store

8. Splash Screen appears for a brief time on Iphone 12 Max Pro, then crashes. However, the same code ran successfully locally on my build macbook: dotnet build -t:Run -c:Release -f net6.0-maccatalyst MyMauiBlazorApp.csproj

Any help would be appreciated.



Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)