Commit 76f7e5d2 authored by Jennie Shi's avatar Jennie Shi

修复iOS打不开https问题

parent 2a8f9201
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<access origin="*" /> <access origin="*" />
<access launch-external="yes" origin="mailto:*" /> <access launch-external="yes" origin="mailto:*" />
<access launch-external="yes" origin="tel:*" /> <access launch-external="yes" origin="tel:*" />
<access launch-external="yes" origin="https://sign-pub.qsign.com.cn/*" />
<allow-intent href="http://*/*" /> <allow-intent href="http://*/*" />
<allow-intent href="https://*/*" /> <allow-intent href="https://*/*" />
<allow-intent href="mailto:*" /> <allow-intent href="mailto:*" />
...@@ -23,6 +24,7 @@ ...@@ -23,6 +24,7 @@
<allow-navigation href="http://180.104.121.66:8088/*" /> <allow-navigation href="http://180.104.121.66:8088/*" />
<allow-navigation href="https://docs.jiguang.cn/*" /> <allow-navigation href="https://docs.jiguang.cn/*" />
<allow-navigation href="https://www.rongcloud.cn/*" /> <allow-navigation href="https://www.rongcloud.cn/*" />
<allow-navigation href="https://sign-pub.qsign.com.cn/*" />
<access launch-external="yes" origin="tel:*" /> <access launch-external="yes" origin="tel:*" />
<access launch-external="yes" origin="sms:*" /> <access launch-external="yes" origin="sms:*" />
<preference name="ScrollEnabled" value="false" /> <preference name="ScrollEnabled" value="false" />
......
...@@ -4,12 +4,12 @@ module.exports = { ...@@ -4,12 +4,12 @@ module.exports = {
CONFIG_ENV: JSON.stringify(process.env.CONFIG_ENV), CONFIG_ENV: JSON.stringify(process.env.CONFIG_ENV),
debug: true, debug: true,
isMobilePlatform: true, isMobilePlatform: true,
loginPath: '"http://180.104.121.66:8088/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=appadmin&password=" ', loginPath: '"http://www.xcmgfs.com:8087/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=appadmin&password=" ',
basePath: '"http://180.104.121.66:8088/r/api/interface?sysName=XCMG_UAT&apiName="', basePath: '"http://www.xcmgfs.com:8087/r/api/interface?sysName=XCMG_PROD&apiName="',
rootPath: '"http://180.104.121.66:8088/r/api"', rootPath: '"http://www.xcmgfs.com:8087/r/api"',
filePath: '"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_UAT&apiName=file_view&"', filePath: '"http://www.xcmgfs.com:8087/r/api/app/fileViewSvc?sysName=XCMG_PROD&apiName=file_view&"',
ocrPath:'"http://180.104.121.66:8088/r/api"', ocrPath:'"http://www.xcmgfs.com:8087/r/api"',
fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="', fileUploadSvcPath:'"http://www.xcmgfs.com:8087/r/api/app/fileUploadSvc?sysName=XCMG_PROD&apiName="',
appId: '"com.xcmg.app.dev"', appId: '"com.xcmg.app.dev"',
currentVersion: '"2.3.3"' currentVersion: '"2.3.3"'
} }
...@@ -3064,9 +3064,9 @@ ...@@ -3064,9 +3064,9 @@
} }
}, },
"cordova-plugin-inappbrowser": { "cordova-plugin-inappbrowser": {
"version": "2.0.2", "version": "4.0.0",
"resolved": "https://registry.npm.taobao.org/cordova-plugin-inappbrowser/download/cordova-plugin-inappbrowser-2.0.2.tgz", "resolved": "https://registry.npm.taobao.org/cordova-plugin-inappbrowser/download/cordova-plugin-inappbrowser-4.0.0.tgz",
"integrity": "sha1-pEj8vpdMprQpiL00VRCdkj1sl2k=", "integrity": "sha1-CB4SWz7OBeMN0A5fk5YWCSaDKio=",
"dev": true "dev": true
}, },
"core-js": { "core-js": {
......
# appveyor file
# http://www.appveyor.com/docs/appveyor-yml
max_jobs: 1
shallow_clone: true
init:
- git config --global core.autocrlf true
image:
- Visual Studio 2017
environment:
nodejs_version: "4"
matrix:
- PLATFORM: windows-10-store
JUST_BUILD: --justBuild
install:
- npm cache clean -f
- node --version
- npm install -g cordova-paramedic@https://github.com/apache/cordova-paramedic.git
- npm install -g cordova
build: off
test_script:
- cordova-paramedic --config pr\%PLATFORM% --plugin . %JUST_BUILD%
root: true
extends: semistandard
rules:
indent:
- error
- 4
camelcase: off
padded-blocks: off
operator-linebreak: off
no-throw-literal: off
\ No newline at end of file
<!--
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
### What does this PR do?
### What testing has been done on this change?
### Checklist
- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
- [ ] 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.
#If ignorance is bliss, then somebody knock the smile off my face
*.csproj.user
*.suo
*.cache
Thumbs.db
*.DS_Store
*.bak
*.cache
*.log
*.swp
*.user
node_modules
sudo: false
addons:
jwt:
secure: TZ88IEvAw1bsWPWxvDzXdpi2NK0i3PN4hG15+vDpIt6wXGVPknjxuXWJeLj7TqBpAIvP7XDfS8ZvHVPLe7fe8oOchZPLuiDw9VVIk6cnHjE6wpoavdGc/1mDJ3Bi4PDcHwRUr5ng5spYQqqlTwcECkH/q7iPgudiFM6rlOlGRyA=
env:
global:
- SAUCE_USERNAME=snay
- TRAVIS_NODE_VERSION="4.2"
matrix:
include:
- env: PLATFORM=browser-chrome
os: linux
language: node_js
node_js: '4.2'
- env: PLATFORM=browser-firefox
os: linux
language: node_js
node_js: '4.2'
- env: PLATFORM=browser-safari
os: linux
language: node_js
node_js: '4.2'
- env: PLATFORM=browser-edge
os: linux
language: node_js
node_js: '4.2'
- env: PLATFORM=ios-9.3
os: osx
osx_image: xcode7.3
language: node_js
node_js: '4.2'
- env: PLATFORM=ios-10.0
os: osx
osx_image: xcode7.3
language: node_js
node_js: '4.2'
- env: PLATFORM=android-4.4
os: linux
language: android
jdk: oraclejdk8
android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.2
- env: PLATFORM=android-5.1
os: linux
language: android
jdk: oraclejdk8
android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.2
- env: PLATFORM=android-6.0
os: linux
language: android
jdk: oraclejdk8
android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.2
- env: PLATFORM=android-7.0
os: linux
language: android
jdk: oraclejdk8
android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.2
before_install:
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm
&& git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm
install $TRAVIS_NODE_VERSION
- node --version
- if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi
- if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi
- if [[ "$PLATFORM" =~ android ]]; then echo y | android update sdk -u --filter android-22,android-23,android-24,android-25,android-26;
fi
- git clone https://github.com/apache/cordova-paramedic /tmp/paramedic && pushd /tmp/paramedic
&& npm install && popd
- npm install -g cordova
install:
- npm install
script:
- npm test
- node /tmp/paramedic/main.js --config pr/$PLATFORM --plugin $(pwd) --shouldUseSauce
--buildName travis-plugin-inappbrowser-$TRAVIS_JOB_NUMBER
...@@ -30,35 +30,8 @@ For instructions on this, start with the ...@@ -30,35 +30,8 @@ For instructions on this, start with the
[contribution overview](http://cordova.apache.org/contribute/). [contribution overview](http://cordova.apache.org/contribute/).
The details are explained there, but the important items are: The details are explained there, but the important items are:
- Sign and submit an Apache ICLA (Contributor License Agreement). - Check for Github issues that corresponds to your contribution and link or create them if necessary.
- Have a Jira issue open that corresponds to your contribution.
- Run the tests so your patch doesn't break existing functionality. - Run the tests so your patch doesn't break existing functionality.
We look forward to your contributions! We look forward to your contributions!
The notes on [Commit Workflow](https://github.com/apache/cordova-coho/blob/master/docs/committer-workflow.md#commit-workflow) can be helpful even if you are not a committer.
## Running plugin tests
* clone and install [cordova-plugin-test-framework](https://github.com/apache/cordova-plugin-test-framework)
```
git clone git@github.com:apache/cordova-plugin-test-framework.git
```
* edit ```cordova-plugin-test-framework/www/assets/index.html``` and add the following line
```
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com http://cordova.apache.org http://google.co.uk https://google.co.uk 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
```
* create test project
```
cordova create plugintest
cd plugintest
cordova platform add android
cordova plugin add ../cordova-plugin-inappbrowser
cordova plugin add ../cordova-plugin-inappbrowser/tests
cordova plugin add ../cordova-plugin-test-framework
```
* edit ```config.xml``` and replace ```<content src="index.html" />``` with ```<content src="cdvtests/index.html" />```
* run application
```
cordova run
```
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{ {
"_from": "cordova-plugin-inappbrowser@2.0.2", "_from": "cordova-plugin-inappbrowser@4.0.0",
"_id": "cordova-plugin-inappbrowser@2.0.2", "_id": "cordova-plugin-inappbrowser@4.0.0",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha1-pEj8vpdMprQpiL00VRCdkj1sl2k=", "_integrity": "sha1-CB4SWz7OBeMN0A5fk5YWCSaDKio=",
"_location": "/cordova-plugin-inappbrowser", "_location": "/cordova-plugin-inappbrowser",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "version", "type": "version",
"registry": true, "registry": true,
"raw": "cordova-plugin-inappbrowser@2.0.2", "raw": "cordova-plugin-inappbrowser@4.0.0",
"name": "cordova-plugin-inappbrowser", "name": "cordova-plugin-inappbrowser",
"escapedName": "cordova-plugin-inappbrowser", "escapedName": "cordova-plugin-inappbrowser",
"rawSpec": "2.0.2", "rawSpec": "4.0.0",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "2.0.2" "fetchSpec": "4.0.0"
}, },
"_requiredBy": [ "_requiredBy": [
"#DEV:/", "#DEV:/",
"#USER" "#USER"
], ],
"_resolved": "https://registry.npm.taobao.org/cordova-plugin-inappbrowser/download/cordova-plugin-inappbrowser-2.0.2.tgz", "_resolved": "https://registry.npm.taobao.org/cordova-plugin-inappbrowser/download/cordova-plugin-inappbrowser-4.0.0.tgz",
"_shasum": "a448fcbe974ca6b42988bd3455109d923d6c9769", "_shasum": "081e125b3ece05e30dd00e5f9396160926832a2a",
"_spec": "cordova-plugin-inappbrowser@2.0.2", "_spec": "cordova-plugin-inappbrowser@4.0.0",
"_where": "/Users/jeshi/Documents/徐工/hls-xcmg-vue-app", "_where": "/Users/jeshi/Documents/徐工/hls-xcmg-vue-app",
"author": { "author": {
"name": "Apache Software Foundation" "name": "Apache Software Foundation"
}, },
"bugs": { "bugs": {
"url": "https://issues.apache.org/jira/browse/CB" "url": "https://github.com/apache/cordova-plugin-inappbrowser/issues"
}, },
"bundleDependencies": false, "bundleDependencies": false,
"cordova": { "cordova": {
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
"windows" "windows"
] ]
}, },
"deprecated": "deprecated", "deprecated": false,
"description": "Cordova InAppBrowser Plugin", "description": "Cordova InAppBrowser Plugin",
"devDependencies": { "devDependencies": {
"eslint": "^4.0.0", "eslint": "^4.0.0",
...@@ -56,7 +56,11 @@ ...@@ -56,7 +56,11 @@
"0.2.3": { "0.2.3": {
"cordova": ">=3.1.0" "cordova": ">=3.1.0"
}, },
"3.0.0": { "4.0.0": {
"cordova": ">=3.1.0",
"cordova-ios": ">=4.0.0"
},
"5.0.0": {
"cordova": ">100" "cordova": ">100"
} }
} }
...@@ -86,5 +90,5 @@ ...@@ -86,5 +90,5 @@
"test": "npm run eslint" "test": "npm run eslint"
}, },
"types": "./types/index.d.ts", "types": "./types/index.d.ts",
"version": "2.0.2" "version": "4.0.0"
} }
...@@ -20,24 +20,24 @@ ...@@ -20,24 +20,24 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-inappbrowser" id="cordova-plugin-inappbrowser"
version="2.0.2"> version="4.0.0">
<name>InAppBrowser</name> <name>InAppBrowser</name>
<description>Cordova InAppBrowser Plugin</description> <description>Cordova InAppBrowser Plugin</description>
<license>Apache 2.0</license> <license>Apache 2.0</license>
<keywords>cordova,in,app,browser,inappbrowser</keywords> <keywords>cordova,in,app,browser,inappbrowser</keywords>
<repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git</repo> <repo>https://github.com/apache/cordova-plugin-inappbrowser</repo>
<issue>https://issues.apache.org/jira/browse/CB/component/12320641</issue> <issue>https://github.com/apache/cordova-plugin-inappbrowser/issues</issue>
<engines> <engines>
<engine name="cordova" version=">=3.1.0" /><!-- Needs cordova/urlutil --> <engine name="cordova" version=">=3.1.0" /><!-- Needs cordova/urlutil -->
<engine name="cordova-ios" version=">=4.0.0" />
</engines> </engines>
<!-- android --> <!-- android -->
<platform name="android"> <platform name="android">
<js-module src="www/inappbrowser.js" name="inappbrowser"> <js-module src="www/inappbrowser.js" name="inappbrowser">
<clobbers target="cordova.InAppBrowser.open" /> <clobbers target="cordova.InAppBrowser.open" />
<clobbers target="window.open" />
</js-module> </js-module>
<config-file target="res/xml/config.xml" parent="/*"> <config-file target="res/xml/config.xml" parent="/*">
<feature name="InAppBrowser"> <feature name="InAppBrowser">
...@@ -71,16 +71,21 @@ ...@@ -71,16 +71,21 @@
<platform name="ios"> <platform name="ios">
<js-module src="www/inappbrowser.js" name="inappbrowser"> <js-module src="www/inappbrowser.js" name="inappbrowser">
<clobbers target="cordova.InAppBrowser.open" /> <clobbers target="cordova.InAppBrowser.open" />
<clobbers target="window.open" />
</js-module> </js-module>
<config-file target="config.xml" parent="/*"> <config-file target="config.xml" parent="/*">
<feature name="InAppBrowser"> <feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser" /> <param name="ios-package" value="CDVWKInAppBrowser" />
<param name="onload" value="true" />
</feature> </feature>
</config-file> </config-file>
<header-file src="src/ios/CDVInAppBrowserOptions.h" />
<header-file src="src/ios/CDVInAppBrowser.h" /> <source-file src="src/ios/CDVInAppBrowserOptions.m" />
<source-file src="src/ios/CDVInAppBrowser.m" /> <header-file src="src/ios/CDVInAppBrowserNavigationController.h" />
<source-file src="src/ios/CDVInAppBrowserNavigationController.m" />
<header-file src="src/ios/CDVWKInAppBrowser.h" />
<source-file src="src/ios/CDVWKInAppBrowser.m" />
<header-file src="src/ios/CDVWKInAppBrowserUIDelegate.h" />
<source-file src="src/ios/CDVWKInAppBrowserUIDelegate.m" />
<framework src="CoreGraphics.framework" /> <framework src="CoreGraphics.framework" />
</platform> </platform>
...@@ -89,7 +94,6 @@ ...@@ -89,7 +94,6 @@
<platform name="osx"> <platform name="osx">
<js-module src="www/inappbrowser.js" name="inappbrowser"> <js-module src="www/inappbrowser.js" name="inappbrowser">
<clobbers target="cordova.InAppBrowser.open" /> <clobbers target="cordova.InAppBrowser.open" />
<clobbers target="window.open" />
</js-module> </js-module>
<config-file target="config.xml" parent="/*"> <config-file target="config.xml" parent="/*">
<feature name="InAppBrowser"> <feature name="InAppBrowser">
...@@ -101,11 +105,10 @@ ...@@ -101,11 +105,10 @@
<source-file src="src/osx/CDVInAppBrowser.m" /> <source-file src="src/osx/CDVInAppBrowser.m" />
</platform> </platform>
<!-- windows universal apps (Windows 8.1, Windows Phone 8.1, Windows 8.0) --> <!-- windows -->
<platform name="windows"> <platform name="windows">
<js-module src="www/inappbrowser.js" name="inappbrowser"> <js-module src="www/inappbrowser.js" name="inappbrowser">
<clobbers target="cordova.InAppBrowser.open" /> <clobbers target="cordova.InAppBrowser.open" />
<clobbers target="window.open" />
</js-module> </js-module>
<js-module src="src/windows/InAppBrowserProxy.js" name="InAppBrowserProxy"> <js-module src="src/windows/InAppBrowserProxy.js" name="InAppBrowserProxy">
<runs /> <runs />
...@@ -117,7 +120,6 @@ ...@@ -117,7 +120,6 @@
<platform name="browser"> <platform name="browser">
<js-module src="www/inappbrowser.js" name="inappbrowser"> <js-module src="www/inappbrowser.js" name="inappbrowser">
<clobbers target="cordova.InAppBrowser.open" /> <clobbers target="cordova.InAppBrowser.open" />
<clobbers target="window.open" />
</js-module> </js-module>
<js-module src="src/browser/InAppBrowserProxy.js" name="InAppBrowserProxy"> <js-module src="src/browser/InAppBrowserProxy.js" name="InAppBrowserProxy">
<runs /> <runs />
......
...@@ -104,7 +104,7 @@ public class InAppChromeClient extends WebChromeClient { ...@@ -104,7 +104,7 @@ public class InAppChromeClient extends WebChromeClient {
if(defaultValue.startsWith("gap-iab://")) { if(defaultValue.startsWith("gap-iab://")) {
PluginResult scriptResult; PluginResult scriptResult;
String scriptCallbackId = defaultValue.substring(10); String scriptCallbackId = defaultValue.substring(10);
if (scriptCallbackId.startsWith("InAppBrowser")) { if (scriptCallbackId.matches("^InAppBrowser[0-9]{1,10}$")) {
if(message == null || message.length() == 0) { if(message == null || message.length() == 0) {
scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray()); scriptResult = new PluginResult(PluginResult.Status.OK, new JSONArray());
} else { } else {
...@@ -118,9 +118,14 @@ public class InAppChromeClient extends WebChromeClient { ...@@ -118,9 +118,14 @@ public class InAppChromeClient extends WebChromeClient {
result.confirm(""); result.confirm("");
return true; return true;
} }
else {
// Anything else that doesn't look like InAppBrowser0123456789 should end up here
LOG.w(LOG_TAG, "InAppBrowser callback called with invalid callbackId : "+ scriptCallbackId);
result.cancel();
return true;
} }
else }
{ else {
// Anything else with a gap: prefix should get this message // Anything else with a gap: prefix should get this message
LOG.w(LOG_TAG, "InAppBrowser does not support Cordova API calls: " + url + " " + defaultValue); LOG.w(LOG_TAG, "InAppBrowser does not support Cordova API calls: " + url + " " + defaultValue);
result.cancel(); result.cancel();
......
<!DOCTYPE html> /*
<!--
Licensed to the Apache Software Foundation (ASF) under one Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file or more contributor license agreements. See the NOTICE file
distributed with this work for additional information distributed with this work for additional information
...@@ -17,29 +15,13 @@ ...@@ -17,29 +15,13 @@
KIND, either express or implied. See the License for the KIND, either express or implied. See the License for the
specific language governing permissions and limitations specific language governing permissions and limitations
under the License. under the License.
*/
#import <Cordova/CDVScreenOrientationDelegate.h>
-->
@interface CDVInAppBrowserNavigationController : UINavigationController
<html> @property (nonatomic, weak) id <CDVScreenOrientationDelegate> orientationDelegate;
<head>
<meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
<title>Cordova Mobile Spec</title>
</head> @end
<body>
<video width=100% height=100% id="player">
<source src="http://m.comptoir-info.com/app/beta/sample.mp4">
<meta property="og:video:secure_url" content="http://m.comptoir-info.com/app/beta/sample.mp4">
<meta property="og:video:type" content="video/mp4">
</video>
<div>
<button onclick="document.getElementById('player').play()"> play </button>
<button onclick="document.getElementById('player').pause()"> pause </button>
</div>
<script>
document.getElementById('player').play();
</script>
</body>
</html>
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
#import "CDVInAppBrowserNavigationController.h"
@implementation CDVInAppBrowserNavigationController : UINavigationController
- (void) dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion {
if ( self.presentedViewController) {
[super dismissViewControllerAnimated:flag completion:completion];
}
}
- (void) viewDidLoad {
[super viewDidLoad];
}
- (CGRect) invertFrameIfNeeded:(CGRect)rect {
if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) {
CGFloat temp = rect.size.width;
rect.size.width = rect.size.height;
rect.size.height = temp;
}
rect.origin = CGPointZero;
return rect;
}
#pragma mark CDVScreenOrientationDelegate
- (BOOL)shouldAutorotate
{
if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(shouldAutorotate)]) {
return [self.orientationDelegate shouldAutorotate];
}
return YES;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(supportedInterfaceOrientations)]) {
return [self.orientationDelegate supportedInterfaceOrientations];
}
return 1 << UIInterfaceOrientationPortrait;
}
@end
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
@interface CDVInAppBrowserOptions : NSObject {}
@property (nonatomic, assign) BOOL location;
@property (nonatomic, assign) BOOL toolbar;
@property (nonatomic, copy) NSString* closebuttoncaption;
@property (nonatomic, copy) NSString* closebuttoncolor;
@property (nonatomic, assign) BOOL lefttoright;
@property (nonatomic, copy) NSString* toolbarposition;
@property (nonatomic, copy) NSString* toolbarcolor;
@property (nonatomic, assign) BOOL toolbartranslucent;
@property (nonatomic, assign) BOOL hidenavigationbuttons;
@property (nonatomic, copy) NSString* navigationbuttoncolor;
@property (nonatomic, assign) BOOL cleardata;
@property (nonatomic, assign) BOOL clearcache;
@property (nonatomic, assign) BOOL clearsessioncache;
@property (nonatomic, assign) BOOL hidespinner;
@property (nonatomic, copy) NSString* presentationstyle;
@property (nonatomic, copy) NSString* transitionstyle;
@property (nonatomic, assign) BOOL enableviewportscale;
@property (nonatomic, assign) BOOL mediaplaybackrequiresuseraction;
@property (nonatomic, assign) BOOL allowinlinemediaplayback;
@property (nonatomic, assign) BOOL hidden;
@property (nonatomic, assign) BOOL disallowoverscroll;
@property (nonatomic, copy) NSString* beforeload;
+ (CDVInAppBrowserOptions*)parseOptions:(NSString*)options;
@end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment