You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
** This section is kinda obsolete by now (with iOS 12 currently being the latest version) **
68
+
56
69
Since SafariViewController is new in iOS9 you need to have a fallback for older versions (and other platforms),
57
70
so if `available` returns false (see the snippet below) you want to open the URL in the InAppBrowser probably,
58
71
so be sure to include that plugin as well:
@@ -61,7 +74,7 @@ so be sure to include that plugin as well:
61
74
$ cordova plugin add cordova-plugin-inappbrowser
62
75
```
63
76
64
-
I'm not including it as a depency as not all folks may have this requirement.
77
+
I'm not including it as a dependency as not all folks may have this requirement.
65
78
66
79
## 4. Usage
67
80
Check the [demo code](demo/index.html) for an easy to drop in example, otherwise copy-paste this:
@@ -125,7 +138,7 @@ Do this:
125
138
1. Install the [Custom URL Scheme Plugin](https://github.com/EddyVerbruggen/Custom-URL-scheme)
126
139
2. Create a web page that reads Safari data on load and passes that data to the URL scheme:
127
140
128
-
```javascript
141
+
```html
129
142
<html>
130
143
<head>
131
144
<scripttype="javascript">
@@ -143,7 +156,7 @@ Do this:
143
156
144
157
3. Open the web page you created with a hidden Safari view:
145
158
146
-
```javascript
159
+
```js
147
160
SafariViewController.show({
148
161
url: 'http://mycoolapp.com/hidden.html',
149
162
hidden: true,
@@ -153,7 +166,7 @@ Do this:
153
166
154
167
4. Capture the data passed from the web page via the URL Scheme:
155
168
156
-
```javascript
169
+
```js
157
170
function handleOpenURL(url) {
158
171
setTimeout(function() {
159
172
SafariViewController.hide();
@@ -165,6 +178,7 @@ Do this:
165
178
166
179
167
180
## 7. Changelog
181
+
* 1.6.0 A few changes for Android. See [these closed issues](https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller/milestone/7?closed=1).
168
182
* 1.5.3 Hidden tabs don't get removed on `hide()` (iOS). Thanks #104!
0 commit comments