-
Notifications
You must be signed in to change notification settings - Fork 103
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
[iOS] Current MAUI version 8.0.21 not working on iOS #240
Comments
Same issue |
same issue, Workaround |
Same issue here, but on an M2 Mac /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8043/targets/Xamarin.Shared.Sdk.targets(3,3): Error: clang++ exited with code 1: |
I am facing the same issue. There should be something missing in the csproj that we need to add to prevent the build issue to occur |
It seems to be not only iOS. Our builds are not working on Android as well. With 8.0.21 the build is stuck even after half an hour. After the errors on iOS build we tried to roll back to version 8.0.0.1 and it works. Maybe the android builds will work in Visual Studio, we are working with Rider. |
I am noticing that our Visual Studio builds are 'infinitely pausing' recently as well, looks like some strange interaction with the Xamarin.Build.Download package and the version of MLKit being used. It works successfully on MacOS and in our automated build environment, but on Windows [in Parallels] the builds just freeze during this step:
And this is only if I have build output set to Diagnostics. At default settings, it looks like things just freeze up and I need to cancel the build. 'Run' from the menu seems to work properly. It feels like this is likely an adjacent issue, but maybe getting this library up to the latest version of MLKit would solve both problems? Do we have a repository somewhere for the .JimmyPun610 libraries that this one references? |
Yes it does include MLKCore-8.0.0 in the latest build. |
@JimmyPun610 - do you happen to have your most recent copy of the MLKBarcode iOS API surface? I've gotten the underlying libraries working with the AdamEssenmacher fork of the GoogleApisForiOSComponents (AdamEssenmacher/GoogleApisForiOSComponents#20) and am about to start digging into the API level changes that seem to be breaking the SampleApp. If you had a diff on the ApiDefinition.cs file, that'd be super helpful :) |
Btw where can we find the source code for these two packages: Thanks |
@danardelean - I'm hoping to submit a PR soon that integrates the library I mentioned above rather than the custom builds that are referenced above. Just managed to get them working in MAUI with a local fork of this repo, so look for that soon, hopefully we can get it integrated here. |
@bengavin even if it doesn't get merged and you publish the local repository please comment with a link to the repository. Thanks! |
Anyone managed to find a working solution for this? |
Here it is https://github.com/JimmyPun610/GoogleApisForiOSComponents |
I just published https://www.nuget.org/packages/AdamE.MLKit.iOS.BarcodeScanning, thanks to a major contribution to https://github.com/AdamEssenmacher/GoogleApisForiOSComponents from @bengavin. It has an -alpha suffix pending some validation from the community. These should be compatible with https://github.com/TobiasBuchholz/Plugin.Firebase. Please check it out and report any issues over at https://github.com/AdamEssenmacher/GoogleApisForiOSComponents. |
I've created a PR that updates to the 'alpha2' variant of the package above and it seems to work properly across the 3 builds I've been able to test [iOS Xamarin, iOS MAUI, Android MAUI], my local build is having issues with the Android Xamarin sample and I'm uncertain as to why, the errors don't make any sense :) |
Thank you for the contribution, just tried to merge and build the nuget package but not sure why the dependencies are not updated. |
It looks the packages still missing some file for Xamarin?
|
Not sure what might be happening, I do have that file in my local package directory: pwd: ls: My guess is that, since you're on Windows, you're running into the 255 character path limit, probably similar to this: The solution seems to be getting out of visual studio and working via the command line, or one of the other workarounds listed in that thread. |
Just use Mac to build and it's working, just updated the packages |
I tried this yesterday and it did not work for me i was getting the exact same error, I even tried it out in a fresh project as well... |
You may probably need to try the version just released. |
It looks like the Xamarin Android dependent libraries updated, but it is blocking the build. Just publish the latest version. I think it should fix this issue. Thank you for the contribution @bengavin and @AdamEssenmacher |
I'm doing final validation through our build pipelines now, but for local debugging, 8.0.40.1 works on both my iOS and Android test devices. I'll update this post once I've verified the actual published clients, but looking good so far! EDIT: Released versions work as well. |
I'm trying to install 8.0.40.1 but I run into long path issue. |
The long path issue in Windows 11 is a known problem where users encounter difficulties with file paths that exceed a certain length. Typically, Windows has a maximum path length limit of 260 characters. To address this issue, you can enable long path support by editing the registry and group policy settings. Here’s a step-by-step guide: Registry Editor: Group Policy Editor: After making these changes, restart your computer for them to take effect. Also update Visual Studio to the latest version available and also update windows to the latest version. |
@JimmyPun610 you're going to end up getting a lot of issues opened here complaining about the long path problem on Windows builds. It's not something you'll be able to fix in this project, so feel free to punt them over to the issue on my fork where I'll in turn punt them to the MAUI issue where they'll in turn punt them to the Visual Studio issue At Plugin.Firebase, we added a blurb in our readme documenting the workaround steps. |
Thanks, but I still encounter the same issue. Just to be precise, I'm still on Win10, not 11. |
Thanks, this worked. |
Are you guys facing a build error on the latest version on Android? |
@JimmyPun610 This still did not get resolved with the latest version apparently |
@FreakyAli @LeoJHarris - We are successfully using the latest version [8.0.40.1] in our apps across both iOS and Android [.NET 8 MAUI]. Can you clarify which issue(s) specifically you're running into locally? In our local project file, we have the following item to workaround some Android specific build issues due to 'duplicate' symbol definitions: <ItemGroup Condition="'$(TargetFramework)' == 'net8.0-android'">
<PackageReference Include="Xamarin.AndroidX.Collection" Version="1.4.0.5">
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Collection.Jvm" Version="1.4.0.4">
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.4.0.4">
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Activity" Version="1.9.0.3" />
<PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.9.0.3" />
</ItemGroup> |
@bengavin @JimmyPun610 If this is the case and our Library is dependent on these native packages shouldn't our library handle adding these packages internally? So that a user not natively well-versed can easily install the scanner too? I mean I have done this in the Biometric Plugin, so it should be just as easy to do here too: |
@bengavin Also the issue I am facing is probably different this is my error:
and stack trace:
|
@FreakyAli - That error in particular is due to the long path problem, see this [it's applicable to Windows 10 too]: On the references front, even if we put them in there, you may run into problems in the client app due to other Android refs that need to be manually added, it's just a thing that needs to happen in MAUI + Android land, as you reference different projects / plugins / etc, you may introduce different 'baseline' dependencies that have conflicting versions and the linker can't figure it out. Putting the references directly in the 'endpoint' project fixes the issue, and the ones I linked above are just the ones our project needs, they may -NOT- be the ones your project needs. You'll be 'guided' to the issue resolution during the build process if you watch the logs, it will suggest places that there are conflicts and thus far, we've been able to discern the underlying problematic library and manually add the reference. |
@bengavin I really appreciate the insight, thanks I'll look into this further and get back if I have any queries! |
Describe the bug
I have been using the 8.0.0.1 version with MAUI on both Android and iOS (both Debug and Release builds)
After updating to 8.0.21 Android still works but iOS doesn't build anymore.
StackTrace
System Info:
Additional context
Workaround
Downgraded to version 8.0.0.1 and everything works again.
The text was updated successfully, but these errors were encountered: