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

Remove reference to concrete native host app #16803

Merged
merged 12 commits into from
Sep 25, 2023
Merged

Remove reference to concrete native host app #16803

merged 12 commits into from
Sep 25, 2023

Conversation

dansiegel
Copy link
Contributor

Description of Change

Removes references to concrete native host apps in favor of using IPlatformApplication.Current as this properly supports embedding scenarios.

Issues Fixed

Fixes #16759

I've added a TODO for Maui Essentials to find a better way to address the reference to MauiApplication.Current for the native Android Application.

@dansiegel dansiegel requested a review from a team as a code owner August 17, 2023 01:07
@ghost ghost added the community ✨ Community Contribution label Aug 17, 2023
@ghost
Copy link

ghost commented Aug 17, 2023

Hey there @dansiegel! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@jfversluis jfversluis requested a review from Eilon August 17, 2023 09:28
Copy link
Member

@jfversluis jfversluis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D:\a_work\1\s\src\Core\src\Platform\Tizen\CoreAppExtensions.cs(12,27): error CS8602: Dereference of a possibly null reference. [D:\a_work\1\s\src\Core\src\Core.csproj::TargetFramework=net7.0-tizen]
D:\a_work\1\s\src\Core\src\Platform\Tizen\CoreAppExtensions.cs(26,27): error CS8602: Dereference of a possibly null reference. [D:\a_work\1\s\src\Core\src\Core.csproj::TargetFramework=net7.0-tizen]

Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking very nice, just wondering the reason the essentials API was not working?

src/Core/src/Hosting/EssentialsMauiAppBuilderExtensions.cs Outdated Show resolved Hide resolved
@Eilon Eilon added the area-core-hosting Extensions / Hosting / AppBuilder / Startup label Aug 17, 2023
@samhouts samhouts added this to the Under Consideration milestone Aug 17, 2023
@samhouts samhouts added the stale Indicates a stale issue/pr and will be closed soon label Sep 11, 2023
@dansiegel
Copy link
Contributor Author

sorry took me a bit longer than expected to get the time to circle back to this... updated and should be building now

Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just 2 comments

src/Core/src/Platform/Android/MauiApplication.cs Outdated Show resolved Hide resolved
@mattleibow
Copy link
Member

Looking good!

@mattleibow
Copy link
Member

/azp run MAUI-DeviceTests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PureWeen PureWeen merged commit f09e3d5 into dotnet:main Sep 25, 2023
40 checks passed
@dansiegel dansiegel deleted the iplatformapplication branch September 25, 2023 20:21
@PureWeen
Copy link
Member

/backport to release/8.0.1xx-rc2.1

@github-actions
Copy link
Contributor

Started backporting to release/8.0.1xx-rc2.1: https://github.com/dotnet/maui/actions/runs/6628835050

@github-actions
Copy link
Contributor

@PureWeen backporting to release/8.0.1xx-rc2.1 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: fix: remove reference to concrete native host app
Using index info to reconstruct a base tree...
M	src/Compatibility/ControlGallery/src/Android/Issue10182Activity.cs
M	src/Compatibility/Core/src/AppHostBuilderExtensions.Android.cs
M	src/Compatibility/Core/src/AppHostBuilderExtensions.Tizen.cs
M	src/Compatibility/Core/src/AppHostBuilderExtensions.cs
M	src/Compatibility/Core/src/AppHostBuilderExtensions.iOS.cs
M	src/Core/src/Hosting/EssentialsMauiAppBuilderExtensions.cs
M	src/Core/src/Platform/Android/MauiAppCompatActivity.Lifecycle.cs
M	src/Core/src/Platform/Android/MauiAppCompatActivity.cs
M	src/Core/src/Platform/Tizen/CoreAppExtensions.cs
M	src/Core/src/Platform/iOS/MauiContextExtensions.cs
M	src/Core/src/Platform/iOS/MauiUISceneDelegate.cs
M	src/Core/src/Platform/iOS/UIApplicationExtensions.cs
M	src/TestUtils/src/DeviceTests.Runners/TestServices.cs
Falling back to patching base and 3-way merge...
Auto-merging src/TestUtils/src/DeviceTests.Runners/TestServices.cs
CONFLICT (content): Merge conflict in src/TestUtils/src/DeviceTests.Runners/TestServices.cs
Auto-merging src/Core/src/Platform/Tizen/CoreAppExtensions.cs
CONFLICT (content): Merge conflict in src/Core/src/Platform/Tizen/CoreAppExtensions.cs
Auto-merging src/Core/src/Hosting/EssentialsMauiAppBuilderExtensions.cs
CONFLICT (content): Merge conflict in src/Core/src/Hosting/EssentialsMauiAppBuilderExtensions.cs
Auto-merging src/Compatibility/Core/src/AppHostBuilderExtensions.cs
CONFLICT (content): Merge conflict in src/Compatibility/Core/src/AppHostBuilderExtensions.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: remove reference to concrete native host app
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions
Copy link
Contributor

@PureWeen an error occurred while backporting to release/8.0.1xx-rc2.1, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2023
@samhouts samhouts removed this from the Under Consideration milestone Jul 1, 2024
@samhouts samhouts added the fixed-in-8.0.0-rc.2.9373 Look for this fix in 8.0.0-rc.2.9373! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-core-hosting Extensions / Hosting / AppBuilder / Startup community ✨ Community Contribution fixed-in-8.0.0-rc.2.9373 Look for this fix in 8.0.0-rc.2.9373! stale Indicates a stale issue/pr and will be closed soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide Static MauiContextAccessor
6 participants