warning "retain (or strong)' attribute on property 'window' does not match the property inherited from 'UIApplicationDelegate' [-Wproperty-attribute-mismatch]" after building ios xamarin app
- Dominant language
- C#
- Stars
- 2.9k
- Forks
- 576
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
### 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](https://github.com/xamarin/xamarin-macios/files/6041904/build.txt)
Project:
[devdiv1283065-d8864fc.zip](https://github.com/xamarin/xamarin-macios/files/6041912/devdiv1283065-d8864fc.zip)
Source: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1283065
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.