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

change(ios): set host-app bundle identifier in embedded Web debug-report 🍒 🏠 #13112

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,10 @@ extension KeymanWebViewController: KeymanWebDelegate {
os_log("%{public}s", log: KeymanEngineLogger.engine, type: .info, message)
SentryManager.breadcrumb(message, sentryLevel: .debug)

// Overwrites the baseline "embeddingApp" text available before Web engine init with the
// active bundle identifier.
webView!.evaluateJavaScript("setHostAppName(\"\(Bundle.main.infoDictionary!["CFBundleIdentifier"]!)\")")

self.setSentryState()
resizeKeyboard()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ function setKeymanLanguage(stub) {
});
}

function setHostAppName(name) {
// Sentry will capture this in a breadcrumb for Web errors.
keyman.config.embeddingApp = name;
}

var fragmentToggle = 0;
/**
* Inserts the selected string <i>s</i>
Expand Down
4 changes: 4 additions & 0 deletions web/src/app/webview/src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export class WebviewConfiguration extends EngineConfiguration {
return this._embeddingApp;
}

set embeddingApp(name: string) {
this._embeddingApp = name;
}

get oninserttext() {
return this._oninserttext;
}
Expand Down