Problem with WKWebView
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request
Current behavior
When using WKWebView with Ionic 2, the translation file is loaded, but the translation tokens are not shown until you do something (like changing of tab which I think triggers change detection). I tried to trigger the change detection manually, but it didn’t work. The onLangChange
observable works. Was working fine in UIWebView.
I also that the earlier the package is initialized, the more often the bug happens.
Expected/desired behavior The translation tokens to be replaced by the actual translation strings.
Reproduction of the problem You see the code used here.
Please tell us about your environment:
- ng2-translate version: 3.1.2
- Angular version: 2.0.0
- Browser: iOS 10 WKWebView
- Language: TypeScript 2.0
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Problem using a WKWebView to load my site - Apple Developer
Problem using a WKWebView to load my site Hi, i´m trying to use a WKWebView to make an app that could load my...
Read more >Why Is WKWebView So Heavy and Why Is Leaking It So Bad?
A somewhat common source of bugs is improper management of WKWebView on iOS. The problem is that webviews are incredibly heavy objects from ......
Read more >Newest 'wkwebview' Questions - Stack Overflow
iOS WKWebView does not load url. I try to open webView, it works fine after first app download. But after several times clicking...
Read more >Playback problem in WKWebView and iOS 16.1 on iPad with ...
Description I have an iOS app based on a WKWebView, which uses videojs internally to play HLS streams (using MSE, which is available...
Read more >213510 – iOS 14: ITP causes issues for hybrid (WKWebView ...
Bug 213510 - iOS 14: ITP causes issues for hybrid (WKWebView) apps using cookies for authentication etc. Summary: iOS 14: ITP causes issues...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This should be solved now. Uninstall wkwebview and install it again.
I google a lot and finally got the ngx-translate to work: First, upgrade cordova and ionic cli to latest version
`xxx:Tabs u$ cordova -v 7.1.0
xxx:Tabs u$ ionic -v 3.16.0
xxx:Tabs u$ ionic info
cli packages: (/Users/xxx/NPM/lib/node_modules)
global packages:
local packages:
System:
Environment Variables:
Misc:
create a brand new project
The new project will use wkwebview as default, and there are some error with the usage docs: https://ionicframework.com/docs/developer-resources/ng2-translate/ we should use HttpClientModule instead of HttpModule For the app.module.ts
For app.component.ts
After that, create i18n folder in src/assets create en.json { “HELLO” : “hello” }
For page usage, you can use pipe
or manually:
Hope you save your life with these code.