Commit Graph

663 Commits

Author SHA1 Message Date
Dave Alden
c54d10052a (iOS & Android) Add postMessage API support (#362)
<!--
Please make sure the checklist boxes are all checked before submitting the PR. The checklist
is intended as a quick reference, for complete details please see our Contributor Guidelines:

http://cordova.apache.org/contribute/contribute_guidelines.html

Thanks!
-->

### Platforms affected
Android
iOS (both UIWebView & WKWebView implementations)

### What does this PR do?
Adds support for [postMessage API](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage) enabling pages loaded into the InappBrowser to post messages back to the parent Webview of the Cordova app.

For example, sending event messages associated with UI interactions such as button clicks from the wrapped page back to the parent app Webview.

### What testing has been done on this change?
Automated tests have been extended to cover the `message` event.

### Checklist
- [x ] Commit message follows the format: "GH-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
- [ x] Added automated test coverage as appropriate for this change.
2018-12-13 17:21:45 +01:00
transoceanic
ba3a440491
Added to support android devices with right to left direction languages (issue #352) 2018-11-22 15:45:34 +02:00
Dave Alden
0fd43ae644 Fixes loadAfterBeforeload on iOS. Resolves #349. (#350)
For both UIWebView and WKWebView implementations on iOS.

<!--
Please make sure the checklist boxes are all checked before submitting the PR. The checklist
is intended as a quick reference, for complete details please see our Contributor Guidelines:

http://cordova.apache.org/contribute/contribute_guidelines.html

Thanks!
-->

### Platforms affected
iOS

### What does this PR do?
Fixes `beforeload` event (introduced by #276) for iOS

### What testing has been done on this change?
Tested both allow & deny loading of URL with both iOS implementations in [test container app](https://github.com/dpa99c/cordova-plugin-inappbrowser-wkwebview-test) (ignore its README).

- To test with UIWebView use options: `beforeload=yes,usewkwebview=no`
- To test with WKWebView use options: `beforeload=yes,usewkwebview=yes`

### Checklist
- [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
- [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
- [x] Added automated test coverage as appropriate for this change.

closes #349
2018-11-21 19:04:04 +01:00
Dave Alden
3b82c160d9 Fix crashes when using WKWebView implementation on iOS 9. (#337)
Fixes #323. Fixes #324.
2018-11-20 17:12:29 +01:00
Jonathan Li
978b147598 Fix iOS CDVWKInAppBrowser evaluateJavascript method randomly gets blocked on ios 12 (#341)
### Platforms affected
iOS

### What does this PR do?
fix issue[ #340](https://github.com/apache/cordova-plugin-inappbrowser/issues/340) iOS CDVWKInAppBrowser evaluateJavascript method randomly gets blocked on iOS 12

### What testing has been done on this change?
manual testing

### Checklist
- [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
- [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
- [ ] Added automated test coverage as appropriate for this change.
2018-11-19 18:28:25 +01:00
Jan Piotrowski
3eadde65ab
remove unwanted information in README table (#308)
remove unwanted information in README table
2018-11-06 19:53:54 +01:00
Jesse MacFadyen
27fe8ec8d4
Merge pull request #336 from purplecabbage/windowlevel
This lets the default window layering do it's thing.
2018-10-29 14:01:35 -07:00
Jesse MacFadyen
c24bb46965 This lets the default window layering do it's thing. Fixes #334. Fixes #314. 2018-10-29 13:43:37 -07:00
Jesse MacFadyen
10a06691f9
Merge pull request #271 from dpa99c/CB-7179
CB-7179 (iOS): Add WKWebView support for iOS
2018-10-16 23:08:27 -07:00
Dave Alden
3927b8f2fe Merge branch 'CB-7179' of https://github.com/dpa99c/cordova-plugin-themeablebrowser into CB-7179 2018-10-09 11:58:18 +01:00
Dave Alden
82482158c5 Comment out iOS 9 target for Travis tests since it's not supported by the WKWebView implementation 2018-10-09 11:57:40 +01:00
Dave Alden
61014dd877 Fix indentation of tests.js for eslint 2018-10-09 11:48:15 +01:00
Dave Alden
c41f5b5131 Fix merge error 2018-10-09 11:31:26 +01:00
Dave Alden
19c6dfe197 Merge branch 'master' into CB-7179 2018-10-09 11:15:23 +01:00
Dave Alden
7f5fa2a28f Add plugin to fix reporting of cordova-paramedic results when using WKWebView plugin.
See https://github.com/apache/cordova-paramedic/issues/52
2018-10-09 10:51:06 +01:00
Dave Alden
5d2df218d8 Merge branch 'CB-7179' of https://github.com/dpa99c/cordova-plugin-inappbrowser into CB-7179 2018-10-05 21:24:58 +01:00
Dave Alden
86cc778c4a Fix tests so they auto-start when run via cordova-paramedic 2018-10-05 21:23:56 +01:00
Jan Piotrowski
d9cafcdb14
remove JIRA link 2018-10-04 01:16:19 +02:00
Chris Brody
eafaedaec4
Merge pull request #276 from q-m/feature/beforeload-event
CB-14188: Add beforeload event, catching navigation before it happens
2018-10-03 18:43:59 -04:00
Jan Piotrowski
cbfa195f7d
Merge branch 'master' into CB-7179 2018-10-03 17:37:28 +02:00
Jan Piotrowski
52e3534ca7
update test configuration to xcode8.3 2018-10-03 17:34:12 +02:00
Jan Piotrowski
8165232a5a
experimental commit 2018-10-03 16:55:12 +02:00
Tim Brust
a0c267fe36 CB-12941: update typings (#267)
### Platforms affected
n/a - development with TypeScript

### What does this PR do?
Updates the typings to match the latest published version on DefinitelyTyped.  
See https://github.com/DefinitelyTyped/DefinitelyTyped/pull/17192 and https://stackoverflow.com/q/42095516/1902598

### What testing has been done on this change?
Project compiles again ;)

### Checklist
- [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
- [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
- n/a: Added automated test coverage as appropriate for this change.

fixes #300
2018-10-02 11:49:11 +02:00
wvengen
228703a63b CB-14188: add beforeload event, catching navigation before it happens 2018-10-01 16:41:21 +02:00
Jan Piotrowski
0ed0bf543b
reenable testing on all platforms
was disabled in #277
2018-10-01 12:46:54 +02:00
Jan Piotrowski
f8ad52894b
also accept terms for android sdk android-27 2018-10-01 12:36:35 +02:00
Dave Alden
e2210bdbcc Merge branch 'CB-7179' of https://github.com/dpa99c/cordova-plugin-inappbrowser into CB-7179 2018-09-30 13:22:32 +01:00
Dave Alden
dc7fa34bbe CB-7179 (iOS): Add support to optionally use WKWebView for iOS 2018-09-30 10:05:46 +01:00
Dave Alden
b48e02fcd5 fix iOS 10 build 2018-09-30 08:03:16 +01:00
Dave Alden
27e6c67909 CB-7179 (iOS): Add support to optionally use WKWebView for iOS 2018-09-30 07:44:05 +01:00
Dan Polivy
a0783378fc [CB-10795] Exclude current app from external intent list (#154)
On Android, if the app defines an intent-filter for a given URL, and
then tries to use inappbrowser to launch that URL via the _system
target, the default handler for that intent is the app itself.

That behavior can lead to circular loops, and ultimately is not what the
developer wants -- the link should be launched in a browser.

Because there is no easy way to find the "default" system browser on a
device, this solution will do two things:
1) Check if the app is one of the targets for this intent
2) If so, create a custom chooser with all other targets, excluding the
current app.

If the app is not a target, then the current (existing) behavior is
preserved.

The only real "downside" to this approach is that a default handler can no longer be set for these URLs within the app, and a chooser will be shown each time the user taps a link that opens in a new browser.

Fixes https://issues.apache.org/jira/browse/CB-10795
2018-09-20 22:43:52 +02:00
Dan Polivy
cf58b04097 CB-14234: Don't call handleOpenURL for system URLs (#278)
When calling `.open()` with a target of `_system`, the InAppBrowser on iOS is both launching the URL in the system browser AND also broadcasting to open the URL within the app (calling handleOpenURL). The latter behavior is problematic in many circumstances (e.g. when you want to explicitly open a link in a browser which is a universal link handled by the app).

This commit attempts to address this by checking the return value from openURL -- if it does not open the URL successfully, then (and only then) the code falls back to broadcasting the event within the app to handleOpenURL.
2018-08-22 23:43:06 +02:00
Malte Norström
dc5329d157 CB-12875: (iOS) Pushes the inappbrowser window to a higher ui level than the existing apps window. (#284) 2018-08-21 10:28:56 +02:00
Chris Brody
de86501026
Merge pull request #277 from brodybits/quick-ci-fixes
Quick CI fixes
2018-07-31 19:30:46 -04:00
Christopher J. Brody
07d9a9939b Skip Android 6.0 on Travis CI (for now) 2018-07-31 19:18:29 -04:00
Christopher J. Brody
81f1437b6d README.md add AppVeyor CI & Travis CI details 2018-07-31 19:05:28 -04:00
Christopher J. Brody
a464ea6875 .travis.yml quick fixes
- skip some platform versions for now
- mark FUTURE TBD platform versions
2018-07-31 19:04:19 -04:00
Christopher J. Brody
e75fe14c4b .appveyor.yml add npm i & add eslint to test
(consistent with test script in package.json)
2018-07-31 18:57:53 -04:00
Christopher J. Brody
eb245ecaf7 .travis.yml add blank lines 2018-07-31 16:54:01 -04:00
jcesarmobile
9cc7f69625
Merge pull request #272 from jcesarmobile/CB-12922
CB-12922 (ios): fix In-app browser does not cede control
2018-07-12 00:30:32 +02:00
Julio César
dac06aa3f3 CB-12922 (ios): fix In-app browser does not cede control 2018-07-01 18:09:47 +02:00
jcesarmobile
26cf6e488c
Merge pull request #269 from timbru31/fix/CB-14061-handle-more-url-schemes
CB-14061: (android) comply with RFC 3986 for custom URL scheme handling
2018-05-19 13:57:13 +02:00
jcesarmobile
33aff11f45
Merge pull request #268 from wtrocki/CB-14048
CB-14048: (android) allowedSchemes check empty string fix
2018-05-19 13:49:36 +02:00
Tim Brust
f57ede9be2
CB-14061: (android) comply with RFC 3986 for custom URL scheme handling 2018-05-02 20:18:34 +02:00
Wojciech Trocki
57eda786e0 CB-14048: (android) allowedSchemes check empty string fix 2018-04-27 00:07:57 +01:00
Fiffi
ec6af56fbd remove statusbar when inAppBrowser is open in andriod 2018-04-23 16:07:17 +00:00
Steve Gill
5581957078 CB-14030 Set VERSION to 3.0.1-dev (via coho) 2018-04-13 12:28:14 -07:00
Steve Gill
757022d85a CB-14030 Updated version and RELEASENOTES.md for release 3.0.0 (via coho) 2018-04-13 12:24:16 -07:00
Steve Gill
49a23e34ba
Merge pull request #266 from jcesarmobile/cordovaDependencies
Update cordovaDependencies to allow plugin install
2018-04-13 11:59:32 -07:00
Julio César
4a5608a7a0 Update cordovaDependencies to allow plugin install 2018-04-13 11:26:53 +02:00