├── .gitignore ├── DefaultIcon.png ├── Gruntfile.js ├── LICENSE ├── MarketplaceArtwork.png ├── MarketplaceArtworkFeature.png ├── README.md ├── app ├── README ├── alloy.jmk ├── alloy.js ├── assets │ ├── android │ │ └── appicon.png │ ├── iphone │ │ ├── Default-568h@2x.png │ │ ├── Default-667h@2x.png │ │ ├── Default-Landscape-736h@3x.png │ │ ├── Default-Landscape.png │ │ ├── Default-Landscape@2x.png │ │ ├── Default-Portrait-736h@3x.png │ │ ├── Default-Portrait.png │ │ ├── Default-Portrait@2x.png │ │ ├── Default.png │ │ ├── Default@2x.png │ │ ├── appicon-60.png │ │ ├── appicon-60@2x.png │ │ ├── appicon-60@3x.png │ │ ├── appicon-72.png │ │ ├── appicon-72@2x.png │ │ ├── appicon-76.png │ │ ├── appicon-76@2x.png │ │ ├── appicon-Small-40.png │ │ ├── appicon-Small-40@2x.png │ │ ├── appicon-Small-50.png │ │ ├── appicon-Small-50@2x.png │ │ ├── appicon-Small.png │ │ ├── appicon-Small@2x.png │ │ ├── appicon-Small@3x.png │ │ ├── appicon.png │ │ ├── appicon@2x.png │ │ ├── iTunesArtwork │ │ ├── iTunesArtwork@2x │ │ └── images │ │ │ ├── tabIcon.png │ │ │ └── tabIcon@2x.png │ └── windows │ │ ├── Logo.png │ │ ├── SmallLogo.png │ │ ├── SplashScreen.png │ │ ├── SplashScreen.scale-240.png │ │ ├── Square44x44Logo.scale-100.png │ │ └── StoreLogo.png ├── config.json ├── controllers │ ├── index.js │ └── windows │ │ └── index.js ├── lib │ └── polyfill.js ├── styles │ ├── app.tss │ ├── index.tss │ └── windows │ │ └── index.tss └── views │ ├── index.xml │ └── windows │ └── index.xml ├── i18n ├── en-GB │ └── strings.xml ├── en-US │ └── strings.xml └── en │ └── strings.xml ├── package.json ├── platform └── android │ └── res │ ├── drawable-hdpi │ ├── appicon.png │ └── background.9.png │ ├── drawable-mdpi │ ├── appicon.png │ └── background.9.png │ ├── drawable-xhdpi │ ├── appicon.png │ └── background.9.png │ ├── drawable-xxhdpi │ ├── appicon.png │ └── background.9.png │ └── values │ └── custom_theme.xml ├── plugins ├── ti.alloy │ ├── hooks │ │ ├── alloy.js │ │ └── deepclean.js │ └── plugin.py ├── ti.map │ └── 1.0 │ │ └── hooks │ │ └── map.js └── ti.version │ └── 1.0 │ └── hooks │ └── version.js ├── screenshots.png └── tiapp.xml /.gitignore: -------------------------------------------------------------------------------- 1 | _assets 2 | .DS_Store 3 | Resources 4 | build.log 5 | build 6 | npm-debug.log 7 | tmp 8 | .map 9 | .project 10 | .settings 11 | Thumbs.db 12 | node_modules -------------------------------------------------------------------------------- /DefaultIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/DefaultIcon.png -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | 3 | module.exports = function (grunt) { 4 | 5 | grunt.registerTask('version', function (what) { 6 | var index = ['major', 'minor', 'patch'].indexOf(what); 7 | 8 | var tiapp = fs.readFileSync('tiapp.xml', { 9 | encoding: 'utf-8' 10 | }); 11 | 12 | if (index !== -1) { 13 | 14 | tiapp = tiapp.replace(/()([^<]+)(<\/version>)/, function (match, before, version, after) { 15 | version = version.split('.'); 16 | 17 | // bump index and reset following 18 | for (var i = index; i <= 2; i++) { 19 | version[i] = (i === index) ? (parseInt(version[i], 10) + 1).toString() : '0'; 20 | } 21 | 22 | version = version.join('.'); 23 | 24 | grunt.log.writeln('Bumped version to: ' + version); 25 | 26 | return before + version + after; 27 | }); 28 | 29 | } 30 | 31 | tiapp = tiapp.replace(/(android:versionCode=")([^"]+)(")/, function (match, before, versionCode, after) { 32 | versionCode = parseInt(versionCode, 10) + 1; 33 | 34 | grunt.log.writeln('Bumped android:versionCode to: ' + versionCode); 35 | 36 | return before + versionCode + after; 37 | }); 38 | 39 | tiapp = tiapp.replace(/(CFBundleVersion<\/key>\s*)([^<]+)(<\/string>)/mg, function (match, before, CFBundleVersion, after) { 40 | CFBundleVersion = parseInt(CFBundleVersion, 10) + 1; 41 | 42 | grunt.log.writeln('Bumped CFBundleVersion to: ' + CFBundleVersion); 43 | 44 | return before + CFBundleVersion + after; 45 | }); 46 | 47 | fs.writeFileSync('tiapp.xml', tiapp); 48 | }); 49 | 50 | }; 51 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008-2013 Appcelerator, Inc. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | (or the full text of the license is below) 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | 18 | 19 | Apache License 20 | Version 2.0, January 2004 21 | http://www.apache.org/licenses/ 22 | 23 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 24 | 25 | 1. Definitions. 26 | 27 | "License" shall mean the terms and conditions for use, reproduction, 28 | and distribution as defined by Sections 1 through 9 of this document. 29 | 30 | "Licensor" shall mean the copyright owner or entity authorized by 31 | the copyright owner that is granting the License. 32 | 33 | "Legal Entity" shall mean the union of the acting entity and all 34 | other entities that control, are controlled by, or are under common 35 | control with that entity. For the purposes of this definition, 36 | "control" means (i) the power, direct or indirect, to cause the 37 | direction or management of such entity, whether by contract or 38 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 39 | outstanding shares, or (iii) beneficial ownership of such entity. 40 | 41 | "You" (or "Your") shall mean an individual or Legal Entity 42 | exercising permissions granted by this License. 43 | 44 | "Source" form shall mean the preferred form for making modifications, 45 | including but not limited to software source code, documentation 46 | source, and configuration files. 47 | 48 | "Object" form shall mean any form resulting from mechanical 49 | transformation or translation of a Source form, including but 50 | not limited to compiled object code, generated documentation, 51 | and conversions to other media types. 52 | 53 | "Work" shall mean the work of authorship, whether in Source or 54 | Object form, made available under the License, as indicated by a 55 | copyright notice that is included in or attached to the work 56 | (an example is provided in the Appendix below). 57 | 58 | "Derivative Works" shall mean any work, whether in Source or Object 59 | form, that is based on (or derived from) the Work and for which the 60 | editorial revisions, annotations, elaborations, or other modifications 61 | represent, as a whole, an original work of authorship. For the purposes 62 | of this License, Derivative Works shall not include works that remain 63 | separable from, or merely link (or bind by name) to the interfaces of, 64 | the Work and Derivative Works thereof. 65 | 66 | "Contribution" shall mean any work of authorship, including 67 | the original version of the Work and any modifications or additions 68 | to that Work or Derivative Works thereof, that is intentionally 69 | submitted to Licensor for inclusion in the Work by the copyright owner 70 | or by an individual or Legal Entity authorized to submit on behalf of 71 | the copyright owner. For the purposes of this definition, "submitted" 72 | means any form of electronic, verbal, or written communication sent 73 | to the Licensor or its representatives, including but not limited to 74 | communication on electronic mailing lists, source code control systems, 75 | and issue tracking systems that are managed by, or on behalf of, the 76 | Licensor for the purpose of discussing and improving the Work, but 77 | excluding communication that is conspicuously marked or otherwise 78 | designated in writing by the copyright owner as "Not a Contribution." 79 | 80 | "Contributor" shall mean Licensor and any individual or Legal Entity 81 | on behalf of whom a Contribution has been received by Licensor and 82 | subsequently incorporated within the Work. 83 | 84 | 2. Grant of Copyright License. Subject to the terms and conditions of 85 | this License, each Contributor hereby grants to You a perpetual, 86 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 87 | copyright license to reproduce, prepare Derivative Works of, 88 | publicly display, publicly perform, sublicense, and distribute the 89 | Work and such Derivative Works in Source or Object form. 90 | 91 | 3. Grant of Patent License. Subject to the terms and conditions of 92 | this License, each Contributor hereby grants to You a perpetual, 93 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 94 | (except as stated in this section) patent license to make, have made, 95 | use, offer to sell, sell, import, and otherwise transfer the Work, 96 | where such license applies only to those patent claims licensable 97 | by such Contributor that are necessarily infringed by their 98 | Contribution(s) alone or by combination of their Contribution(s) 99 | with the Work to which such Contribution(s) was submitted. If You 100 | institute patent litigation against any entity (including a 101 | cross-claim or counterclaim in a lawsuit) alleging that the Work 102 | or a Contribution incorporated within the Work constitutes direct 103 | or contributory patent infringement, then any patent licenses 104 | granted to You under this License for that Work shall terminate 105 | as of the date such litigation is filed. 106 | 107 | 4. Redistribution. You may reproduce and distribute copies of the 108 | Work or Derivative Works thereof in any medium, with or without 109 | modifications, and in Source or Object form, provided that You 110 | meet the following conditions: 111 | 112 | (a) You must give any other recipients of the Work or 113 | Derivative Works a copy of this License; and 114 | 115 | (b) You must cause any modified files to carry prominent notices 116 | stating that You changed the files; and 117 | 118 | (c) You must retain, in the Source form of any Derivative Works 119 | that You distribute, all copyright, patent, trademark, and 120 | attribution notices from the Source form of the Work, 121 | excluding those notices that do not pertain to any part of 122 | the Derivative Works; and 123 | 124 | (d) If the Work includes a "NOTICE" text file as part of its 125 | distribution, then any Derivative Works that You distribute must 126 | include a readable copy of the attribution notices contained 127 | within such NOTICE file, excluding those notices that do not 128 | pertain to any part of the Derivative Works, in at least one 129 | of the following places: within a NOTICE text file distributed 130 | as part of the Derivative Works; within the Source form or 131 | documentation, if provided along with the Derivative Works; or, 132 | within a display generated by the Derivative Works, if and 133 | wherever such third-party notices normally appear. The contents 134 | of the NOTICE file are for informational purposes only and 135 | do not modify the License. You may add Your own attribution 136 | notices within Derivative Works that You distribute, alongside 137 | or as an addendum to the NOTICE text from the Work, provided 138 | that such additional attribution notices cannot be construed 139 | as modifying the License. 140 | 141 | You may add Your own copyright statement to Your modifications and 142 | may provide additional or different license terms and conditions 143 | for use, reproduction, or distribution of Your modifications, or 144 | for any such Derivative Works as a whole, provided Your use, 145 | reproduction, and distribution of the Work otherwise complies with 146 | the conditions stated in this License. 147 | 148 | 5. Submission of Contributions. Unless You explicitly state otherwise, 149 | any Contribution intentionally submitted for inclusion in the Work 150 | by You to the Licensor shall be under the terms and conditions of 151 | this License, without any additional terms or conditions. 152 | Notwithstanding the above, nothing herein shall supersede or modify 153 | the terms of any separate license agreement you may have executed 154 | with Licensor regarding such Contributions. 155 | 156 | 6. Trademarks. This License does not grant permission to use the trade 157 | names, trademarks, service marks, or product names of the Licensor, 158 | except as required for reasonable and customary use in describing the 159 | origin of the Work and reproducing the content of the NOTICE file. 160 | 161 | 7. Disclaimer of Warranty. Unless required by applicable law or 162 | agreed to in writing, Licensor provides the Work (and each 163 | Contributor provides its Contributions) on an "AS IS" BASIS, 164 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 165 | implied, including, without limitation, any warranties or conditions 166 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 167 | PARTICULAR PURPOSE. You are solely responsible for determining the 168 | appropriateness of using or redistributing the Work and assume any 169 | risks associated with Your exercise of permissions under this License. 170 | 171 | 8. Limitation of Liability. In no event and under no legal theory, 172 | whether in tort (including negligence), contract, or otherwise, 173 | unless required by applicable law (such as deliberate and grossly 174 | negligent acts) or agreed to in writing, shall any Contributor be 175 | liable to You for damages, including any direct, indirect, special, 176 | incidental, or consequential damages of any character arising as a 177 | result of this License or out of the use or inability to use the 178 | Work (including but not limited to damages for loss of goodwill, 179 | work stoppage, computer failure or malfunction, or any and all 180 | other commercial damages or losses), even if such Contributor 181 | has been advised of the possibility of such damages. 182 | 183 | 9. Accepting Warranty or Additional Liability. While redistributing 184 | the Work or Derivative Works thereof, You may choose to offer, 185 | and charge a fee for, acceptance of support, warranty, indemnity, 186 | or other liability obligations and/or rights consistent with this 187 | License. However, in accepting such obligations, You may act only 188 | on Your own behalf and on Your sole responsibility, not on behalf 189 | of any other Contributor, and only if You agree to indemnify, 190 | defend, and hold each Contributor harmless for any liability 191 | incurred by, or claims asserted against, such Contributor by reason 192 | of your accepting any such warranty or additional liability. 193 | 194 | END OF TERMS AND CONDITIONS 195 | 196 | APPENDIX: How to apply the Apache License to your work. 197 | 198 | To apply the Apache License to your work, attach the following 199 | boilerplate notice, with the fields enclosed by brackets "[]" 200 | replaced with your own identifying information. (Don't include 201 | the brackets!) The text should be enclosed in the appropriate 202 | comment syntax for the file format. We also recommend that a 203 | file or class name and description of purpose be included on the 204 | same "printed page" as the copyright notice for easier 205 | identification within third-party archives. 206 | 207 | Copyright [yyyy] [name of copyright owner] 208 | 209 | Licensed under the Apache License, Version 2.0 (the "License"); 210 | you may not use this file except in compliance with the License. 211 | You may obtain a copy of the License at 212 | 213 | http://www.apache.org/licenses/LICENSE-2.0 214 | 215 | Unless required by applicable law or agreed to in writing, software 216 | distributed under the License is distributed on an "AS IS" BASIS, 217 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 218 | See the License for the specific language governing permissions and 219 | limitations under the License. 220 | -------------------------------------------------------------------------------- /MarketplaceArtwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/MarketplaceArtwork.png -------------------------------------------------------------------------------- /MarketplaceArtworkFeature.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/MarketplaceArtworkFeature.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Appcelerator Titanium 4.1.0 Sample App 2 | This app demonstrates new features in Titanium 4.1.0. For more information about new and changed API's, see the [Release Notes](https://docs.appcelerator.com/platform/release-notes/?version=4.1.0.GA) and [All Fixed Issues](https://jira.appcelerator.org/issues/?filter=16879) on JIRA. 3 | 4 | ![screenshots](screenshots.png) 5 | 6 | ## Features demonstrated in this sample app 7 | 8 | ### Windows 9 | 10 | * Added [Ti.UI.Windows.CommandBar](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Windows.CommandBar) (and the rest of the API) for Windows.
![Windows](https://img.shields.io/badge/OS-Windows-red.svg?style=flat-square) 11 | 12 | In anticipation of [ALOY-1280](https://jira.appcelerator.org/browse/ALOY-1280) we use a [polyfill](app/lib/polyfill.js) to be able create the CommandBar via Alloy XML via the powerfull `module` attribute. 13 | 14 | ### iOS & Android 15 | 16 | * [TIMOB-17842](https://jira.appcelerator.org/browse/TIMOB-17842): Added [Ti.UI.Tab.titleColor](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Tab-property-titleColor) and [Ti.UI.Tab.activeTitleColor](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Tab-property-activeTitleColor).
![iOS](https://img.shields.io/badge/OS-iOS-blue.svg?style=flat-square) 17 | 18 | Per tab: 19 | 20 | #### Map 21 | 22 | * [TIMOB-2231](https://jira.appcelerator.org/browse/TIMOB-2231): Added [Modules.Map.Circle](https://docs.appcelerator.com/platform/latest/#!/api/Modules.Map.Circle), [Modules.Map.Polyline](https://docs.appcelerator.com/platform/latest/#!/api/Modules.Map.Polyline) and [Modules.Map.Polygon](https://docs.appcelerator.com/platform/latest/#!/api/Modules.Map.Polygon) to the Map module.
![iOS](https://img.shields.io/badge/OS-iOS-blue.svg?style=flat-square) ![Android](https://img.shields.io/badge/OS-Android-green.svg?style=flat-square) 23 | 24 | #### ListView 25 | 26 | * [TIMOB-17621](https://jira.appcelerator.org/browse/TIMOB-17621): Added [Ti.UI.ListView.separatorHeight](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListView-property-separatorHeight).
![Android](https://img.shields.io/badge/OS-Android-green.svg?style=flat-square) 27 | * [TIMOB-16244](https://jira.appcelerator.org/browse/TIMOB-16244): Added [Ti.UI.ListView:scrollstart](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListView-event-scrollstart) and [Ti.UI.ListView:scrollend](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListView-event-scrollend) events.
![iOS](https://img.shields.io/badge/OS-iOS-blue.svg?style=flat-square) ![Android](https://img.shields.io/badge/OS-Android-green.svg?style=flat-square) 28 | * [TIMOB-16494](https://jira.appcelerator.org/browse/TIMOB-16494): Added [Ti.UI.ListView.addMarker()](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListView-method-addMarker) to listen to multiple markers.
![iOS](https://img.shields.io/badge/OS-iOS-blue.svg?style=flat-square) ![Android](https://img.shields.io/badge/OS-Android-green.svg?style=flat-square) 29 | * [TIMOB-15596](https://jira.appcelerator.org/browse/TIMOB-15596): Added [Ti.UI.ListItem.editActions](https://docs.appcelerator.com/platform/latest/#!/guide/ListViews-section-37521650_ListViews-ActionItems) for [ListView Action Items](https://docs.appcelerator.com/platform/latest/#!/guide/ListViews-section-37521650_ListViews-ActionItems).
![iOS](https://img.shields.io/badge/OS-iOS-blue.svg?style=flat-square) 30 | 31 | #### cacheSize 32 | 33 | * [TIMOB-18874](https://jira.appcelerator.org/browse/TIMOB-18874): Parity for [Ti.UI.ScrollableView.cacheSize](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ScrollableView-property-cacheSize)
![Android](https://img.shields.io/badge/OS-Android-green.svg?style=flat-square) 34 | 35 | #### Other 36 | 37 | * [TIMOB-17145](https://jira.appcelerator.org/browse/TIMOB-17145): Parity for `PATCH` as method for [Ti.Network.HTTPClient.open()](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Network.HTTPClient-method-open)
![Android](https://img.shields.io/badge/OS-Android-green.svg?style=flat-square) 38 | * [TIMOB-18905](https://jira.appcelerator.org/browse/TIMOB-18964): Material Design dialogs on Android 4.x and older.
![Android](https://img.shields.io/badge/OS-Android-green.svg?style=flat-square) 39 | * [TIMOB-18816](https://jira.appcelerator.org/browse/TIMOB-18816): Added support for regional languages to [Internationalization](http://docs.appcelerator.com/platform/latest/#!/guide/Internationalization-section-29004892_Internationalization-Languagestrings).
![iOS](https://img.shields.io/badge/OS-iOS-blue.svg?style=flat-square) ![Android](https://img.shields.io/badge/OS-Android-green.svg?style=flat-square) 40 | * [TIMOB-18433](https://jira.appcelerator.org/browse/TIMOB-18433): Added [Ti.UI.TextField.hintTextColor](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TextField-property-hintTextColor) and [Ti.UI.TextArea.hintTextColor](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TextArea-property-hintTextColor).
![Android](https://img.shields.io/badge/OS-Android-green.svg?style=flat-square) 41 | * [TIMOB-17827](https://jira.appcelerator.org/browse/TIMOB-17827): Added [Ti.UI.Label.lines](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Label-property-lines) and [Ti.UI.Label.maxLines](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Label-property-maxLines).
![Android](https://img.shields.io/badge/OS-Android-green.svg?style=flat-square) 42 | * [TIMOB-18103](https://jira.appcelerator.org/browse/TIMOB-18103): Added [Ti.App:uncaughtException](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.App-event-uncaughtException) to listen to uncaught JavaScript exceptions.
![iOS](https://img.shields.io/badge/OS-iOS-blue.svg?style=flat-square) ![Android](https://img.shields.io/badge/OS-Android-green.svg?style=flat-square) 43 | 44 | #### tiapp.xml 45 | 46 | * [TIMOB-18834](https://jira.appcelerator.org/browse/TIMOB-18834): Added option to use JavaScriptCore instead of TiCore.
![iOS](https://img.shields.io/badge/OS-iOS-blue.svg?style=flat-square) 47 | * [TIMOB-17993](https://jira.appcelerator.org/browse/TIMOB-17993): Added option to manually set `CFBundleVersion` and `CFBundleShortVersionString`.
![iOS](https://img.shields.io/badge/OS-iOS-blue.svg?style=flat-square) 48 | 49 | See [Gruntfile.js](Gruntfile.js) for an example of how you can bump an integer build version number for Android and iOS while leaving it up to Titanium to use `` for the release version number. 50 | 51 | npm install 52 | 53 | # to bump release 4.1.0 to 4.2.0 and build 123 to 124 54 | grunt version:minor 55 | 56 | # to bump build 124 to 125 57 | grunt version -------------------------------------------------------------------------------- /app/README: -------------------------------------------------------------------------------- 1 | Welcome to Alloy. Prepare to be amazed. 2 | ======================================= 3 | 4 | Titanium Alloys are metals which contain a mixture of Titanium and other chemical elements. Such Alloys have very high tensile strength and toughness (even at extreme temperatures). They are light weight, have extraordinary corrosion resistance and the ability to withstand extreme temperatures [1]. 5 | 6 | Alloy for Titanium provides you, the developer, with the ability to run fast, jump high and generally code like an amazing superstar. 7 | 8 | Codestrong! 9 | 10 | [1] http://en.wikipedia.org/wiki/Titanium_alloy 11 | 12 | ------------------------- 13 | Now to the serious stuff. 14 | ------------------------- 15 | 16 | Here's how your Alloy directory is laid out. 17 | 18 | models your model files go here 19 | controllers your controllers files go here 20 | views yep, the views go here. you're getting it 21 | styles your style (.tss) files for your views go here 22 | assets All files here will be deployed into Resources 23 | 24 | Folders not generated by Alloy automatically, but the developer can create and use. 25 | 26 | lib put your own libraries here and use require('name') to load it 27 | migrations generated model migrations go here 28 | widgets pre-built, reusable components for your Ally apps. 29 | 30 | Also, in the root is the alloy.jmk file and config.json. Alloy.jmk acts like a makefile and can be used to hook into the Alloy compiler to customize the build process. The config.json file is where you can declare runtime contstants, and widget dependencies. 31 | 32 | -------------------------------------------------------------------------------- /app/alloy.jmk: -------------------------------------------------------------------------------- 1 | task('pre:load', function(event, logger) { 2 | 3 | if (event.minVersion) { 4 | var pkg = require(require('path').join(process.mainModule.filename, '..', '..', 'package.json')); 5 | 6 | if (versionStringToInt(pkg.version) < versionStringToInt(event.minVersion)) { 7 | logger.error('This app requires Alloy ' + event.minVersion + ' or later instead of ' + pkg.version); 8 | process.exit(1); 9 | } 10 | } 11 | }); 12 | 13 | function versionStringToInt(versionStr) { 14 | return versionStr.split(/[^0-9]+/).reverse().reduce(function(previousValue, currentValue, currentIndex) { 15 | return previousValue + Math.pow(100, currentIndex) * parseInt(currentValue, 10); 16 | }, 0); 17 | } 18 | -------------------------------------------------------------------------------- /app/alloy.js: -------------------------------------------------------------------------------- 1 | // The contents of this file will be executed before any of 2 | // your view controllers are ever executed, including the index. 3 | // You have access to all functionality on the `Alloy` namespace. 4 | // 5 | // This is a great place to do any initialization for your app 6 | // or create any global variables/functions that you'd like to 7 | // make available throughout your app. You can easily make things 8 | // accessible globally by attaching them to the `Alloy.Globals` 9 | // object. For example: 10 | // 11 | // Alloy.Globals.someGlobalFunction = function(){}; 12 | 13 | if (OS_ANDROID || OS_IOS) { 14 | 15 | // we need an Alloy.Globals.* reference to use as value in index.tss 16 | Alloy.Globals.map = require('ti.map'); 17 | 18 | // we need an Alloy.Globals.* reference to use as condition in index.xml 19 | Alloy.Globals.production = ENV_PROD; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /app/assets/android/appicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/android/appicon.png -------------------------------------------------------------------------------- /app/assets/iphone/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/Default-568h@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/Default-667h@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/Default-Landscape-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/Default-Landscape-736h@3x.png -------------------------------------------------------------------------------- /app/assets/iphone/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/Default-Landscape.png -------------------------------------------------------------------------------- /app/assets/iphone/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/Default-Landscape@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/Default-Portrait-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/Default-Portrait-736h@3x.png -------------------------------------------------------------------------------- /app/assets/iphone/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/Default-Portrait.png -------------------------------------------------------------------------------- /app/assets/iphone/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/Default-Portrait@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/Default.png -------------------------------------------------------------------------------- /app/assets/iphone/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/Default@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon-60.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon-60@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon-60@3x.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon-72.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon-72@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon-76.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon-76@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon-Small-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon-Small-40.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon-Small-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon-Small-40@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon-Small-50.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon-Small-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon-Small-50@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon-Small.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon-Small@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon-Small@3x.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon.png -------------------------------------------------------------------------------- /app/assets/iphone/appicon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/appicon@2x.png -------------------------------------------------------------------------------- /app/assets/iphone/iTunesArtwork: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/iTunesArtwork -------------------------------------------------------------------------------- /app/assets/iphone/iTunesArtwork@2x: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/iTunesArtwork@2x -------------------------------------------------------------------------------- /app/assets/iphone/images/tabIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/images/tabIcon.png -------------------------------------------------------------------------------- /app/assets/iphone/images/tabIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/iphone/images/tabIcon@2x.png -------------------------------------------------------------------------------- /app/assets/windows/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/windows/Logo.png -------------------------------------------------------------------------------- /app/assets/windows/SmallLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/windows/SmallLogo.png -------------------------------------------------------------------------------- /app/assets/windows/SplashScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/windows/SplashScreen.png -------------------------------------------------------------------------------- /app/assets/windows/SplashScreen.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/windows/SplashScreen.scale-240.png -------------------------------------------------------------------------------- /app/assets/windows/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/windows/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /app/assets/windows/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/app/assets/windows/StoreLogo.png -------------------------------------------------------------------------------- /app/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "global": { 3 | "brandPrimary": "#CD1625", 4 | "minVersion": "1.7.0" 5 | }, 6 | "env:development": {}, 7 | "env:test": {}, 8 | "env:production": {}, 9 | "os:android": {}, 10 | "os:ios": {}, 11 | "os:mobileweb": {}, 12 | "os:windows": {}, 13 | "dependencies": {} 14 | } 15 | -------------------------------------------------------------------------------- /app/controllers/index.js: -------------------------------------------------------------------------------- 1 | (function constructor(args) { 2 | initMap(); 3 | initListView(); 4 | initOther(); 5 | 6 | $.index.open(); 7 | 8 | })(arguments[0] || {}); 9 | 10 | function initListView() { 11 | 12 | // NEW: Allows you to add a marker, instead of replacing the former as with setMarker() 13 | $.listView.addMarker({ 14 | sectionIndex: 0, 15 | itemIndex: 15 16 | }); 17 | $.listView.addMarker({ 18 | sectionIndex: 1, 19 | itemIndex: 15 20 | }); 21 | } 22 | 23 | function initMap() { 24 | 25 | // NEW (iOS, Android): Add one or more - addCircles() - to a map 26 | $.map.addCircle(Alloy.Globals.map.createCircle({ 27 | center: { 28 | longitude: -122.0502150, 29 | latitude: 37.3895100 30 | }, 31 | strokeColor: Alloy.CFG.brandPrimary, 32 | strokeWidth: 5, 33 | fillColor: Alloy.CFG.brandPrimary.replace('#', '#88'), 34 | radius: 10000 35 | })); 36 | 37 | // NEW (iOS, Android): Add one or more - addPolylines() - to a map 38 | $.map.addPolyline(Alloy.Globals.map.createPolyline({ 39 | points: [ 40 | 41 | // can be an array 42 | [-122.0841890, 37.4223450], // Google HQ 43 | 44 | // or an object 45 | { 46 | longitude: -122.0502150, // Appcelerator HQ 47 | latitude: 37.3895100 48 | }, 49 | 50 | [-122.0301890, 37.3316920] // Apple HQ 51 | 52 | ], 53 | strokeColor: '#337ab7', 54 | strokeWidth: 5 55 | })); 56 | 57 | // NEW (iOS, Android): Add one or more - addPolygons() - to a map 58 | $.map.addPolygon(Alloy.Globals.map.createPolygon({ 59 | points: [ 60 | [-122.0546632, 37.4365219], 61 | [-122.0107179, 37.4362493], 62 | [-122.0344072, 37.4594175] 63 | ], 64 | strokeColor: '#5cb85c', 65 | strokeWidth: 5, 66 | fillColor: '#885cb85c' 67 | })); 68 | } 69 | 70 | function initOther() { 71 | 72 | // NEW (iOS, Android): Catch uncaught exceptions 73 | Ti.App.addEventListener('uncaughtException', function (e) { 74 | console.info('[uncaughtException ' + JSON.stringify(e, null, 2)); 75 | 76 | // in development on iOS the red error screen will prevent our alert 77 | // from showing so we wait until the screen has been closed by the user. 78 | if (OS_IOS && !ENV_PROD) { 79 | $.otherWin.addEventListener('focus', function onFocus() { 80 | $.otherWin.removeEventListener('focus', onFocus); 81 | 82 | Ti.UI.createAlertDialog({ 83 | title: 'uncaughtException worked:', 84 | message: JSON.stringify(e) 85 | }).show(); 86 | }); 87 | 88 | } else { 89 | Ti.UI.createAlertDialog({ 90 | title: 'uncaughtException worked:', 91 | message: JSON.stringify(e) 92 | }).show(); 93 | } 94 | }); 95 | } 96 | 97 | // NEW (iOS, Android): Event that fires after user interacts with a custom row action 98 | function onRowAction(e) { 99 | console.info('[rowAction] ' + JSON.stringify(e, null, 2)); 100 | 101 | $.toast.text = '[marker]\n' + e.action; 102 | } 103 | 104 | // NEW (iOS, Android): Event that fires when scrolling starts 105 | function onScrollstart(e) { 106 | console.info('[scrollstart] ' + JSON.stringify(e, null, 2)); 107 | 108 | $.toast.text = '[scrollstart]\nfirstVisibleSectionIndex: ' + e.firstVisibleSectionIndex + '\nfirstVisibleItemIndex: ' + e.firstVisibleItemIndex + '\nvisibleItemCount: ' + e.visibleItemCount; 109 | } 110 | 111 | // NEW (iOS, Android): Event that fires when scrolling ends (either by stopping or after flinging it) 112 | function onScrollend(e) { 113 | console.info('[scrollend] ' + JSON.stringify(e, null, 2)); 114 | 115 | $.toast.text = '[scrollend]\nfirstVisibleSectionIndex: ' + e.firstVisibleSectionIndex + '\nfirstVisibleItemIndex: ' + e.firstVisibleItemIndex + '\nvisibleItemCount: ' + e.visibleItemCount; 116 | } 117 | 118 | function onMarker(e) { 119 | console.info('[marker] ' + JSON.stringify(e, null, 2)); 120 | 121 | $.toast.text = '[marker]\nsectionIndex: ' + e.sectionIndex + '\nitemIndex: ' + e.itemIndex; 122 | } 123 | 124 | function doPatch(e) { 125 | var client = Ti.Network.createHTTPClient({ 126 | onload: function (e) { 127 | console.info('[PATCH] ' + JSON.stringify(this.responseText, null, 2)); 128 | 129 | Ti.UI.createAlertDialog({ 130 | title: 'PATCH works:', 131 | message: this.responseText 132 | }).show(); 133 | }, 134 | onerror: function (e) { 135 | console.error('[PATCH] ' + JSON.stringify(e, null, 2)); 136 | 137 | Ti.UI.createAlertDialog({ 138 | title: 'PATCH did not work:', 139 | message: e.error || 'Unknown Error' 140 | }).show(); 141 | } 142 | }); 143 | 144 | // PARITY (Android): You can now use PATCH, just like you could on iOS 145 | client.open('PATCH', 'http://httpbin.org/patch'); 146 | 147 | client.send(); 148 | } 149 | 150 | function doUncaughtException(e) { 151 | e.doesNotExist(); 152 | } 153 | -------------------------------------------------------------------------------- /app/controllers/windows/index.js: -------------------------------------------------------------------------------- 1 | (function constructor(args) { 2 | 3 | $.index.open(); 4 | 5 | })(arguments[0] || {}); 6 | 7 | function onButtonClick(e) { 8 | console.info('[click] ' + JSON.stringify(e, null, 2)); 9 | 10 | Ti.UI.createAlertDialog({ 11 | title: 'Event:', 12 | message: JSON.stringify(e) 13 | }).show(); 14 | } 15 | 16 | function onToggleButtonClick(e) { 17 | console.info('[click] ' + JSON.stringify(e, null, 2)); 18 | 19 | Ti.UI.createAlertDialog({ 20 | title: 'Checked: ' + (e.source.checked ? 'Yes' : 'No'), 21 | message: JSON.stringify(e) 22 | }).show(); 23 | } 24 | -------------------------------------------------------------------------------- /app/lib/polyfill.js: -------------------------------------------------------------------------------- 1 | exports.createCommandBar = function createCommandBar(params) { 2 | var commandBar = Ti.UI.Windows.createCommandBar(params); 3 | 4 | // Alloy expects the commandBar to have an add() function 5 | commandBar.add = function (item) { 6 | 7 | // FIXME: https://jira.appcelerator.org/browse/TIMOB-19111 8 | var items = this.items; 9 | this.items.push(item); 10 | this.items = items; 11 | }; 12 | 13 | return commandBar; 14 | }; 15 | 16 | exports.createAppBarButton = function createAppBarButton(params) { 17 | return Ti.UI.Windows.createAppBarButton(params); 18 | }; 19 | 20 | exports.createAppBarToggleButton = function createAppBarToggleButton(params) { 21 | return Ti.UI.Windows.createAppBarToggleButton(params); 22 | }; 23 | 24 | exports.createAppBarSeparator = function createAppBarSeparator() { 25 | return Ti.UI.Windows.createAppBarSeparator(); 26 | }; 27 | -------------------------------------------------------------------------------- /app/styles/app.tss: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This is your global styles file. Selectors and rules you define 4 | here will be applied throughout your app. However, these rules 5 | have the lowest priority of any style settings. 6 | 7 | For more information, see the "Style Priorities" section of 8 | http://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_Styles_and_Themes 9 | 10 | For example, the following would apply to all labels, windows, 11 | and text fields (depending on platform) in your app unless you 12 | overrode the settings with other TSS, XML, or JS settings: 13 | 14 | */ 15 | 16 | "Label[platform=android]": { 17 | color: "#000" // all platforms except Android and Windows default to black 18 | } 19 | 20 | "ListItem[platform=android]": { 21 | color: "#000" // all platforms except Android default to black 22 | } 23 | 24 | "Window": { 25 | backgroundColor: "#fff" // white background instead of default transparent 26 | } 27 | 28 | "Window[platform=ios]": { 29 | barColor: Alloy.CFG.brandPrimary, 30 | navTintColor: "#FFF", 31 | translucent: false, 32 | titleAttributes: { 33 | color: "#FFF" 34 | } 35 | } -------------------------------------------------------------------------------- /app/styles/index.tss: -------------------------------------------------------------------------------- 1 | "TabGroup": { 2 | tabsBackgroundColor: "white", 3 | tabsTintColor: Alloy.CFG.brandPrimary 4 | } 5 | 6 | "Tab": { 7 | icon: "/images/tabIcon.png", 8 | 9 | // NEW (iOS): Set the (active) titleColor (defaults to tabsTintColor) 10 | activeTitleColor: "#929292", 11 | titleColor: Alloy.CFG.brandPrimary 12 | } 13 | 14 | "#map": { 15 | 16 | // FIXME: https://jira.appcelerator.org/browse/TIMOB-19102 17 | mapType: Alloy.Globals.map.NORMAL_TYPE, 18 | 19 | region: { 20 | longitude: -122.0502150, 21 | latitude: 37.3895100, 22 | latitudeDelta: 0.5, 23 | longitudeDelta: 0.5 24 | } 25 | } 26 | 27 | "ListView[platform=android]": { 28 | separatorColor: Alloy.CFG.brandPrimary, 29 | 30 | // NEW (Android): Set separatorHeight 31 | separatorHeight: 5 32 | } 33 | 34 | // NEW (iOS): Set custom row actions 35 | "ListItem[platform=ios]": { 36 | canEdit: true, 37 | editActions: [ 38 | { 39 | style: Ti.UI.iOS.ROW_ACTION_STYLE_DESTRUCTIVE, 40 | title: "Destr." 41 | }, 42 | { 43 | style: Ti.UI.iOS.ROW_ACTION_STYLE_NORMAL, 44 | title: "Norm." 45 | }, 46 | { 47 | style: Ti.UI.iOS.ROW_ACTION_STYLE_DEFAULT, 48 | title: "Def." 49 | }, 50 | { 51 | color: "#337ab7", 52 | title: "Color" 53 | } 54 | ] 55 | } 56 | 57 | "#toast": { 58 | bottom: 10, 59 | left: 10, 60 | right: 10, 61 | 62 | backgroundColor: "#8000", 63 | borderRadius: 5, 64 | color: "white" 65 | } 66 | 67 | "ScrollableView": { 68 | showPagingControl: true, 69 | overlayEnabled: true, 70 | pagingControlColor: "transparent", 71 | 72 | // PARITY (Android): This works now for Android now as well 73 | cacheSize: 3 74 | } 75 | 76 | "ScrollView": { 77 | scrollType: "vertical", 78 | contentWidth: Ti.UI.FILL, 79 | contentHeight: Ti.UI.SIZE 80 | } 81 | 82 | "Label": { 83 | width: Ti.UI.FILL, 84 | textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER 85 | } 86 | 87 | "TextField": { 88 | width: Ti.UI.FILL 89 | } 90 | 91 | ".padding": { 92 | top: 10, 93 | right: 10, 94 | bottom: 10, 95 | left: 10, 96 | height: Ti.UI.SIZE 97 | } 98 | 99 | ".svLabel": { 100 | color: "white" 101 | } 102 | 103 | ".help": { 104 | color: "gray" 105 | } 106 | -------------------------------------------------------------------------------- /app/styles/windows/index.tss: -------------------------------------------------------------------------------- 1 | "Window": { 2 | backgroundColor: Alloy.CFG.brandPrimary 3 | } 4 | 5 | "Label": { 6 | color: "white" 7 | } -------------------------------------------------------------------------------- /app/views/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /app/views/windows/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /i18n/en-GB/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hello from i18n/en-GB/strings.xml 4 | -------------------------------------------------------------------------------- /i18n/en-US/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hello from i18n/en-US/strings.xml 4 | -------------------------------------------------------------------------------- /i18n/en/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hello from i18n/en-US/strings.xml 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "assets": "ticons icons _assets/icon_shape.png && ticons icons _assets/icon.png -p ios && ticons splashes _assets/icon.png -c" 4 | }, 5 | "devDependencies": { 6 | "grunt": "^0.4.5" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /platform/android/res/drawable-hdpi/appicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/platform/android/res/drawable-hdpi/appicon.png -------------------------------------------------------------------------------- /platform/android/res/drawable-hdpi/background.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/platform/android/res/drawable-hdpi/background.9.png -------------------------------------------------------------------------------- /platform/android/res/drawable-mdpi/appicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/platform/android/res/drawable-mdpi/appicon.png -------------------------------------------------------------------------------- /platform/android/res/drawable-mdpi/background.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/platform/android/res/drawable-mdpi/background.9.png -------------------------------------------------------------------------------- /platform/android/res/drawable-xhdpi/appicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/platform/android/res/drawable-xhdpi/appicon.png -------------------------------------------------------------------------------- /platform/android/res/drawable-xhdpi/background.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/platform/android/res/drawable-xhdpi/background.9.png -------------------------------------------------------------------------------- /platform/android/res/drawable-xxhdpi/appicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/platform/android/res/drawable-xxhdpi/appicon.png -------------------------------------------------------------------------------- /platform/android/res/drawable-xxhdpi/background.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/platform/android/res/drawable-xxhdpi/background.9.png -------------------------------------------------------------------------------- /platform/android/res/values/custom_theme.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /plugins/ti.alloy/hooks/alloy.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Alloy 3 | * Copyright (c) 2012 by Appcelerator, Inc. All Rights Reserved. 4 | * See LICENSE for more information on licensing. 5 | */ 6 | 7 | exports.cliVersion = '>=3.X'; 8 | var SILENT = true; 9 | 10 | exports.init = function (logger, config, cli, appc) { 11 | var path = require('path'), 12 | fs = require('fs'), 13 | afs = appc.fs, 14 | i18n = appc.i18n(__dirname), 15 | __ = i18n.__, 16 | __n = i18n.__n, 17 | pkginfo = appc.pkginfo.package(module), 18 | exec = require('child_process').exec, 19 | spawn = require('child_process').spawn, 20 | parallel = appc.async.parallel; 21 | 22 | if(!process.env.sdk) { 23 | process.env.sdk = cli.sdk.name; 24 | } 25 | 26 | function run(deviceFamily, deployType, target, finished, silent) { 27 | var appDir = path.join(cli.argv['project-dir'], 'app'); 28 | if (!afs.exists(appDir)) { 29 | logger.info(__('Project not an Alloy app, continuing')); 30 | finished(); 31 | return; 32 | } 33 | logger.info(__('Found Alloy app in %s', appDir.cyan)); 34 | 35 | // TODO: Make this check specific to a TiSDK version 36 | // create a .alloynewcli file to tell old plugins not to run 37 | var buildDir = path.join(cli.argv['project-dir'], 'build'); 38 | if (!afs.exists(buildDir)) { 39 | fs.mkdirSync(buildDir); 40 | } 41 | fs.writeFileSync(path.join(buildDir, '.alloynewcli'), ''); 42 | 43 | var cRequire = afs.resolvePath(__dirname, '..', 'Alloy', 'commands', 'compile', 'index.js'), 44 | config = { 45 | platform: /(?:iphone|ipad)/.test(cli.argv.platform) ? 'ios' : cli.argv.platform, 46 | version: '0', 47 | simtype: 'none', 48 | devicefamily: /(?:iphone|ios)/.test(cli.argv.platform) ? deviceFamily : 'none', 49 | deploytype: deployType || cli.argv['deploy-type'] || 'development', 50 | target: target 51 | }; 52 | if(silent) { 53 | // turn off all logging output for code analyzer build hook 54 | config.noBanner = 'true'; 55 | config.logLevel = '-1'; 56 | } 57 | 58 | config = Object.keys(config).map(function (c) { 59 | return c + '=' + config[c]; 60 | }).join(','); 61 | 62 | if (afs.exists(cRequire)) { 63 | // we're being invoked from the actual alloy directory! 64 | // no need to subprocess, just require() and run 65 | var origLimit = Error.stackTraceLimit; 66 | Error.stackTraceLimit = Infinity; 67 | try { 68 | require(cRequire)({}, { 69 | config: config, 70 | outputPath: cli.argv['project-dir'], 71 | _version: pkginfo.version 72 | }); 73 | } catch (e) { 74 | logger.error(__('Alloy compiler failed')); 75 | e.toString().split('\n').forEach(function (line) { 76 | if (line) { logger.error(line); } 77 | }); 78 | process.exit(1); 79 | } 80 | Error.stackTraceLimit = origLimit; 81 | finished(); 82 | } else { 83 | // we have no clue where alloy is installed, so we're going to subprocess 84 | // alloy and hope it's in the system path or a well known place 85 | var paths = {}; 86 | var locatorCmd = process.platform === 'win32' ? 'where' : 'which'; 87 | parallel(this, ['alloy', 'node'].map(function (bin) { 88 | return function (done) { 89 | var envName = 'ALLOY_' + (bin === 'node' ? 'NODE_' : '') + 'PATH'; 90 | 91 | paths[bin] = process.env[envName]; 92 | if (paths[bin]) { 93 | done(); 94 | } else if (process.platform === 'win32' && bin === 'alloy') { 95 | paths.alloy = 'alloy.cmd'; 96 | done(); 97 | } else { 98 | exec(locatorCmd + ' ' + bin, function (err, stdout, strerr) { 99 | if (!err) { 100 | paths[bin] = stdout.trim(); 101 | done(); 102 | } else { 103 | parallel(this, [ 104 | '/usr/local/bin/' + bin, 105 | '/opt/local/bin/' + bin, 106 | path.join(process.env.HOME, 'local/bin', bin), 107 | '/opt/bin/' + bin, 108 | '/usr/bin/' + bin 109 | ].map(function (p) { 110 | return function (cb) { 111 | if (afs.exists(p)) { paths[bin] = p; } 112 | cb(); 113 | }; 114 | }), done); 115 | } 116 | }); 117 | } 118 | }; 119 | }), function () { 120 | 121 | // compose alloy command execution 122 | var cmd = [paths.node, paths.alloy, 'compile', appDir, '--config', config]; 123 | if (cli.argv['no-colors'] || cli.argv['color'] === false) { cmd.push('--no-colors'); } 124 | 125 | // process each line of output from alloy 126 | function checkLine(line) { 127 | var re = new RegExp( 128 | '(?:\u001b\\[\\d+m)?\\[?(' + 129 | logger.getLevels().join('|') + 130 | ')\\]?\s*(?:\u001b\\[\\d+m)?(.*)', 'i' 131 | ); 132 | if (line) { 133 | var m = line.match(re); 134 | if (m) { 135 | logger[m[1].toLowerCase()](m[2].trim()); 136 | } else { 137 | logger.debug(line); 138 | } 139 | } 140 | } 141 | 142 | // execute alloy in os-specific manner 143 | var child; 144 | if (process.platform === 'win32') { 145 | cmd.shift(); 146 | logger.info(__('Executing Alloy compile: %s', 147 | ['cmd','/s','/c'].concat(cmd).join(' ').cyan)); 148 | 149 | // arg processing from https://github.com/MarcDiethelm/superspawn 150 | child = spawn('cmd', [['/s', '/c', '"' + 151 | cmd.map(function(a) { 152 | if (/^[^"].* .*[^"]/.test(a)) return '"'+a+'"'; return a; 153 | }).join(" ") + '"'].join(" ")], { 154 | stdio: 'inherit', 155 | windowsVerbatimArguments: true 156 | } 157 | ); 158 | } else { 159 | logger.info(__('Executing Alloy compile: %s', cmd.join(' ').cyan)); 160 | child = spawn(cmd.shift(), cmd); 161 | child.stdout.on('data', function (data) { 162 | data.toString().split('\n').forEach(checkLine); 163 | }); 164 | child.stderr.on('data', function (data) { 165 | data.toString().split('\n').forEach(checkLine); 166 | }); 167 | } 168 | 169 | // handle the completion of alloy, success or otherwise 170 | child.on('exit', function (code) { 171 | if (code) { 172 | logger.error(__('Alloy compiler failed')); 173 | process.exit(1); 174 | } else { 175 | logger.info(__('Alloy compiler completed successfully')); 176 | 177 | afs.exists(path.join(cli.argv["project-dir"], 'build', 'i18n')) && process.argv.push('--i18n-dir', 'build'); 178 | afs.exists(path.join(cli.argv["project-dir"], 'build', 'platform')) && (cli.argv['platform-dir'] = 'build/platform'); 179 | } 180 | finished(); 181 | }); 182 | 183 | }); 184 | } 185 | } 186 | 187 | cli.addHook('build.pre.compile', function (build, finished) { 188 | var deployType = build.deployType, 189 | target = build.target; 190 | 191 | run(build.deviceFamily, deployType, target, finished); 192 | }); 193 | 194 | cli.addHook('codeprocessor.pre.run', function (build, finished) { 195 | run('none', 'development', undefined, finished, SILENT); 196 | }); 197 | }; 198 | -------------------------------------------------------------------------------- /plugins/ti.alloy/hooks/deepclean.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Alloy 3 | * Copyright (c) 2014 by Appcelerator, Inc. All Rights Reserved. 4 | * See LICENSE for more information on licensing. 5 | */ 6 | 7 | exports.cliVersion = '>=3.X'; 8 | var SILENT = true; 9 | 10 | exports.init = function (logger, config, cli, appc) { 11 | var path = require('path'), 12 | fs = require('fs'), 13 | afs = appc.fs; 14 | 15 | function run() { 16 | if(cli.argv['shallow'] === '') { 17 | logger.info('Not cleaning the Resources directory') 18 | return; 19 | } 20 | var appDir = path.join(cli.argv['project-dir'], 'app'); 21 | if (!afs.exists(appDir)) { 22 | logger.debug('Project not an Alloy app, exiting.'); 23 | finished(); 24 | return; 25 | } 26 | 27 | var resourcesDir = path.join(cli.argv['project-dir'], 'Resources'); 28 | if (!afs.exists(resourcesDir)) { 29 | logger.debug('Resources directory does not exist.'); 30 | return; 31 | } 32 | rmdir(resourcesDir, fs, path, logger); 33 | logger.debug('Resources directory of %s has been emptied', appDir.cyan); 34 | } 35 | 36 | cli.addHook('clean.post', function (build, finished) { 37 | run(); 38 | }); 39 | 40 | }; 41 | 42 | function rmdir(dirPath, fs, path, logger, removeSelf) { 43 | var files; 44 | try { 45 | files = fs.readdirSync(dirPath); 46 | } 47 | catch(e) { 48 | return; 49 | } 50 | if (files.length > 0) { 51 | for (var i = 0; i < files.length; i++) { 52 | var filePath = path.join(dirPath, files[i]); 53 | if (fs.statSync(filePath).isFile()) { 54 | fs.unlinkSync(filePath); 55 | } else { 56 | rmdir(filePath, fs, path, logger, true); 57 | } 58 | } 59 | } 60 | if (removeSelf) { 61 | fs.rmdirSync(dirPath); 62 | } 63 | } -------------------------------------------------------------------------------- /plugins/ti.alloy/plugin.py: -------------------------------------------------------------------------------- 1 | import os, sys, subprocess, hashlib 2 | 3 | import subprocess 4 | 5 | def check_output(*popenargs, **kwargs): 6 | r"""Run command with arguments and return its output as a byte string. 7 | 8 | Backported from Python 2.7 as it's implemented as pure python on stdlib. 9 | 10 | >>> check_output(['/usr/bin/python', '--version']) 11 | Python 2.6.2 12 | """ 13 | process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs) 14 | output, unused_err = process.communicate() 15 | retcode = process.poll() 16 | if retcode: 17 | cmd = kwargs.get("args") 18 | if cmd is None: 19 | cmd = popenargs[0] 20 | error = subprocess.CalledProcessError(retcode, cmd) 21 | error.output = output 22 | raise error 23 | return output 24 | 25 | def compile(config): 26 | paths = {} 27 | binaries = ["alloy","node"] 28 | 29 | dotAlloy = os.path.abspath(os.path.join(config['project_dir'], 'build', '.alloynewcli')) 30 | if os.path.exists(dotAlloy): 31 | print "[DEBUG] build/.alloynewcli file found, skipping plugin..." 32 | os.remove(dotAlloy) 33 | else: 34 | for binary in binaries: 35 | try: 36 | # see if the environment variable is defined 37 | paths[binary] = os.environ["ALLOY_" + ("NODE_" if binary == "node" else "") + "PATH"] 38 | except KeyError as ex: 39 | # next try PATH, and then our guess paths 40 | if sys.platform == "darwin" or sys.platform.startswith('linux'): 41 | userPath = os.environ["HOME"] 42 | guessPaths = [ 43 | "/usr/local/bin/"+binary, 44 | "/opt/local/bin/"+binary, 45 | userPath+"/local/bin/"+binary, 46 | "/opt/bin/"+binary, 47 | "/usr/bin/"+binary, 48 | "/usr/local/share/npm/bin/"+binary 49 | ] 50 | 51 | try: 52 | binaryPath = check_output(["which",binary], stderr=subprocess.STDOUT).strip() 53 | print "[DEBUG] %s installed at '%s'" % (binary,binaryPath) 54 | except: 55 | print "[WARN] Couldn't find %s on your PATH:" % binary 56 | print "[WARN] %s" % os.environ["PATH"] 57 | print "[WARN]" 58 | print "[WARN] Checking for %s in a few default locations:" % binary 59 | for p in guessPaths: 60 | sys.stdout.write("[WARN] %s -> " % p) 61 | if os.path.exists(p): 62 | binaryPath = p 63 | print "FOUND" 64 | break 65 | else: 66 | print "not found" 67 | binaryPath = None 68 | 69 | if binaryPath is None: 70 | print "[ERROR] Couldn't find %s" % binary 71 | sys.exit(1) 72 | else: 73 | paths[binary] = binaryPath 74 | 75 | # no guesses on windows, just use the PATH 76 | elif sys.platform == "win32": 77 | paths["alloy"] = "alloy.cmd" 78 | 79 | f = os.path.abspath(os.path.join(config['project_dir'], 'app')) 80 | if os.path.exists(f): 81 | print "[INFO] alloy app found at %s" % f 82 | rd = os.path.abspath(os.path.join(config['project_dir'], 'Resources')) 83 | 84 | devicefamily = 'none' 85 | simtype = 'none' 86 | version = '0' 87 | deploytype = 'development' 88 | 89 | if config['platform']==u'ios': 90 | version = config['iphone_version'] 91 | devicefamily = config['devicefamily'] 92 | deploytype = config['deploytype'] 93 | if config['platform']==u'android': 94 | builder = config['android_builder'] 95 | version = builder.tool_api_level 96 | deploytype = config['deploy_type'] 97 | if config['platform']==u'mobileweb': 98 | builder = config['mobileweb_builder'] 99 | deploytype = config['deploytype'] 100 | 101 | cfg = "platform=%s,version=%s,simtype=%s,devicefamily=%s,deploytype=%s," % (config['platform'],version,simtype,devicefamily,deploytype) 102 | 103 | if sys.platform == "win32": 104 | cmd = [paths["alloy"], "compile", f, "--no-colors", "--config", cfg] 105 | else: 106 | cmd = [paths["node"], paths["alloy"], "compile", f, "--no-colors", "--config", cfg] 107 | 108 | print "[INFO] Executing Alloy compile:" 109 | print "[INFO] %s" % " ".join(cmd) 110 | 111 | try: 112 | print check_output(cmd, stderr=subprocess.STDOUT) 113 | except subprocess.CalledProcessError as ex: 114 | if hasattr(ex, 'output'): 115 | print ex.output 116 | print "[ERROR] Alloy compile failed" 117 | retcode = 1 118 | if hasattr(ex, 'returncode'): 119 | retcode = ex.returncode 120 | sys.exit(retcode) 121 | except EnvironmentError as ex: 122 | print "[ERROR] Unexpected error with Alloy compiler plugin: %s" % ex.strerror 123 | sys.exit(2) 124 | -------------------------------------------------------------------------------- /plugins/ti.map/1.0/hooks/map.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var child_process = require('child_process'); 3 | 4 | // Default fingerprint and key 5 | var FINGERPRINT = 'CC:E3:7F:08:FA:03:9C:88:07:BC:CB:AB:7B:88:61:F4:75:9D:47:9F;com.appcelerator.sample.ti410'; 6 | var KEY = 'AIzaSyB1ATGRrby9stkKxvdl3SBYxSVB5Kkm7yM'; 7 | 8 | // Called by Titanium CLI to let the plugin initialize 9 | exports.init = function (logger, config, cli, nodeappc) { 10 | 11 | // We only apply to Android 12 | if (cli.argv.platform !== 'android') { 13 | return; 14 | } 15 | 16 | // Hooking into the CLI on the build.pre.construct event 17 | cli.on('build.pre.construct', function (build, next) { 18 | 19 | // Find current key in tiapp.xml 20 | var manifest = cli.tiapp.android.manifest; 21 | var match = manifest.match(/"com\.google\.android\.maps\.v2\.API_KEY" android:value="([^"]+)"/); 22 | var key = match ? match[1] : null; 23 | 24 | // Find the fingerprint for the given or default keystore 25 | var keystore = cli.argv.keystore || path.join(cli.sdk.path, 'android', 'dev_keystore'); 26 | var cmd = 'keytool -list -protected -keystore "' + keystore + '"'; 27 | child_process.exec(cmd, function (error, stdout, stderr) { 28 | var match, fingerprint; 29 | 30 | // Find fingerprint in the stdout 31 | if (!error && stdout) { 32 | match = stdout.match(/\(SHA1\): (.+)$/m); 33 | 34 | if (match) { 35 | fingerprint = match[1] + ';' + cli.tiapp.id; 36 | } 37 | } 38 | 39 | // Key is missing or not the one needed for the found fingerprint 40 | if (!key || (fingerprint !== FINGERPRINT && key === KEY) || (fingerprint === FINGERPRINT && key !== KEY)) { 41 | 42 | // Key found in manifest 43 | if (key) { 44 | error = 'Please replace `' + key + '` in `tiapp.xml` with a valid Google API Key for your keystore fingerprint.\n\n'; 45 | } else { 46 | error = 'Please make sure `tiapp.xml` has a valid Google API key\n\n'; 47 | } 48 | 49 | error += 'Guide:\nhttp://docs.appcelerator.com/platform/latest/#!/guide/Google_Maps_v2_for_Android-section-36739898_GoogleMapsv2forAndroid-ObtainandAddaGoogleAPIKey\n'; 50 | 51 | // Fingerprint found for keystore 52 | if (fingerprint) { 53 | error += '\nFingerprint:\n' + fingerprint + '\n'; 54 | 55 | // Since it is the default one, we know the key 56 | if (fingerprint === FINGERPRINT) { 57 | error += '\nKey:\n' + KEY + '\n'; 58 | } 59 | } 60 | 61 | logger.error(error); 62 | 63 | return process.exit(1); 64 | } 65 | 66 | return next(); 67 | 68 | }); 69 | }); 70 | }; 71 | -------------------------------------------------------------------------------- /plugins/ti.version/1.0/hooks/version.js: -------------------------------------------------------------------------------- 1 | exports.init = function(logger, config, cli, appc) { 2 | if (cli.tiapp.properties['ti.version.range']) { 3 | if (!appc.version.satisfies(cli.sdk.manifest.name, cli.tiapp.properties['ti.version.range'].value)) { 4 | logger.error('This app requires Titanium SDK ' + cli.tiapp.properties['ti.version.range'].value + ' instead of ' + cli.sdk.name + ' (' + cli.sdk.manifest.name + ')'); 5 | process.exit(1); 6 | } 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /screenshots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appcelerator-developer-relations/appc-sample-ti410/30628a9053386368c16f167a3adb09b965bcb4e1/screenshots.png -------------------------------------------------------------------------------- /tiapp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | com.appcelerator.sample.ti410 4 | Ti 4.1.0 5 | 4.1.0 6 | Appcelerator 7 | http://www.appcelerator.com 8 | This app demonstrates new features in Titanium 4.1.0. 9 | 2015 by Appcelerator, Inc. 10 | appicon.png 11 | false 12 | false 13 | true 14 | 11111111-1111-1111-1111-111111111111 15 | dp 16 | ~4.1.0 17 | 18 | 19 | 21 | true 22 | 23 | 24 | 25 | 26 | 28 | CFBundleVersion 29 | 123 30 | 31 | UISupportedInterfaceOrientations~iphone 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIRequiresPersistentWiFi 43 | 44 | UIPrerenderedIcon 45 | 46 | UIStatusBarHidden 47 | 48 | UIStatusBarStyle 49 | UIStatusBarStyleLightContent 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | true 68 | true 69 | 70 | default 71 | 72 | 73 | ti.map 74 | ti.map 75 | 76 | 77 | true 78 | true 79 | true 80 | false 81 | true 82 | 83 | 4.1.1.GA 84 | 85 | ti.alloy 86 | ti.map 87 | 88 | 89 | --------------------------------------------------------------------------------