React Native webview get url

Here is a Webview I used for my previous project. <WebView ref=”webview” source={{uri:this.state.url}} onNavigationStateChange={this._onNavigationStateChange.bind(this)} javaScriptEnabled = {true} domStorageEnabled = {true} injectedJavaScript = {this.state.cookie} startInLoadingState={false} /> for you essential is this line: onNavigationStateChange={this._onNavigationStateChange.bind(this)} and you can read the URL like this: _onNavigationStateChange(webViewState){ console.log(webViewState.url) } If I remember correctly this fires 3 times when loading a url. … Read more

How to render a local HTML file with flutter dart webview

I am using the webview_flutter plugin from the Flutter Team. Steps Add the dependency to pubspec.yaml: dependencies: webview_flutter: ^0.3.20+2 Put an html file in the assets folder (see this). I’ll call it help.html. Get the html string in code and add it to the webview. import ‘dart:convert’; import ‘package:flutter/material.dart’; import ‘package:flutter/services.dart’; import ‘package:webview_flutter/webview_flutter.dart’; class HelpScreen … Read more

Swift Open Link in Safari

It’s not “baked in to Swift”, but you can use standard UIKit methods to do it. Take a look at UIApplication’s openUrl(_:) (deprecated) and open(_:options:completionHandler:). Swift 4 + Swift 5 (iOS 10 and above) guard let url = URL(string: “https://stackoverflow.com”) else { return } UIApplication.shared.open(url) Swift 3 (iOS 9 and below) guard let url = … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)