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

[net9.0] Revert: Add MauiUIApplicationDelegate remote notification methods #24907

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

Redth
Copy link
Member

@Redth Redth commented Sep 24, 2024

Unfortunately, when these lifecycle events were added in #23452 we didn't consider the implications of having the methods implemented on the appdelegate had with Apple app store submissions. Basically if the app delegate implements these methods, Apple assumes in their static analysis of the submitted apps that you intend to use them, and will warn about requiring the appropriate entitlements to therefore be declared.

Given there's no obvious/easy way to conditionally export these selectors at this time, we are reverting the change to maintain the no warning/no error submission behaviour.

For more information and to track future potential implementations of these lifecycle events, follow: #24237

@Redth Redth requested a review from a team as a code owner September 24, 2024 14:35
@rmarinho
Copy link
Member


/Users/builder/azdo/_work/1/s/src/Core/src/LifecycleEvents/iOS/iOSLifecycle.cs(21,24): error RS0016: Symbol 'RegisteredForRemoteNotifications' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [/Users/builder/azdo/_work/1/s/src/Core/src/Core.csproj::TargetFramework=net9.0-maccatalyst17.5]
/Users/builder/azdo/_work/1/s/src/Core/src/LifecycleEvents/iOS/iOSLifecycle.cs(22,24): error RS0016: Symbol 'ReceivedRemoteNotification' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [/Users/builder/azdo/_work/1/s/src/Core/src/Core.csproj::TargetFramework=net9.0-maccatalyst17.5]
/Users/builder/azdo/_work/1/s/src/Core/src/LifecycleEvents/iOS/iOSLifecycle.cs(21,24): error RS0016: Symbol 'RegisteredForRemoteNotifications' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [/Users/builder/azdo/_work/1/s/src/Core/src/Core.csproj::TargetFramework=net9.0-ios17.5]
/Users/builder/azdo/_work/1/s/src/Core/src/LifecycleEvents/iOS/iOSLifecycle.cs(22,24): error RS0016: Symbol 'ReceivedRemoteNotification' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [/Users/builder/azdo/_work/1/s/src/Core/src/Core.csproj::TargetFramework=net9.0-ios17.5]
    0 Warning(s)
    4 Error(s)

Also please rebase, we fixed some tests on net9.0

@jfversluis
Copy link
Member

@mikeparker104



Unfortunately, when these lifecycle events were added, we didn't consider the implications of having the methods implemented on the appdelegate had with Apple app store submissions.  Basically if the app delegate implements these methods, Apple assumes in their static analysis of the submitted apps that you intend to use them, and will warn about requiring the appropriate entitlements to therefore be declared.

Given there's no obvious/easy way to conditionally export these selectors at this time, we are reverting the change to maintain the no warning/no error submission behaviour.

For more information and to track future potential implementations of these lifecycle events, follow: #24237
@PureWeen
Copy link
Member

/rebase

@jfversluis jfversluis enabled auto-merge (squash) September 25, 2024 07:50
@rmarinho rmarinho merged commit 2a50f12 into net9.0 Sep 25, 2024
119 of 121 checks passed
@rmarinho rmarinho deleted the dev/redth/revert-23452 branch September 25, 2024 09:41
@samhouts samhouts added the fixed-in-net9.0-nightly This may be available in a nightly release! label Oct 1, 2024
Redth added a commit to dotnet/docs-maui that referenced this pull request Oct 8, 2024
In previews we had added new app lifecycle events for iOS push notifications, but have removed them from GA since there are potential issues with app store submissions the way they have been added.

This change reverts them: dotnet/maui#24907

This issue tracks adding them back in the future:
dotnet/maui#24237
davidbritch added a commit to dotnet/docs-maui that referenced this pull request Oct 8, 2024
* Remove previously added iOS App Lifecycle events for push

In previews we had added new app lifecycle events for iOS push notifications, but have removed them from GA since there are potential issues with app store submissions the way they have been added.

This change reverts them: dotnet/maui#24907

This issue tracks adding them back in the future:
dotnet/maui#24237

* Remove extra blank line

* Also remove events from app lifecycle doc.

---------

Co-authored-by: David Britch <davidbritch@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-net9.0-nightly This may be available in a nightly release!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants