Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App is stuck during build #21

Closed
pinkysek opened this issue May 25, 2024 · 8 comments
Closed

App is stuck during build #21

pinkysek opened this issue May 25, 2024 · 8 comments

Comments

@pinkysek
Copy link

pinkysek commented May 25, 2024

first of all like others I want to thank you for your work with these libraries.

I tried upgrade old Xamarin.Firebase.iOS.* (8.10.0.3) libraries for these new AdamE.Firebase.iOS.* libraries with latest version 10.24.0 but I have problem with build my app which is stuck during build I left it alone for 2 hours and still nothing happened. My problem is I don't have any error message or something so I don't know what is wrong. It's same for simulator or real device. When I tried go back to old libraries build works again withount any problem. I would be very grateful for any help or where I can get more info from some build logs or someting like this.

Environment:
Visual Studio Pro 2022 for Windows version 17.9.6
Xcode on Mac version 15.3
.NET iOS app (originally Xamarin.iOS) not MAUI with target framework net8.0-ios

This is how my iOS project .csproj looks:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0-ios</TargetFramework>
    <OutputType>Exe</OutputType>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <SupportedOSPlatformVersion>11.0</SupportedOSPlatformVersion>
    <UseMauiEssentials>true</UseMauiEssentials>
    <ProvisioningType>manual</ProvisioningType>
    <CodesignKey>iPhone Developer</CodesignKey>
    <CodesignProvision>AppName - Devel 2024</CodesignProvision>
  </PropertyGroup>
  <!--https://github.com/xamarin/GoogleApisForiOSComponents/issues/643#issuecomment-1920970044-->
  <PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
    <_ExportSymbolsExplicitly>false</_ExportSymbolsExplicitly>
  </PropertyGroup>
  <PropertyGroup>
    <FirebaseCrashlyticsUploadSymbolsEnabled>True</FirebaseCrashlyticsUploadSymbolsEnabled>
  </PropertyGroup>
  <PropertyGroup>
    <FirebaseCrashlyticsUploadSymbolsContinueOnError>False</FirebaseCrashlyticsUploadSymbolsContinueOnError>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-ios|AnyCPU'">
    <MtouchLink>SdkOnly</MtouchLink>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <MtouchLink>SdkOnly</MtouchLink>
  </PropertyGroup>
  <ItemGroup>
    <None Remove="GoogleService-Info.plist" />
  </ItemGroup>
  <ItemGroup>
    <BundleResource Include="GoogleService-Info.plist">
      <CopyToOutputDirectory>Never</CopyToOutputDirectory>
    </BundleResource>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="AdamE.Firebase.iOS.Analytics" Version="10.24.0" />
    <PackageReference Include="AdamE.Firebase.iOS.CloudMessaging" Version="10.24.0" />
    <PackageReference Include="AdamE.Firebase.iOS.Core" Version="10.24.0" />
    <PackageReference Include="AdamE.Firebase.iOS.Crashlytics" Version="10.24.0" />
    <PackageReference Include="AdamE.Firebase.iOS.Installations" Version="10.24.0" />
    <PackageReference Include="Cirrious.FluentLayout" Version="3.0.0" />
    <PackageReference Include="ImageCaching.Nuke" Version="3.0.1" />
    <PackageReference Include="Microsoft.Maui.Essentials" Version="8.0.20" />
    <PackageReference Include="MvvmCross" Version="9.2.0" />
    <PackageReference Include="Serilog.Sinks.Xamarin" Version="1.0.0" />
    <PackageReference Include="Xamarin.Build.Download" Version="0.11.4" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\..\plugins\MobileBarcodeScanner.iOS\MobileBarcodeScanner.iOS.csproj" />
    <ProjectReference Include="..\..\plugins\MvvmCross.Plugin.Sidebar\MvvmCross.Plugin.Sidebar.csproj" />
    <ProjectReference Include="..\AppName.Core\AppName.Core.csproj" />
  </ItemGroup>
  <!-- Target needed until LinkWithSwiftSystemLibraries makes it into the SDK: https://github.com/xamarin/xamarin-macios/pull/20463 -->
  <Target Name="LinkWithSwift" DependsOnTargets="_ParseBundlerArguments;_DetectSdkLocations" BeforeTargets="_LinkNativeExecutable">
      <PropertyGroup>
          <_SwiftPlatform Condition="$(RuntimeIdentifier.StartsWith('iossimulator-'))">iphonesimulator</_SwiftPlatform>
          <_SwiftPlatform Condition="$(RuntimeIdentifier.StartsWith('ios-'))">iphoneos</_SwiftPlatform>
      </PropertyGroup>
      <ItemGroup>
          <_CustomLinkFlags Include="-L" />
          <_CustomLinkFlags Include="/usr/lib/swift" />
          <_CustomLinkFlags Include="-L" />
          <_CustomLinkFlags Include="$(_SdkDevPath)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/$(_SwiftPlatform)" />
          <_CustomLinkFlags Include="-Wl,-rpath" />
          <_CustomLinkFlags Include="-Wl,/usr/lib/swift" />
      </ItemGroup>
  </Target>
</Project>
@pinkysek
Copy link
Author

I had an idea and I tried older version and AdamE.Firebase.iOS.* with version 10.23.0 works well on simulator and I can see my test crash in Firebase Crashlytics and Analytics works too. But I don't know why app is stuck during build with latest version.

@AdamEssenmacher
Copy link
Owner

#4 (comment)

@pinkysek
Copy link
Author

#4 (comment)

ye it looks my problem is same like this #4 (comment) but I really don't know what to do with it... I tried turn off Windows Defender and some other things...

@pinkysek
Copy link
Author

btw I tried upload my iOS app with 10.23.0 on TestFlight but my app crashing during start up but in debug mode on real device or simulator there is no problem,

@bengavin
Copy link

@pinkysek - Install 7-zip directly on your Windows device [or Parallels instance], then add the following to your project file:

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('windows'))">
	<XamarinBuildDownloadUser7ZipPath>C:\Program Files\7-Zip\7z.exe</XamarinBuildDownloadUser7ZipPath>
</PropertyGroup>

This resolved it for us [besides the various long-path support requirements and issues with Visual Studio].

@pinkysek
Copy link
Author

pinkysek commented Jun 17, 2024

@pinkysek - Install 7-zip directly on your Windows device [or Parallels instance], then add the following to your project file:

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('windows'))">
	<XamarinBuildDownloadUser7ZipPath>C:\Program Files\7-Zip\7z.exe</XamarinBuildDownloadUser7ZipPath>
</PropertyGroup>

This resolved it for us [besides the various long-path support requirements and issues with Visual Studio].

@bengavin nice thanks for your help... I will try it later :)

@PauchardThomas
Copy link

@pinkysek - Install 7-zip directly on your Windows device [or Parallels instance], then add the following to your project file:

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('windows'))">
	<XamarinBuildDownloadUser7ZipPath>C:\Program Files\7-Zip\7z.exe</XamarinBuildDownloadUser7ZipPath>
</PropertyGroup>

This resolved it for us [besides the various long-path support requirements and issues with Visual Studio].

For me it doesn't solve the issue at all. (I got 7Z.exe in the exact same path)

@AdamEssenmacher
Copy link
Owner

dotnet/android-libraries#1047 remaining Windows build hanging problems are probably this. Until it is fixed, XBD stuff might need to be manually unpacked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants