Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A602D4F9 for ; Fri, 21 Sep 2012 21:44:37 +0000 (UTC) Received: (qmail 24701 invoked by uid 500); 21 Sep 2012 21:44:37 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 24599 invoked by uid 500); 21 Sep 2012 21:44:37 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 24490 invoked by uid 99); 21 Sep 2012 21:44:37 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2012 21:44:37 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C27EB38D66; Fri, 21 Sep 2012 21:44:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: filmaj@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [5/14] config.xml -> native project configurator modules. moar tests. Message-Id: <20120921214436.C27EB38D66@tyr.zones.apache.org> Date: Fri, 21 Sep 2012 21:44:36 +0000 (UTC) http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/css/index.css ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/css/index.css b/spec/fixtures/projects/native/android/assets/www/css/index.css deleted file mode 100644 index f1f9d76..0000000 --- a/spec/fixtures/projects/native/android/assets/www/css/index.css +++ /dev/null @@ -1,115 +0,0 @@ -/* - * 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. - */ -* { - -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */ - -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */ - -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */ - -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */ -} - -body { - background-color:#E4E4E4; - background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); - background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); - background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); - background-image:-webkit-gradient( - linear, - left top, - left bottom, - color-stop(0, #A7A7A7), - color-stop(0.51, #E4E4E4) - ); - background-attachment:fixed; - font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif; - font-size:12px; - height:100%; - margin:0px; - padding:0px; - text-transform:uppercase; - width:100%; -} - -/* Portrait layout (default) */ -.app { - background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */ - position:absolute; /* position in the center of the screen */ - left:50%; - top:50%; - height:50px; /* text area height */ - width:225px; /* text area width */ - text-align:center; - padding:180px 0px 0px 0px; /* image height is 200px (bottom 20px are overlapped with text) */ - margin:-115px 0px 0px -112px; /* offset vertical: half of image height and text area height */ - /* offset horizontal: half of text area width */ -} - -/* Landscape layout (with min-width) */ -@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) { - .app { - background-position:left center; - padding:75px 0px 75px 170px; /* padding-top + padding-bottom + text area = image height */ - margin:-90px 0px 0px -198px; /* offset vertical: half of image height */ - /* offset horizontal: half of image width and text area width */ - } -} - -h1 { - font-size:24px; - font-weight:normal; - margin:0px; - overflow:visible; - padding:0px; - text-align:center; -} - -.event { - border-radius:4px; - -webkit-border-radius:4px; - color:#FFFFFF; - font-size:12px; - margin:0px 30px; - padding:2px 0px; -} - -.event.listening { - background-color:#333333; - display:block; -} - -.event.received { - background-color:#4B946A; - display:none; -} - -@keyframes fade { - from { opacity: 1.0; } - 50% { opacity: 0.4; } - to { opacity: 1.0; } -} - -@-webkit-keyframes fade { - from { opacity: 1.0; } - 50% { opacity: 0.4; } - to { opacity: 1.0; } -} - -.blink { - animation:fade 3000ms infinite; - -webkit-animation:fade 3000ms infinite; -} http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/img/cordova.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/img/cordova.png b/spec/fixtures/projects/native/android/assets/www/img/cordova.png deleted file mode 100644 index e8169cf..0000000 Binary files a/spec/fixtures/projects/native/android/assets/www/img/cordova.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/img/logo.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/img/logo.png b/spec/fixtures/projects/native/android/assets/www/img/logo.png deleted file mode 100644 index 9519e7d..0000000 Binary files a/spec/fixtures/projects/native/android/assets/www/img/logo.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/index.html ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/index.html b/spec/fixtures/projects/native/android/assets/www/index.html deleted file mode 100644 index 92484ad..0000000 --- a/spec/fixtures/projects/native/android/assets/www/index.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - Hello World - - -
-

Apache Cordova

- -
- - - - - http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/js/index.js ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/js/index.js b/spec/fixtures/projects/native/android/assets/www/js/index.js deleted file mode 100644 index 87b5660..0000000 --- a/spec/fixtures/projects/native/android/assets/www/js/index.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ -var app = { - // Application Constructor - initialize: function() { - this.bindEvents(); - }, - // Bind Event Listeners - // - // Bind any events that are required on startup. Common events are: - // 'load', 'deviceready', 'offline', and 'online'. - bindEvents: function() { - document.addEventListener('deviceready', this.onDeviceReady, false); - }, - // deviceready Event Handler - // - // The scope of 'this' is the event. In order to call the 'receivedEvent' - // function, we must explicitly call 'app.receivedEvent(...);' - onDeviceReady: function() { - app.receivedEvent('deviceready'); - }, - // Update DOM on a Received Event - receivedEvent: function(id) { - var parentElement = document.getElementById(id); - var listeningElement = parentElement.querySelector('.listening'); - var receivedElement = parentElement.querySelector('.received'); - - listeningElement.setAttribute('style', 'display:none;'); - receivedElement.setAttribute('style', 'display:block;'); - - console.log('Received Event: ' + id); - } -}; http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/main.js ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/main.js b/spec/fixtures/projects/native/android/assets/www/main.js deleted file mode 100644 index 3a8b04a..0000000 --- a/spec/fixtures/projects/native/android/assets/www/main.js +++ /dev/null @@ -1,165 +0,0 @@ -/* - 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. -*/ - -var deviceInfo = function() { - document.getElementById("platform").innerHTML = device.platform; - document.getElementById("version").innerHTML = device.version; - document.getElementById("uuid").innerHTML = device.uuid; - document.getElementById("name").innerHTML = device.name; - document.getElementById("width").innerHTML = screen.width; - document.getElementById("height").innerHTML = screen.height; - document.getElementById("colorDepth").innerHTML = screen.colorDepth; -}; - -var getLocation = function() { - var suc = function(p) { - alert(p.coords.latitude + " " + p.coords.longitude); - }; - var locFail = function() { - }; - navigator.geolocation.getCurrentPosition(suc, locFail); -}; - -var beep = function() { - navigator.notification.beep(2); -}; - -var vibrate = function() { - navigator.notification.vibrate(0); -}; - -function roundNumber(num) { - var dec = 3; - var result = Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec); - return result; -} - -var accelerationWatch = null; - -function updateAcceleration(a) { - document.getElementById('x').innerHTML = roundNumber(a.x); - document.getElementById('y').innerHTML = roundNumber(a.y); - document.getElementById('z').innerHTML = roundNumber(a.z); -} - -var toggleAccel = function() { - if (accelerationWatch !== null) { - navigator.accelerometer.clearWatch(accelerationWatch); - updateAcceleration({ - x : "", - y : "", - z : "" - }); - accelerationWatch = null; - } else { - var options = {}; - options.frequency = 1000; - accelerationWatch = navigator.accelerometer.watchAcceleration( - updateAcceleration, function(ex) { - alert("accel fail (" + ex.name + ": " + ex.message + ")"); - }, options); - } -}; - -var preventBehavior = function(e) { - e.preventDefault(); -}; - -function dump_pic(data) { - var viewport = document.getElementById('viewport'); - console.log(data); - viewport.style.display = ""; - viewport.style.position = "absolute"; - viewport.style.top = "10px"; - viewport.style.left = "10px"; - document.getElementById("test_img").src = data; -} - -function fail(msg) { - alert(msg); -} - -function show_pic() { - navigator.camera.getPicture(dump_pic, fail, { - quality : 50 - }); -} - -function close() { - var viewport = document.getElementById('viewport'); - viewport.style.position = "relative"; - viewport.style.display = "none"; -} - -function contacts_success(contacts) { - alert(contacts.length - + ' contacts returned.' - + (contacts[2] && contacts[2].name ? (' Third contact is ' + contacts[2].name.formatted) - : '')); -} - -function get_contacts() { - var obj = new ContactFindOptions(); - obj.filter = ""; - obj.multiple = true; - navigator.contacts.find( - [ "displayName", "name" ], contacts_success, - fail, obj); -} - -function check_network() { - var networkState = navigator.network.connection.type; - - var states = {}; - states[Connection.UNKNOWN] = 'Unknown connection'; - states[Connection.ETHERNET] = 'Ethernet connection'; - states[Connection.WIFI] = 'WiFi connection'; - states[Connection.CELL_2G] = 'Cell 2G connection'; - states[Connection.CELL_3G] = 'Cell 3G connection'; - states[Connection.CELL_4G] = 'Cell 4G connection'; - states[Connection.NONE] = 'No network connection'; - - confirm('Connection type:\n ' + states[networkState]); -} - -var watchID = null; - -function updateHeading(h) { - document.getElementById('h').innerHTML = h.magneticHeading; -} - -function toggleCompass() { - if (watchID !== null) { - navigator.compass.clearWatch(watchID); - watchID = null; - updateHeading({ magneticHeading : "Off"}); - } else { - var options = { frequency: 1000 }; - watchID = navigator.compass.watchHeading(updateHeading, function(e) { - alert('Compass Error: ' + e.code); - }, options); - } -} - -function init() { - // the next line makes it impossible to see Contacts on the HTC Evo since it - // doesn't have a scroll button - // document.addEventListener("touchmove", preventBehavior, false); - document.addEventListener("deviceready", deviceInfo, true); -} http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/master.css ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/master.css b/spec/fixtures/projects/native/android/assets/www/master.css deleted file mode 100644 index 3aad33d..0000000 --- a/spec/fixtures/projects/native/android/assets/www/master.css +++ /dev/null @@ -1,116 +0,0 @@ -/* - 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. -*/ - - - body { - background:#222 none repeat scroll 0 0; - color:#666; - font-family:Helvetica; - font-size:72%; - line-height:1.5em; - margin:0; - border-top:1px solid #393939; - } - - #info{ - background:#ffa; - border: 1px solid #ffd324; - -webkit-border-radius: 5px; - border-radius: 5px; - clear:both; - margin:15px 6px 0; - width:295px; - padding:4px 0px 2px 10px; - } - - #info > h4{ - font-size:.95em; - margin:5px 0; - } - - #stage.theme{ - padding-top:3px; - } - - /* Definition List */ - #stage.theme > dl{ - padding-top:10px; - clear:both; - margin:0; - list-style-type:none; - padding-left:10px; - overflow:auto; - } - - #stage.theme > dl > dt{ - font-weight:bold; - float:left; - margin-left:5px; - } - - #stage.theme > dl > dd{ - width:45px; - float:left; - color:#a87; - font-weight:bold; - } - - /* Content Styling */ - #stage.theme > h1, #stage.theme > h2, #stage.theme > p{ - margin:1em 0 .5em 13px; - } - - #stage.theme > h1{ - color:#eee; - font-size:1.6em; - text-align:center; - margin:0; - margin-top:15px; - padding:0; - } - - #stage.theme > h2{ - clear:both; - margin:0; - padding:3px; - font-size:1em; - text-align:center; - } - - /* Stage Buttons */ - #stage.theme a.btn{ - border: 1px solid #555; - -webkit-border-radius: 5px; - border-radius: 5px; - text-align:center; - display:block; - float:left; - background:#444; - width:150px; - color:#9ab; - font-size:1.1em; - text-decoration:none; - padding:1.2em 0; - margin:3px 0px 3px 5px; - } - #stage.theme a.btn.large{ - width:308px; - padding:1.2em 0; - } - http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-36-ldpi.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-36-ldpi.png b/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-36-ldpi.png deleted file mode 100644 index cd5032a..0000000 Binary files a/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-36-ldpi.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-48-mdpi.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-48-mdpi.png b/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-48-mdpi.png deleted file mode 100644 index e79c606..0000000 Binary files a/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-48-mdpi.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-72-hdpi.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-72-hdpi.png b/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-72-hdpi.png deleted file mode 100644 index 4d27634..0000000 Binary files a/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-72-hdpi.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-96-xhdpi.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-96-xhdpi.png b/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-96-xhdpi.png deleted file mode 100644 index ec7ffbf..0000000 Binary files a/spec/fixtures/projects/native/android/assets/www/res/icon/android/icon-96-xhdpi.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-hdpi-landscape.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-hdpi-landscape.png b/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-hdpi-landscape.png deleted file mode 100644 index a61e2b1..0000000 Binary files a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-hdpi-landscape.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-hdpi-portrait.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-hdpi-portrait.png b/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-hdpi-portrait.png deleted file mode 100644 index 5d6a28a..0000000 Binary files a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-hdpi-portrait.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-ldpi-landscape.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-ldpi-landscape.png b/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-ldpi-landscape.png deleted file mode 100644 index f3934cd..0000000 Binary files a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-ldpi-landscape.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-ldpi-portrait.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-ldpi-portrait.png b/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-ldpi-portrait.png deleted file mode 100644 index 65ad163..0000000 Binary files a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-ldpi-portrait.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-mdpi-landscape.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-mdpi-landscape.png b/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-mdpi-landscape.png deleted file mode 100644 index a1b697c..0000000 Binary files a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-mdpi-landscape.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-mdpi-portrait.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-mdpi-portrait.png b/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-mdpi-portrait.png deleted file mode 100644 index ea15693..0000000 Binary files a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-mdpi-portrait.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-xhdpi-landscape.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-xhdpi-landscape.png b/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-xhdpi-landscape.png deleted file mode 100644 index 79f2f09..0000000 Binary files a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-xhdpi-landscape.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-xhdpi-portrait.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-xhdpi-portrait.png b/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-xhdpi-portrait.png deleted file mode 100644 index c2e8042..0000000 Binary files a/spec/fixtures/projects/native/android/assets/www/res/screen/android/screen-xhdpi-portrait.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/spec.html ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/spec.html b/spec/fixtures/projects/native/android/assets/www/spec.html deleted file mode 100644 index 71f00de..0000000 --- a/spec/fixtures/projects/native/android/assets/www/spec.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - Jasmine Spec Runner - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/spec/helper.js ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/spec/helper.js b/spec/fixtures/projects/native/android/assets/www/spec/helper.js deleted file mode 100644 index 929f776..0000000 --- a/spec/fixtures/projects/native/android/assets/www/spec/helper.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ -afterEach(function() { - document.getElementById('stage').innerHTML = ''; -}); - -var helper = { - trigger: function(obj, name) { - var e = document.createEvent('Event'); - e.initEvent(name, true, true); - obj.dispatchEvent(e); - }, - getComputedStyle: function(querySelector, property) { - var element = document.querySelector(querySelector); - return window.getComputedStyle(element).getPropertyValue(property); - } -}; http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/android/assets/www/spec/index.js ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/android/assets/www/spec/index.js b/spec/fixtures/projects/native/android/assets/www/spec/index.js deleted file mode 100644 index 20f8be5..0000000 --- a/spec/fixtures/projects/native/android/assets/www/spec/index.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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. - */ -describe('app', function() { - describe('initialize', function() { - it('should bind deviceready', function() { - runs(function() { - spyOn(app, 'onDeviceReady'); - app.initialize(); - helper.trigger(window.document, 'deviceready'); - }); - - waitsFor(function() { - return (app.onDeviceReady.calls.length > 0); - }, 'onDeviceReady should be called once', 500); - - runs(function() { - expect(app.onDeviceReady).toHaveBeenCalled(); - }); - }); - }); - - describe('onDeviceReady', function() { - it('should report that it fired', function() { - spyOn(app, 'receivedEvent'); - app.onDeviceReady(); - expect(app.receivedEvent).toHaveBeenCalledWith('deviceready'); - }); - }); - - describe('receivedEvent', function() { - beforeEach(function() { - var el = document.getElementById('stage'); - el.innerHTML = ['
', - '

Listening

', - '

Received

', - '
'].join('\n'); - }); - - it('should hide the listening element', function() { - app.receivedEvent('deviceready'); - var displayStyle = helper.getComputedStyle('#deviceready .listening', 'display'); - expect(displayStyle).toEqual('none'); - }); - - it('should show the received element', function() { - app.receivedEvent('deviceready'); - var displayStyle = helper.getComputedStyle('#deviceready .received', 'display'); - expect(displayStyle).toEqual('block'); - }); - }); -}); http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/ios/balls.xcodeproj/project.pbxproj ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/ios/balls.xcodeproj/project.pbxproj b/spec/fixtures/projects/native/ios/balls.xcodeproj/project.pbxproj new file mode 100644 index 0000000..f64a1fb --- /dev/null +++ b/spec/fixtures/projects/native/ios/balls.xcodeproj/project.pbxproj @@ -0,0 +1,652 @@ +// !$*UTF8*$! +/* + 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. +*/ +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; + 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 1F766FE113BBADB100FB74C0 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1F766FDC13BBADB100FB74C0 /* Localizable.strings */; }; + 1F766FE213BBADB100FB74C0 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1F766FDF13BBADB100FB74C0 /* Localizable.strings */; }; + 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; + 301BF552109A68D80062928A /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF535109A57CC0062928A /* libCordova.a */; }; + 301BF570109A69640062928A /* www in Resources */ = {isa = PBXBuildFile; fileRef = 301BF56E109A69640062928A /* www */; }; + 301BF5B5109A6A2B0062928A /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5B4109A6A2B0062928A /* AddressBook.framework */; }; + 301BF5B7109A6A2B0062928A /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5B6109A6A2B0062928A /* AddressBookUI.framework */; }; + 301BF5B9109A6A2B0062928A /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5B8109A6A2B0062928A /* AudioToolbox.framework */; }; + 301BF5BB109A6A2B0062928A /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5BA109A6A2B0062928A /* AVFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 301BF5BD109A6A2B0062928A /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5BC109A6A2B0062928A /* CFNetwork.framework */; }; + 301BF5BF109A6A2B0062928A /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5BE109A6A2B0062928A /* CoreLocation.framework */; }; + 301BF5C1109A6A2B0062928A /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5C0109A6A2B0062928A /* MediaPlayer.framework */; }; + 301BF5C3109A6A2B0062928A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5C2109A6A2B0062928A /* QuartzCore.framework */; }; + 301BF5C5109A6A2B0062928A /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5C4109A6A2B0062928A /* SystemConfiguration.framework */; }; + 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 302D95EF14D2391D003F00A1 /* MainViewController.m */; }; + 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 302D95F014D2391D003F00A1 /* MainViewController.xib */; }; + 305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */; }; + 3072F99713A8081B00425683 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 3072F99613A8081B00425683 /* Capture.bundle */; }; + 3088BBBD154F3926009F9C59 /* Default-Landscape@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */; }; + 3088BBBE154F3926009F9C59 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */; }; + 3088BBBF154F3926009F9C59 /* Default-Portrait@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB9154F3926009F9C59 /* Default-Portrait@2x~ipad.png */; }; + 3088BBC0154F3926009F9C59 /* Default-Portrait~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBBA154F3926009F9C59 /* Default-Portrait~ipad.png */; }; + 3088BBC1154F3926009F9C59 /* Default@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBBB154F3926009F9C59 /* Default@2x~iphone.png */; }; + 3088BBC2154F3926009F9C59 /* Default~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBBC154F3926009F9C59 /* Default~iphone.png */; }; + 308D05371370CCF300D202BF /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 308D052E1370CCF300D202BF /* icon-72.png */; }; + 308D05381370CCF300D202BF /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 308D052F1370CCF300D202BF /* icon.png */; }; + 308D05391370CCF300D202BF /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 308D05301370CCF300D202BF /* icon@2x.png */; }; + 30A0434814DC770100060A13 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 30A0434314DC770100060A13 /* Localizable.strings */; }; + 30A0434914DC770100060A13 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 30A0434614DC770100060A13 /* Localizable.strings */; }; + 30E1352710E2C1420031B30D /* Cordova.plist in Resources */ = {isa = PBXBuildFile; fileRef = 30E1352610E2C1420031B30D /* Cordova.plist */; }; + 30E5649213A7FCAF007403D8 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30E5649113A7FCAF007403D8 /* CoreMedia.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + D4A0D8761607E02300AEF8BB /* Default-568h@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 301BF534109A57CC0062928A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D2AAC07E0554694100DB518D; + remoteInfo = CordovaLib; + }; + 301BF550109A68C00062928A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = CordovaLib; + }; + 302D95EB14D23909003F00A1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 686357A9141002F100DF4CF2; + remoteInfo = CordovaLibTests; + }; + 3088BBB4154F38EF009F9C59 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 303A4068152124BB00182201; + remoteInfo = CordovaLibApp; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 1D6058910D05DD3D006BFB54 /* balls.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "balls.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 1F766FDD13BBADB100FB74C0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Localizable.strings; sourceTree = ""; }; + 1F766FE013BBADB100FB74C0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Localizable.strings; sourceTree = ""; }; + 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = "../../../../../../incubator-cordova-ios/CordovaLib/CordovaLib.xcodeproj"; sourceTree = ""; }; + 301BF56E109A69640062928A /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = SOURCE_ROOT; }; + 301BF5B4109A6A2B0062928A /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; }; + 301BF5B6109A6A2B0062928A /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; }; + 301BF5B8109A6A2B0062928A /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + 301BF5BA109A6A2B0062928A /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + 301BF5BC109A6A2B0062928A /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; + 301BF5BE109A6A2B0062928A /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + 301BF5C0109A6A2B0062928A /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; + 301BF5C2109A6A2B0062928A /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 301BF5C4109A6A2B0062928A /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + 302D95EE14D2391D003F00A1 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; + 302D95EF14D2391D003F00A1 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; + 302D95F014D2391D003F00A1 /* MainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainViewController.xib; sourceTree = ""; }; + 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; + 3072F99613A8081B00425683 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Capture.bundle; sourceTree = ""; }; + 307D28A1123043350040C0FA /* CordovaBuildSettings.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = CordovaBuildSettings.xcconfig; path = ../CordovaBuildSettings.xcconfig; sourceTree = ""; }; + 3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape@2x~ipad.png"; sourceTree = ""; }; + 3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape~ipad.png"; sourceTree = ""; }; + 3088BBB9154F3926009F9C59 /* Default-Portrait@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait@2x~ipad.png"; sourceTree = ""; }; + 3088BBBA154F3926009F9C59 /* Default-Portrait~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait~ipad.png"; sourceTree = ""; }; + 3088BBBB154F3926009F9C59 /* Default@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x~iphone.png"; sourceTree = ""; }; + 3088BBBC154F3926009F9C59 /* Default~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default~iphone.png"; sourceTree = ""; }; + 308D052E1370CCF300D202BF /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-72.png"; sourceTree = ""; }; + 308D052F1370CCF300D202BF /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = ""; }; + 308D05301370CCF300D202BF /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon@2x.png"; sourceTree = ""; }; + 30A0434414DC770100060A13 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = Localizable.strings; sourceTree = ""; }; + 30A0434714DC770100060A13 /* se */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = se; path = Localizable.strings; sourceTree = ""; }; + 30E1352610E2C1420031B30D /* Cordova.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Cordova.plist; path = ../Cordova.plist; sourceTree = ""; }; + 30E5649113A7FCAF007403D8 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; + 32CA4F630368D1EE00C91783 /* balls-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "balls-Prefix.pch"; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* balls-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "balls-Info.plist"; path = "../balls-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; + D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x~iphone.png"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 301BF552109A68D80062928A /* libCordova.a in Frameworks */, + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, + 301BF5B5109A6A2B0062928A /* AddressBook.framework in Frameworks */, + 301BF5B7109A6A2B0062928A /* AddressBookUI.framework in Frameworks */, + 301BF5B9109A6A2B0062928A /* AudioToolbox.framework in Frameworks */, + 301BF5BB109A6A2B0062928A /* AVFoundation.framework in Frameworks */, + 301BF5BD109A6A2B0062928A /* CFNetwork.framework in Frameworks */, + 301BF5BF109A6A2B0062928A /* CoreLocation.framework in Frameworks */, + 301BF5C1109A6A2B0062928A /* MediaPlayer.framework in Frameworks */, + 301BF5C3109A6A2B0062928A /* QuartzCore.framework in Frameworks */, + 301BF5C5109A6A2B0062928A /* SystemConfiguration.framework in Frameworks */, + 305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */, + 30E5649213A7FCAF007403D8 /* CoreMedia.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 302D95EE14D2391D003F00A1 /* MainViewController.h */, + 302D95EF14D2391D003F00A1 /* MainViewController.m */, + 302D95F014D2391D003F00A1 /* MainViewController.xib */, + 1D3623240D0F684500981E51 /* AppDelegate.h */, + 1D3623250D0F684500981E51 /* AppDelegate.m */, + ); + name = Classes; + path = "balls/Classes"; + sourceTree = SOURCE_ROOT; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* balls.app */, + ); + name = Products; + sourceTree = ""; + }; + 1F766FDB13BBADB100FB74C0 /* en.lproj */ = { + isa = PBXGroup; + children = ( + 1F766FDC13BBADB100FB74C0 /* Localizable.strings */, + ); + path = en.lproj; + sourceTree = ""; + }; + 1F766FDE13BBADB100FB74C0 /* es.lproj */ = { + isa = PBXGroup; + children = ( + 1F766FDF13BBADB100FB74C0 /* Localizable.strings */, + ); + path = es.lproj; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + 301BF56E109A69640062928A /* www */, + 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 307C750510C5A3420062BCA9 /* Plugins */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CustomTemplate; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 32CA4F630368D1EE00C91783 /* balls-Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + path = "balls"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 30A0434214DC770100060A13 /* de.lproj */, + 30A0434514DC770100060A13 /* se.lproj */, + 1F766FDB13BBADB100FB74C0 /* en.lproj */, + 1F766FDE13BBADB100FB74C0 /* es.lproj */, + 3072F99613A8081B00425683 /* Capture.bundle */, + 308D052D1370CCF300D202BF /* icons */, + 308D05311370CCF300D202BF /* splash */, + 30E1352610E2C1420031B30D /* Cordova.plist */, + 8D1107310486CEB800E47090 /* balls-Info.plist */, + 307D28A1123043350040C0FA /* CordovaBuildSettings.xcconfig */, + ); + name = Resources; + path = "balls/Resources"; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + 288765FC0DF74451002DB57D /* CoreGraphics.framework */, + 301BF5B4109A6A2B0062928A /* AddressBook.framework */, + 301BF5B6109A6A2B0062928A /* AddressBookUI.framework */, + 301BF5B8109A6A2B0062928A /* AudioToolbox.framework */, + 301BF5BA109A6A2B0062928A /* AVFoundation.framework */, + 301BF5BC109A6A2B0062928A /* CFNetwork.framework */, + 301BF5BE109A6A2B0062928A /* CoreLocation.framework */, + 301BF5C0109A6A2B0062928A /* MediaPlayer.framework */, + 301BF5C2109A6A2B0062928A /* QuartzCore.framework */, + 301BF5C4109A6A2B0062928A /* SystemConfiguration.framework */, + 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */, + 30E5649113A7FCAF007403D8 /* CoreMedia.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 301BF52E109A57CC0062928A /* Products */ = { + isa = PBXGroup; + children = ( + 301BF535109A57CC0062928A /* libCordova.a */, + 302D95EC14D23909003F00A1 /* CordovaLibTests.octest */, + 3088BBB5154F38EF009F9C59 /* CordovaLibApp.app */, + ); + name = Products; + sourceTree = ""; + }; + 307C750510C5A3420062BCA9 /* Plugins */ = { + isa = PBXGroup; + children = ( + ); + name = Plugins; + path = "balls/Plugins"; + sourceTree = SOURCE_ROOT; + }; + 308D052D1370CCF300D202BF /* icons */ = { + isa = PBXGroup; + children = ( + 308D052E1370CCF300D202BF /* icon-72.png */, + 308D052F1370CCF300D202BF /* icon.png */, + 308D05301370CCF300D202BF /* icon@2x.png */, + ); + path = icons; + sourceTree = ""; + }; + 308D05311370CCF300D202BF /* splash */ = { + isa = PBXGroup; + children = ( + D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */, + 3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */, + 3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */, + 3088BBB9154F3926009F9C59 /* Default-Portrait@2x~ipad.png */, + 3088BBBA154F3926009F9C59 /* Default-Portrait~ipad.png */, + 3088BBBB154F3926009F9C59 /* Default@2x~iphone.png */, + 3088BBBC154F3926009F9C59 /* Default~iphone.png */, + ); + path = splash; + sourceTree = ""; + }; + 30A0434214DC770100060A13 /* de.lproj */ = { + isa = PBXGroup; + children = ( + 30A0434314DC770100060A13 /* Localizable.strings */, + ); + path = de.lproj; + sourceTree = ""; + }; + 30A0434514DC770100060A13 /* se.lproj */ = { + isa = PBXGroup; + children = ( + 30A0434614DC770100060A13 /* Localizable.strings */, + ); + path = se.lproj; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* balls */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "balls" */; + buildPhases = ( + 304B58A110DAC018002A0835 /* Touch www folder */, + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 301BF551109A68C00062928A /* PBXTargetDependency */, + ); + name = "balls"; + productName = "balls"; + productReference = 1D6058910D05DD3D006BFB54 /* balls.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0430; + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "balls" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + en, + es, + de, + se, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 301BF52E109A57CC0062928A /* Products */; + ProjectRef = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* balls */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 301BF535109A57CC0062928A /* libCordova.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libCordova.a; + remoteRef = 301BF534109A57CC0062928A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 302D95EC14D23909003F00A1 /* CordovaLibTests.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = CordovaLibTests.octest; + remoteRef = 302D95EB14D23909003F00A1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3088BBB5154F38EF009F9C59 /* CordovaLibApp.app */ = { + isa = PBXReferenceProxy; + fileType = wrapper.application; + path = CordovaLibApp.app; + remoteRef = 3088BBB4154F38EF009F9C59 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 301BF570109A69640062928A /* www in Resources */, + 30E1352710E2C1420031B30D /* Cordova.plist in Resources */, + 308D05371370CCF300D202BF /* icon-72.png in Resources */, + 308D05381370CCF300D202BF /* icon.png in Resources */, + 308D05391370CCF300D202BF /* icon@2x.png in Resources */, + 3072F99713A8081B00425683 /* Capture.bundle in Resources */, + 1F766FE113BBADB100FB74C0 /* Localizable.strings in Resources */, + 1F766FE213BBADB100FB74C0 /* Localizable.strings in Resources */, + 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */, + 30A0434814DC770100060A13 /* Localizable.strings in Resources */, + 30A0434914DC770100060A13 /* Localizable.strings in Resources */, + 3088BBBD154F3926009F9C59 /* Default-Landscape@2x~ipad.png in Resources */, + 3088BBBE154F3926009F9C59 /* Default-Landscape~ipad.png in Resources */, + 3088BBBF154F3926009F9C59 /* Default-Portrait@2x~ipad.png in Resources */, + 3088BBC0154F3926009F9C59 /* Default-Portrait~ipad.png in Resources */, + 3088BBC1154F3926009F9C59 /* Default@2x~iphone.png in Resources */, + 3088BBC2154F3926009F9C59 /* Default~iphone.png in Resources */, + D4A0D8761607E02300AEF8BB /* Default-568h@2x~iphone.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 304B58A110DAC018002A0835 /* Touch www folder */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Touch www folder"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "touch -cm ${PROJECT_DIR}/www"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589B0D05DD56006BFB54 /* main.m in Sources */, + 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, + 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 301BF551109A68C00062928A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CordovaLib; + targetProxy = 301BF550109A68C00062928A /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 1F766FDC13BBADB100FB74C0 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 1F766FDD13BBADB100FB74C0 /* en */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 1F766FDF13BBADB100FB74C0 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 1F766FE013BBADB100FB74C0 /* es */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 30A0434314DC770100060A13 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 30A0434414DC770100060A13 /* de */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 30A0434614DC770100060A13 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 30A0434714DC770100060A13 /* se */, + ); + name = Localizable.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_OBJCPP_ARC_ABI = YES; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "balls/balls-Prefix.pch"; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + INFOPLIST_FILE = "balls/balls-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 4.2; + PRODUCT_NAME = "balls"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_OBJCPP_ARC_ABI = YES; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "balls/balls-Prefix.pch"; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + INFOPLIST_FILE = "balls/balls-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 4.2; + PRODUCT_NAME = "balls"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 307D28A1123043350040C0FA /* CordovaBuildSettings.xcconfig */; + buildSettings = { + ARCHS = ( + armv6, + armv7, + ); + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", + "\"$(OBJROOT)/UninstalledProducts/include\"", + "\"$(BUILT_PRODUCTS_DIR)\"", + ); + IPHONEOS_DEPLOYMENT_TARGET = 4.2; + OTHER_LDFLAGS = ( + "-weak_framework", + CoreFoundation, + "-weak_framework", + UIKit, + "-weak_framework", + AVFoundation, + "-weak_framework", + CoreMedia, + "-weak-lSystem", + "-all_load", + "-Obj-C", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = NO; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 307D28A1123043350040C0FA /* CordovaBuildSettings.xcconfig */; + buildSettings = { + ARCHS = ( + armv6, + armv7, + ); + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", + "\"$(OBJROOT)/UninstalledProducts/include\"", + "\"$(BUILT_PRODUCTS_DIR)\"", + ); + IPHONEOS_DEPLOYMENT_TARGET = 4.2; + OTHER_LDFLAGS = ( + "-weak_framework", + CoreFoundation, + "-weak_framework", + UIKit, + "-weak_framework", + AVFoundation, + "-weak_framework", + CoreMedia, + "-weak-lSystem", + "-all_load", + "-Obj-C", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = NO; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "balls" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "balls" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/ios/balls/.gitignore ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/ios/balls/.gitignore b/spec/fixtures/projects/native/ios/balls/.gitignore new file mode 100644 index 0000000..d30c0b0 --- /dev/null +++ b/spec/fixtures/projects/native/ios/balls/.gitignore @@ -0,0 +1,6 @@ +*.mode1v3 +*.perspectivev3 +*.pbxuser +.DS_Store +build +www/phonegap.js http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/ios/balls/Classes/AppDelegate.h ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/ios/balls/Classes/AppDelegate.h b/spec/fixtures/projects/native/ios/balls/Classes/AppDelegate.h new file mode 100644 index 0000000..a18ae44 --- /dev/null +++ b/spec/fixtures/projects/native/ios/balls/Classes/AppDelegate.h @@ -0,0 +1,45 @@ +/* + 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. + */ + +// +// AppDelegate.h +// balls +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. +// + +#import + +#import + +@interface AppDelegate : NSObject < UIApplicationDelegate > { + +} + +// invoke string is passed to your app on launch, this is only valid if you +// edit balls-Info.plist to add a protocol +// a simple tutorial can be found here : +// http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html + +@property (nonatomic, strong) IBOutlet UIWindow* window; +@property (nonatomic, strong) IBOutlet CDVViewController* viewController; + +@end + http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/ios/balls/Classes/AppDelegate.m ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/ios/balls/Classes/AppDelegate.m b/spec/fixtures/projects/native/ios/balls/Classes/AppDelegate.m new file mode 100644 index 0000000..ea16bc4 --- /dev/null +++ b/spec/fixtures/projects/native/ios/balls/Classes/AppDelegate.m @@ -0,0 +1,138 @@ +/* + 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. + */ + +// +// AppDelegate.m +// balls +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. +// + +#import "AppDelegate.h" +#import "MainViewController.h" + +#import + + +@implementation AppDelegate + +@synthesize window, viewController; + +- (id) init +{ + /** If you need to do any extra app-specific initialization, you can do it here + * -jm + **/ + NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways]; + + self = [super init]; + return self; +} + +#pragma UIApplicationDelegate implementation + +/** + * This is main kick off after the app inits, the views and Settings are setup here. (preferred - iOS4 and up) + */ +- (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions +{ + NSURL* url = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey]; + NSString* invokeString = nil; + + if (url && [url isKindOfClass:[NSURL class]]) { + invokeString = [url absoluteString]; + NSLog(@"balls launchOptions = %@", url); + } + + CGRect screenBounds = [[UIScreen mainScreen] bounds]; + self.window = [[UIWindow alloc] initWithFrame:screenBounds]; + self.window.autoresizesSubviews = YES; + + self.viewController = [[MainViewController alloc] init]; + self.viewController.useSplashScreen = YES; + self.viewController.wwwFolderName = @"www"; + self.viewController.startPage = @"index.html"; + self.viewController.invokeString = invokeString; + + // NOTE: To control the view's frame size, override [self.viewController viewWillAppear:] in your view controller. + + // check whether the current orientation is supported: if it is, keep it, rather than forcing a rotation + BOOL forceStartupRotation = YES; + UIDeviceOrientation curDevOrientation = [[UIDevice currentDevice] orientation]; + + if (UIDeviceOrientationUnknown == curDevOrientation) { + // UIDevice isn't firing orientation notifications yet… go look at the status bar + curDevOrientation = (UIDeviceOrientation)[[UIApplication sharedApplication] statusBarOrientation]; + } + + if (UIDeviceOrientationIsValidInterfaceOrientation(curDevOrientation)) { + if ([self.viewController supportsOrientation:curDevOrientation]) { + forceStartupRotation = NO; + } + } + + if (forceStartupRotation) { + UIInterfaceOrientation newOrient; + if ([self.viewController supportsOrientation:UIInterfaceOrientationPortrait]) + newOrient = UIInterfaceOrientationPortrait; + else if ([self.viewController supportsOrientation:UIInterfaceOrientationLandscapeLeft]) + newOrient = UIInterfaceOrientationLandscapeLeft; + else if ([self.viewController supportsOrientation:UIInterfaceOrientationLandscapeRight]) + newOrient = UIInterfaceOrientationLandscapeRight; + else + newOrient = UIInterfaceOrientationPortraitUpsideDown; + + NSLog(@"AppDelegate forcing status bar to: %d from: %d", newOrient, curDevOrientation); + [[UIApplication sharedApplication] setStatusBarOrientation:newOrient]; + } + + self.window.rootViewController = self.viewController; + [self.window makeKeyAndVisible]; + + return YES; +} + +// this happens while we are running ( in the background, or from within our own app ) +// only valid if balls-Info.plist specifies a protocol to handle +- (BOOL) application:(UIApplication*)application handleOpenURL:(NSURL*)url +{ + if (!url) { + return NO; + } + + // calls into javascript global function 'handleOpenURL' + NSString* jsString = [NSString stringWithFormat:@"handleOpenURL(\"%@\");", url]; + [self.viewController.webView stringByEvaluatingJavaScriptFromString:jsString]; + + // all plugins will get the notification, and their handlers will be called + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]]; + + return YES; +} + +- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window +{ + // IPhone doesn't support upside down by default, while the IPad does. Override to allow all orientations always, and let the root view controller decide whats allowed (the supported orientations mask gets intersected). + NSUInteger supportedInterfaceOrientations = (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationPortraitUpsideDown); + return supportedInterfaceOrientations; +} + +@end http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/ios/balls/Classes/MainViewController.h ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/ios/balls/Classes/MainViewController.h b/spec/fixtures/projects/native/ios/balls/Classes/MainViewController.h new file mode 100644 index 0000000..d2f83b5 --- /dev/null +++ b/spec/fixtures/projects/native/ios/balls/Classes/MainViewController.h @@ -0,0 +1,32 @@ +/* + 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. + */ + +// +// MainViewController.h +// balls +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. +// + +#import + +@interface MainViewController : CDVViewController + +@end http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/132a9631/spec/fixtures/projects/native/ios/balls/Classes/MainViewController.m ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/native/ios/balls/Classes/MainViewController.m b/spec/fixtures/projects/native/ios/balls/Classes/MainViewController.m new file mode 100644 index 0000000..5596f3d --- /dev/null +++ b/spec/fixtures/projects/native/ios/balls/Classes/MainViewController.m @@ -0,0 +1,155 @@ +/* + 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. + */ + +// +// MainViewController.h +// balls +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. +// + +#import "MainViewController.h" + +@implementation MainViewController + +- (id) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void) didReceiveMemoryWarning +{ + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +#pragma mark - View lifecycle + +- (void)viewWillAppear:(BOOL)animated +{ + // Set the main view to utilize the entire application frame space of the device. + // Change this to suit your view's UI footprint needs in your application. + + UIView* rootView =[[[[UIApplication sharedApplication] keyWindow] rootViewController] view]; + CGRect webViewFrame = [[[rootView subviews] objectAtIndex:0] frame]; // first subview is the UIWebView + if (CGRectEqualToRect(webViewFrame, CGRectZero)) { // UIWebView is sized according to its parent, here it hasn't been sized yet + self.view.frame = [[UIScreen mainScreen] applicationFrame]; // size UIWebView's parent according to application frame, which will in turn resize the UIWebView + } + + [super viewWillAppear:animated]; +} + +- (void) viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view from its nib. +} + +- (void) viewDidUnload +{ + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + +- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation +{ + // Return YES for supported orientations + return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation]; +} + +/* Comment out the block below to over-ride */ +/* +- (CDVCordovaView*) newCordovaViewWithFrame:(CGRect)bounds +{ + return[super newCordovaViewWithFrame:bounds]; +} +*/ + +/* Comment out the block below to over-ride */ +/* +#pragma CDVCommandDelegate implementation + +- (id) getCommandInstance:(NSString*)className +{ + return [super getCommandInstance:className]; +} + +- (BOOL) execute:(CDVInvokedUrlCommand*)command +{ + return [super execute:command]; +} + +- (NSString*) pathForResource:(NSString*)resourcepath; +{ + return [super pathForResource:resourcepath]; +} + +- (void) registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className +{ + return [super registerPlugin:plugin withClassName:className]; +} +*/ + +#pragma UIWebDelegate implementation + +- (void) webViewDidFinishLoad:(UIWebView*) theWebView +{ + // only valid if ___PROJECTNAME__-Info.plist specifies a protocol to handle + if (self.invokeString) + { + // this is passed before the deviceready event is fired, so you can access it in js when you receive deviceready + NSLog(@"DEPRECATED: window.invokeString - use the window.handleOpenURL(url) function instead, which is always called when the app is launched through a custom scheme url."); + NSString* jsString = [NSString stringWithFormat:@"var invokeString = \"%@\";", self.invokeString]; + [theWebView stringByEvaluatingJavaScriptFromString:jsString]; + } + + // Black base color for background matches the native apps + theWebView.backgroundColor = [UIColor blackColor]; + + return [super webViewDidFinishLoad:theWebView]; +} + +/* Comment out the block below to over-ride */ +/* + +- (void) webViewDidStartLoad:(UIWebView*)theWebView +{ + return [super webViewDidStartLoad:theWebView]; +} + +- (void) webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error +{ + return [super webView:theWebView didFailLoadWithError:error]; +} + +- (BOOL) webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType +{ + return [super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType]; +} +*/ + +@end