dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.15k stars 1.74k forks source link

[iOS] App deploys fine, but doesn't get launched on simulator / phone #12827

Closed AndreasReitberger closed 1 year ago

AndreasReitberger commented 1 year ago

Description

One of my projects just doesn't start the app on the simulator or phone. While using a phone, the app gest copied fine to the device, just without launching it. If I start the app manually then, all works fine.

But debugging is not possible this way. I'm kinda lost. Other projects are working fine, just this one refuses to launch (Android works fine).

3>--skip-unresolved true --notrimwarn --custom-data "LinkerOptionsFile=obj/Debug/net7.0-ios/iossimulator-x64/custom-linker-options.txt" --custom-data DisableMarkingOfCopyAssemblies=true --verbose -b --disable-opt unusedtypechecks --feature ObjCRuntime.Runtime.Arch.IsSimulator true --enable-serialization-discovery 3>/usr/bin/mdimport bin/Debug/net7.0-ios/iossimulator-x64/ 3>Done building project "RemoteControlRepetierServer.csproj". 4>------ Deploy started: Project: RemoteControlRepetierServer, Configuration: Debug Any CPU ------ ========== Build: 3 succeeded, 0 failed, 1 up-to-date, 0 skipped ========== ========== Build started at 12:52 PM and took 54,581 seconds ========== ========== Deploy: 1 succeeded, 0 failed, 0 skipped ========== ========== Deploy started at 12:52 PM and took 54,581 seconds ==========

After this, the app actually should get launched.

Steps to Reproduce

.

Link to public reproduction project repository

.

Version with bug

7.0 (current)

Last version that worked well

7.0 (current)

Affected platforms

iOS

Affected platform versions

iOS 16.2

Did you find any workaround?

No response

Relevant log output

