-
Notifications
You must be signed in to change notification settings - Fork 511
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
warning "retain (or strong)' attribute on property 'window' does not match the property inherited from 'UIApplicationDelegate' [-Wproperty-attribute-mismatch]" after building ios xamarin app #10722
Comments
Any update, fix or workaround? |
@awattar none that I know of. Note that this is a warning only, so it shouldn't break anything. |
Using a legacy project, which I ported from Xamarin to net7.0 I had the same error as documented in the initial post. In my projects, Debug builds where declared with I guess this is rather a workaround, than a fix. |
I was asked to share this here from a stack overflow question https://stackoverflow.com/questions/79094858/maui-error-retain-or-strong-attribute-on-property-window-does-not-match-pro/79101001#79101001: I am also getting this error, however unlike what @rolfbjarne said this does break the app; it works in all simulators but crashes as soon as it attempts to boot on a physical IOS device. This is weather I am trying to boot it via TestFlight or attempting to boot to an IOS device connected to my Mac via a USB. Again this is the error:
I googled around a bit and have tried a few things. I changed my AppDelegate file:
Adding this part:
I also tried @vogtadi solution: setting
But this also did not help. I have also made sure to delete the Upon further testing I am not sure if I was even the right track whatsoever. I have altered my app delegate class to look like this:
and I still get the same error. I have research this a bit and my problem seems to be more specifically this: The attribute on my So I need to find a way to get my This is where I am stuck. This issue is not specific to 1 app. This happens to any MAUI app even in a brand new untouched MAUI project. I am using MacOS Sequoia 15.0.1, Xcode 16 beta, and dotnet 8.0.401. It doesn't matter what the phone model or IOS version because the issue occurs on every phone we have tried. Would be happy to share anything else to help find a solution. |
@JHUcperry30 the build output is a bit confusing, because first a few warnings are reported, and then errors. Unfortunately the output is truncated before the errors are shown, which makes it look like the problem are the warnings, but they're completely unrelated. Please get an MSBuild binlog, and we'll have a look at the complete output to see what's actually going on. |
Thank you so much for the quick reply @rolfbjarne . When I tried to generate the file it gave me this error:
Condensed version: But it did generate a .binlog file that Github file picker will not let me add... I apologize if I am missing something here... |
You can zip it and attach the zip file. |
Duh, idk why I didn't think to do that. I apologize... |
It looks like you're using a beta version of Xcode:
Can you try upgrading to the latest stable (Xcode 16.0)? |
@rolfbjarne I did not think I could. I did not think Xcode 16 supported dotnet 8: #20802. Someone in this thread recommended using 16 beta which did work for me and that's why I'm still using it. Am I misunderstanding that thread? |
At the very top, it says:
So yes, Xcode 16 is supported on .NET 8. |
I installed Xcode 16 and you are correct it did work this time with my simulators. However, I am still getting the same error as before when attempting to run on a physical device. Here is my new binlog: |
Steps to reproduce:
Expected:
There are no warnings
Actual:
This happens because the static registrar doesn't take into account inherited properties when generating the Objective-C property declaration.
Full build log:
build.txt
Project:
devdiv1283065-d8864fc.zip
Source: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1283065
The text was updated successfully, but these errors were encountered: