Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Commit

Permalink
Merge pull request #192 from vortex852456/master
Browse files Browse the repository at this point in the history
change AddContent to AddMarkupContent (fix for "Uncaught SyntaxError: Unexpected token '&'")
  • Loading branch information
Daddoon authored Mar 29, 2020
2 parents 3798915 + 580a00d commit 82e43dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Create full C# driven hybrid-apps for iOS, Android, UWP & Desktop with Blazor!
- [ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs](#itms-90809-deprecated-api-usage---apple-will-stop-accepting-submissions-of-apps-that-use-uiwebview-apis)
- [Apple Rejection - Your app uses or references the following non-public APIs: LinkPresentation.framework, QuickLookThumbnailing.framework](#apple-rejection---your-app-uses-or-references-the-following-non-public-apis-linkpresentationframework-quicklookthumbnailingframework)
- [Android crash at boot on API 28](#android-crash-at-boot-on-api-28)
- [Application refresh and restart after going in background](#application-refresh-and-restart-after-going-in-background)

## Updates and Migrations guides

Expand Down Expand Up @@ -939,6 +940,16 @@ This may be related if you are building your app as an **Android App Bundles** i

As stated at the top of the documentation, consider releasing your app as an **APK**. See also the [Android Build size optimization](#android-build-size-optimization) section.

### Application refresh and restart after going in background

There is actually two cases when this behavior may happen:

- The app has been put in background, then foreground but the HTTP port of the webserver is not available anymore for whatever reason. As it can be problematic, the app restart on a new port

- The app started loading in the WebView, but you put the app in foreground and BlazorMobile initialization to native was not finished or Blazor WASM did not finish Blazor framework loading before getting put in background: In order to avoid inconsistent app state, the app restart.

- Another possible issue is if you put a regular Blazor app without inheriting from **MobileApp** component, and without calling the **BlazorMobilService.Init()** code at your app start. Theses calls notify to Native that it has loaded when it's finished. If they are not present they may fallback in the second point listed here as the app believe it has not loaded properly.

## Community

- **Azure DevOps Pipeline** by [@shawndeggans](https://github.com/shawndeggans) - [Download azure-pipelines.txt]("./Community/azure-pipelines.txt")
Expand Down
2 changes: 1 addition & 1 deletion src/BlazorMobile.Web/Components/BlazorMobileComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ protected override void BuildRenderTree(RenderTreeBuilder builder)

builder.OpenElement(0, "script");
builder.AddAttribute(1, "type", "text/javascript");
builder.AddContent(1,
builder.AddMarkupContent(1,
ContextBridgeHelper.GetBlazorXamarinJavascript()
+ ContextBridgeHelper.GetContextBridgeJavascript().Replace("%_contextBridgeURI%", BlazorMobileService.GetContextBridgeURI()));
builder.CloseElement();
Expand Down

0 comments on commit 82e43dc

Please sign in to comment.