Skip to content

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

Description

@rolfbjarne

Steps to reproduce:

  1. Create iOS Single view App
  2. Build for device

Expected:

There are no warnings

Actual:

  1. After building project, there are two warnings
  In file included from /Users/rolf/Projects/devdiv1283065/obj/iPhone/Debug/mtouch-cache/registrar.m:3:
/Users/rolf/Projects/devdiv1283065/obj/iPhone/Debug/mtouch-cache/registrar.h(20,43): warning GBD8E3C1A: 'retain (or strong)' attribute on property 'window' does not match the property inherited from 'UIWindowSceneDelegate' [-Wproperty-attribute-mismatch] [/Users/rolf/Projects/devdiv1283065/devdiv1283065.csproj]
          @property (nonatomic, assign) UIWindow * window;
                                                   ^
/Users/rolf/Projects/devdiv1283065/obj/iPhone/Debug/mtouch-cache/registrar.h(41,43): warning GBD8E3C1A: 'retain (or strong)' attribute on property 'window' does not match the property inherited from 'UIApplicationDelegate' [-Wproperty-attribute-mismatch] [/Users/rolf/Projects/devdiv1283065/devdiv1283065.csproj]
          @property (nonatomic, assign) UIWindow * window;

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIf an issue is a bug or a pull request a bug fixiOSIssues affecting iOSmacOSIssues affecting macOS

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions