incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: [CB-1258] Add documentation for the new logic to toggle between different exec() techniques on iOS.
Date Fri, 31 Aug 2012 18:30:47 GMT
Updated Branches:
  refs/heads/master cb33d9ffa -> 6d4790ab3


[CB-1258] Add documentation for the new logic to toggle between different exec() techniques
on iOS.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/6d4790ab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/6d4790ab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/6d4790ab

Branch: refs/heads/master
Commit: 6d4790ab3b27618bf80fec2d48dbcc6eaf87c4c1
Parents: cb33d9f
Author: Shazron Abdullah <shazron@apache.org>
Authored: Fri Aug 31 11:30:42 2012 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Fri Aug 31 11:30:42 2012 -0700

----------------------------------------------------------------------
 ...hanging the JavaScript to Native Bridge Mode.md |   36 +++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/6d4790ab/guides/Changing
the JavaScript to Native Bridge Mode.md
----------------------------------------------------------------------
diff --git a/guides/Changing the JavaScript to Native Bridge Mode.md b/guides/Changing the
JavaScript to Native Bridge Mode.md
new file mode 100644
index 0000000..8842d5c
--- /dev/null
+++ b/guides/Changing the JavaScript to Native Bridge Mode.md	
@@ -0,0 +1,36 @@
+<!--
+#
+# 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.
+#
+-->
+# Changing the JavaScript to Native Bridge Mode #
+
+In Cordova 2.1.0 for iOS, we changed the default bridge mode from using an **iframe** to
using **xhr** (XmlHttpRequest). This has proved to fix some [UI issues](https://issues.apache.org/jira/browse/CB-593)
and possibly fix [crash issues](https://issues.apache.org/jira/browse/CB-975).
+
+In iOS 4.2.1 however, Cordova defaults back to **iframe** mode because of [a bug](https://issues.apache.org/jira/browse/CB-1296)
+
+To change the bridge mode back to the **iframe** method, do this in your **deviceready**
hander:
+
+        var exec = cordova.require('cordova/exec');
+        exec.setJsToNativeBridgeMode(exec.jsToNativeModes.XHR_OPTIONAL_PAYLOAD);
+
+
+To change the bridge mode back to the **xhr** method:
+
+        var exec = cordova.require('cordova/exec');
+        exec.setJsToNativeBridgeMode(exec.jsToNativeModes.IFRAME_NAV);


Mime
View raw message