<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
        <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
        <!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
        <!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
        <OutputType>Exe</OutputType>
        <RootNamespace>RemoteControlRepetierServer</RootNamespace>
        <UseMaui>true</UseMaui>
        <SingleProject>true</SingleProject>
        <ImplicitUsings>enable</ImplicitUsings>

        <!-- Display name -->
        <ApplicationTitle>RC Repetier Server</ApplicationTitle>

        <!-- App Identifier -->
        <ApplicationId>com.andreasreitberger.repservapppro</ApplicationId>
        <ApplicationIdGuid>6D816D5D-DC13-446A-8E40-C83680760AFD</ApplicationIdGuid>

        <!-- Versions -->
        <ApplicationDisplayVersion>1.3.0</ApplicationDisplayVersion>
        <ApplicationVersion>2</ApplicationVersion>

        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
        <TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
        <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>

        <AndroidManifestApplicationName>RC Repetier Server</AndroidManifestApplicationName>
        <AndroidManifestApplicationPackageName>com.andreasreitberger.repservapppro</AndroidManifestApplicationPackageName>
        <AndroidManifestApplicationVersionNumber>1</AndroidManifestApplicationVersionNumber>
        <AndroidManifestApplicationVersionName>1.3.0</AndroidManifestApplicationVersionName>
        <AndroidManifestApplicationInstallLocation>auto</AndroidManifestApplicationInstallLocation>

        <ProvisioningType>manual</ProvisioningType>
        <!--
        <CodesignKey>Apple Development: Andreas Reitberger (C5P4CG7SMQ)</CodesignKey>
        <CodesignProvision>Remote Control Repetier Pro Development</CodesignProvision>
        -->
        <UserSecretsId>xxx</UserSecretsId>
    </PropertyGroup>

    <!-- https://stackoverflow.com/questions/73970553/release-build-of-ios-maui-failed-with-msb3191-incorrectly-combined-path -->
    <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)'=='Release|net7.0-ios'">
        <EnableAssemblyILStripping>False</EnableAssemblyILStripping>
    </PropertyGroup>

    <!-- https://github.com/dotnet/maui/issues/8928#issuecomment-1238866009 -->
    <PropertyGroup Condition="$(TargetFramework.Contains('-ios'))">
        <UseInterpreter>true</UseInterpreter>
    </PropertyGroup>

    <ItemGroup>
        <!-- App Icon -->
        <MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#000000" />

        <!-- Splash Screen -->
        <MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#3498DB" BaseSize="256,256" Resize="true" />

        <!-- Images -->
        <MauiImage Include="Resources\Images\*" />

        <!-- Custom Fonts -->
        <MauiFont Include="Resources\Fonts\*" />

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

    <ItemGroup>
        <None Remove="Resources\Images\Flags\de_de.png" />
        <None Remove="Resources\Images\Flags\en_us.png" />
        <None Remove="Resources\Images\Flags\es_es.png" />
        <None Remove="Resources\Images\Flags\pt_pt.png" />
        <None Remove="Resources\Images\Flags\ru_ru.png" />
    </ItemGroup>

    <ItemGroup>
      <Folder Include="Platforms\iOS\Settings\" />
    </ItemGroup>

    <ItemGroup>
      <MauiImage Include="Resources\Images\Flags\de_de.png" />
      <MauiImage Include="Resources\Images\Flags\en_us.png" />
      <MauiImage Include="Resources\Images\Flags\es_es.png" />
      <MauiImage Include="Resources\Images\Flags\pt_pt.png" />
      <MauiImage Include="Resources\Images\Flags\ru_ru.png" />
    </ItemGroup>

    <ItemGroup>
      <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
      <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" />
      <PackageReference Include="CommunityToolkit.Maui" Version="3.1.0" />
      <PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
      <PackageReference Include="Microsoft.AppCenter" Version="5.0.1" />
      <PackageReference Include="Microsoft.AppCenter.Analytics" Version="5.0.1" />
      <PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.1" />
      <PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
      <PackageReference Include="Plugin.InAppBilling" Version="6.7.0" />
      <PackageReference Include="Plugin.LocalNotification" Version="10.1.3" />
      <PackageReference Include="RCoreSharp" Version="1.0.8" />
      <PackageReference Include="RepetierServerSharpApi" Version="1.2.7-preview" />
      <PackageReference Include="SettingsMaui" Version="1.0.2" />
      <PackageReference Include="SharedMauiXamlStylesLibrary" Version="1.0.7-preview" />
      <PackageReference Include="Syncfusion.Maui.Charts" Version="20.4.44" />
      <PackageReference Include="Syncfusion.Maui.Core" Version="20.4.44" />
      <PackageReference Include="Syncfusion.Maui.Gauges" Version="20.4.44" />
      <PackageReference Include="Syncfusion.Maui.ListView" Version="20.4.44" />
      <PackageReference Include="Syncfusion.Maui.Sliders" Version="20.4.44" />
      <PackageReference Include="Syncfusion.Maui.TabView" Version="20.4.44" />
    </ItemGroup>

    <ItemGroup>
      <ProjectReference Include="..\..\..\RepetierServerSharpApi\src\RepetierServerSharpApi\RepetierServerSharpApi.csproj" />
      <ProjectReference Include="..\..\..\SharedMauiCoreLibrary\source\SharedMauiCoreLibrary\SharedMauiCoreLibrary\SharedMauiCoreLibrary.csproj" />
      <ProjectReference Include="..\..\..\SharedMauiXamlStyles\source\SharedMauiXamlStylesLibrary\SharedMauiXamlStylesLibrary\SharedMauiXamlStylesLibrary.csproj" />
    </ItemGroup>

    <ItemGroup>
      <Compile Update="Resources\Localization\SemanticStrings.Designer.cs">
        <DesignTime>True</DesignTime>
        <AutoGen>True</AutoGen>
        <DependentUpon>SemanticStrings.resx</DependentUpon>
      </Compile>
      <Compile Update="Resources\Localization\Strings.Designer.cs">
        <DesignTime>True</DesignTime>
        <AutoGen>True</AutoGen>
        <DependentUpon>Strings.resx</DependentUpon>
      </Compile>
      <Compile Update="Views\Pages\PrintServerWelcomePageOld.xaml.cs">
        <DependentUpon>PrintServerWelcomePageOld.xaml</DependentUpon>
      </Compile>
    </ItemGroup>

    <ItemGroup>
      <EmbeddedResource Update="Resources\Localization\SemanticStrings.resx">
        <Generator>PublicResXFileCodeGenerator</Generator>
        <LastGenOutput>SemanticStrings.Designer.cs</LastGenOutput>
      </EmbeddedResource>
      <EmbeddedResource Update="Resources\Localization\Strings.resx">
        <Generator>PublicResXFileCodeGenerator</Generator>
        <LastGenOutput>Strings.Designer.cs</LastGenOutput>
      </EmbeddedResource>
    </ItemGroup>

    <ItemGroup>
      <MauiXaml Update="Themes\Controls\Syncfusion\SfBusyIndicator.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Themes\DefaultColors.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Themes\DefaultTheme.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Themes\ItemTemplates\ListViewGroupHeaderTemplates.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Themes\ItemTemplates\ListViewHeaderTemplates.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Themes\ItemTemplates\ListViewItemTemplates.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Themes\ItemTemplates\ListViewSwipeTemplates.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\AboutPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\AboutServerPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\ConsolePage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\DashboardPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\EventManagerPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\FilesPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\HistoryListPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\HistoryPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\LoadingPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\ManageGpioPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\AdjustCloudSyncModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\AdjustPrivacyModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\FilterMessagesModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\FilterModelsModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\FilterPrintersModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\FilterServersModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\InAppPurchaseStoreModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\PrintServerFilamentControlModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\PrintServerLoginModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\PrintServerManageJobListModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\PrintServerMessagesModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\PrintServerPrinterControlModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\PrintServerReconnectModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\PrintServerSelectPrinterModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\PrintServerSelectServerModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\PrintServerStateModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\PrintServerViewCurrentPrintModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\PrintServerViewModelModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\PrintServerViewModelsModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\PrintServerViewProjectModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\QuickStartModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\SelectColorModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\SettingsPrintServerNewModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\SettingsQuickModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\SettingsWebCamModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\SettingsWebCamNewModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\SetupProxyModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Modals\SupportProjectModalPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\ModernViewFrontPanelPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Pages\AboutProVersionPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Pages\PrintServerViewWebCamPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Pages\PrintServerWelcomePage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Pages\PrintServerWelcomePageOld.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Pages\ProjectOverviewPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Pages\VersionDetailPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\PrintersPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\PrivacyPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\ProjectsPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\QuickCommandsPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\SettingsPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsAdsSetupPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsAppEntryPointPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsBackgroundModePage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsBackupPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsCloudSyncPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsDemoModeSetupPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsHelpPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsLanguagePage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsLookAndFeelPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsNotificationsPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsPermissionPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsPrintServerAdditionalFunctionsPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsPrintServerGcodeScripts.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsPrintServerLimitsPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsPrintServerPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsRestorePage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsSupportFAQPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\Settings\SettingsSupportTermsOfUsePage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\SingleControlPanelPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
      <MauiXaml Update="Views\WebActionsPage.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
    </ItemGroup>

    <PropertyGroup Condition="$(TargetFramework.Contains('-windows'))">
        <OutputType>WinExe</OutputType>
        <RuntimeIdentifier>win10-x64</RuntimeIdentifier>
    </PropertyGroup>

    <!--<PropertyGroup Condition="'$(TargetFramework)'=='net7.0-ios'">-->
    <PropertyGroup>
        <CodesignKey>Apple Development: Created via API (xxx)</CodesignKey>
        <CodesignProvision>Remote Control Repetier Pro Development</CodesignProvision>
        <ProvisioningType>manual</ProvisioningType>
    </PropertyGroup>
    <PropertyGroup Condition="'$(TargetFramework)'=='net7.0-ios'">
      <CodesignKey>Apple Development: Created via API (xxx)</CodesignKey>
      <CodesignProvision>VS: com.andreasreitberger.repservapppro Development</CodesignProvision>
    </PropertyGroup>
</Project>
AndreasReitberger commented 1 year ago

Figured it out, was due to a long path like it seems. I shortened the project depth and now it's working. The strange thing is, that there was no error indicating to a "too long path" issue...