id
int64
0
5.38k
issuekey
stringlengths
4
16
created
stringlengths
19
19
title
stringlengths
5
252
description
stringlengths
1
1.39M
storypoint
float64
0
100
3,326
TIMOB-26128
06/13/2018 19:49:05
Android: Allow asset directory names with a leading underscore to be included in the build
*Summary:* Directory names have a leading underscore '_' (ex: "_MyDirectory") are automatically excluded from the built Android APK's "assets" directory. Google did this intentionally with their "aapt" command line tool. We should change this behavior since iOS and Windows doesn't have this restriction. (Makes it less confusing too.) For JavaScript files under these directories, they will only be excluded when building for the emulator since they're added to the APK's "assets" directory in this case. For "device" and "production" builds, the JavaScript will be correctly included, but this is because they're compiled/encrypted and not bundled under the APK's "assets" directory in this case. *Steps to reproduce:* # Create a Titanium "Classic" app. # Copy the attached [^Test.zip] file's contents to your app. # Build and run the app for the Android emulator. # On app startup, a runtime error will occur where {{require()}} will fail to find the JavaScript file under directory "_Test". # Build and run the app to an Android device. _(Note the emulator.)_ # On app startup, note that a window is displayed, but it fails to display an image. _(The JS files was loaded, but the "_Test/AppcLogo.png" did not get included into the APK.)_ *Cause:* Google's command line tool "aapt" will automatically exclude the following from the APK's assets directory: * .svn * .git * .ds_store * .scc * .CVS * thumbs.db * picasa.ini * _<directory> We can change this behavior by using "aapt" argument {{--ignore-assets}} and tell it not to omit directories with a leading underscore.
3
3,327
TIMOB-26129
06/14/2018 12:40:45
iOS: Migrate Ti.UI.WebView NSURLConnection usage to NSURLSession
We have migrated our networking code base to use NSURLSession in SDK 7.1.0 and it works good. Now that we drop iOS 8 support to move to iOS 9 as our new deployment target (TIMOB-26123), the only remaining deprecation warning is a NSURLConnection usage in the Ti.UI.WebView that is used to handle insecure connections for the "ignoreSslError" property. This should be migrated to NSURLSession as well.
1
3,328
TIMOB-26130
06/14/2018 20:10:40
Android: Fix compatibility with NDK 12+
- Recent optimizations prevent ABI compatibility with {{kroll-v8}} - Remove specific optimization to allow compilation of Titanium SDK on NDK 12+
3
3,329
TIMOB-26131
06/14/2018 20:11:28
Android: SDK is wrongly adding core "Google Play Services" libraries as of 7.1.0
*Summary:* As of Titanium 7.1.0, the SDK is wrongly including the following JAR files to all Android app builds... * play-services-base-11.0.4.jar * play-services-basement-11.0.4.jar * play-services-location-11.0.4.jar * play-services-tasks-11.0.4.jar On a Mac, you can verify that the above libraries are wrongly being included by going to the following directory in Finder... {{~/Library/Application Support/Titanium/mobilesdk/osx/7.x.x/android}} These 4 libraries are not supposed to be there and it's preventing us from updating the "ti.playservices" module's Google Play Services libraries to a newer version (will cause a version conflict). *Note:* Titanum's core "geolocation" code needs a reference to the above mentioned JAR files to compile, but it doesn't require the JAR files to be included. This is because our "geolocation" code will dynamically detect the existence of the Google Play Services classes via reflection... and if they don't exist, it'll fallback to using the OS' location APIs instead. So, we need to exclude the Google Play Services JARs when packaging the SDK.
3
3,330
TIMOB-26133
06/18/2018 05:43:07
TiAPI: hasCompass should be a method, not a property
The "hasCompass" property should be deprecated and moved to the "hasCompass()" method like we do with every other "hasXXX" API, like "hasLocationPermissions()", "hasCameraPermissions()", etc.
0
3,331
TIMOB-26137
06/19/2018 14:00:37
TiAPI: Move 2DMatrix and 3DMatrix to Matrix2D and Matrix3D
We need to rename our Ti.UI.2DMatrix and Ti.UI.3DMatrix to non-numeric proxies. This is important for the following components: - ES6 imports (e.g. Ti.ES6) - Angular support - View support
8
3,332
TIMOB-26138
06/19/2018 14:29:22
Android: Cannot use a module when using a listview childtemplates
The issue is that I cannot use the styled label module that Appcelerator built in a ListView. The type for the ChildTemplates is expecting a string and cannot recognize the module. Please Advise.
13
3,333
TIMOB-26139
06/19/2018 15:25:01
Windows: Unable to build to device when using Windows SDK 15063 and newer tooling is installed
I am unable to build applications to windows device. *Steps to reproduce* # Create a mobile application # Build to device {{appc run -p windows -T wp-device -l trace}} *Log and Error* https://gist.github.com/longton95/62ab044c898b31ef92f35048cb72d735 *Log and Error with --deploy-type production flag* https://gist.github.com/longton95/320cb804efbfee3f3b1c25029bc72856
13
3,334
TIMOB-26140
06/19/2018 15:53:28
Windows: Move 2DMatrix and 3DMatrix to Matrix2D and Matrix3D
We need to rename our Ti.UI.2DMatrix and Ti.UI.3DMatrix to non-numeric proxies. This is important for the following components: - ES6 imports (e.g. Ti.ES6) - Angular support - View support
13
3,335
TIMOB-26142
06/20/2018 13:54:26
TiAPI: Deprecate Ti.XML in favor of standalone module
Our Ti.XML namespace has been around a while now. Nowadays, most of the common-used API's are JSON-based and based on the usage reports, there are not many devs left using this API inside the core. But still, it is still included, with it's 37 files. Removing it would mean a huge compile time bump, so it should be deprecated and moved to a standalone module, like we recently did with Ti.Yahoo.
0
3,336
TIMOB-26144
06/21/2018 03:28:01
Android: Improve File.getDirectoryListing() performance in Resources directory
*Summary:* On Android, accessing files/directories under "Resources" is slower than it should be. These files are stored within the APK where a list of file paths from "assets" can be easily extracted... which should make it faster than storage access. *Test:* Run the below code to fetch a listing of all files under the "Resources" directory. Observe the log for the duration of this function. {code:javascript} var startTime = new Date(); var file = Ti.Filesystem.getFile(Ti.Filesystem.getResourcesDirectory()); var listing = file.getDirectoryListing(); Ti.API.info("@@@ getDirectoryListing() duration: " + (new Date() - startTime)); {code} *Results:* For a project have about 160 files under "Resources", I get the following results... * Android 4.1 Emulator: 80 ms * Galaxy Nexus (Android 4.1): 70 ms * Amazon Fire HD 8 (7th Generation): 19 ms * Pixel XL (Android 8.0): 3 ms *Recommended Solution:* An Android APK is really a zip file. We should open the APK as a zip file and fetch/store all zip entries referencing files under the "assets" directory. This way we can have fast hash table lookups when doing existence checks and fetching directory listings.
5
3,337
TIMOB-26145
06/21/2018 05:15:49
Windows: Improve File.getDirectoryListing() performance in Resources directory
*Summary:* On Windows, accessing files/directories under "Resources" is slower than it should be. These files are stored within the APPX where a list of file paths from "assets" can be easily extracted... which should make it faster than storage access. *Test:* Run the below code to fetch a listing of all files under the "Resources" directory. Observe the log for the duration of this function. {code:javascript} var startTime = new Date(); var file = Ti.Filesystem.getFile(Ti.Filesystem.getResourcesDirectory()); var listing = file.getDirectoryListing(); Ti.API.info("@@@ getDirectoryListing() duration: " + (new Date() - startTime)); {code} *Recommended Solution:* An Windows APPX is really a zip file. We should open the APPX as a zip file and fetch/store all zip entries referencing files under the "assets" directory. This way we can have fast hash table lookups when doing existence checks and fetching directory listings.
5
3,338
TIMOB-26149
06/22/2018 16:13:52
Android: Ti.Filesystem.File#getDirectoryListing() does not return null for file/non-existent directory
According to our docs, and our iOS behavior - if Ti.FIlesystem.File#getDirectoryListing() is called on a file or a directory that does not exist, it should return null. On Android it returns an empty array.
3
3,339
TIMOB-26150
06/22/2018 17:03:34
Windows: Scale Transform Events( source.id) is still `overlay`
Hello ! We was able to test the `source.id` of the events [TIMOB-26072|https://jira.appcelerator.org/browse/TIMOB-26072] with SDK 7.3.0.v20180618182516 as according to this https://github.com/appcelerator/titanium_mobile_windows/pull/1249 it had been solved. For the most part, the problem seemed resolved till I tried on our Application. We created another minimal, complete, and verifiable sample that demonstrates the issue. Please find it attached. In such App, you will see that if you click on the blue section a little bit below the Alloy controller, the source.id is still `overlay`. Simply removing `slidingView.addSomething(controllerview);` from index.js "solves" the issue but, of course, no controller gets added. {code} var doLog = true; var slidingView; var ApplicationView = require('Windows.UI.ViewManagement.ApplicationView'); ApplicationView.GetForCurrentView().TryEnterFullScreenMode(); var Window = require('Windows.UI.Xaml.Window'); var ScaleTransform = require('Windows.UI.Xaml.Media.ScaleTransform'); var DisplayInformation = require('Windows.Graphics.Display.DisplayInformation'); var Frame = require('Windows.UI.Xaml.Controls.Frame'); var Page = require('Windows.UI.Xaml.Controls.Page'); var Double = require('System.Double'); var HorizontalAlignment = require('Windows.UI.Xaml.HorizontalAlignment'); var slidingView = Alloy.createWidget('com.propelics.slidingView'); $.window.add(slidingView.getView()); $.window.open(); console.log("Windows Open"); var resolutionScale = DisplayInformation.GetForCurrentView().ResolutionScale; var baseScale = 50; var currentScale = 100;//Double.cast(resolutionScale); var transform = new ScaleTransform(); transform.ScaleX = baseScale / currentScale; transform.ScaleY = baseScale / currentScale; var rootFrame = Frame.cast(Window.Current.Content); var page = Page.cast(rootFrame.Content); page.Height = 1200; page.Width = 1920; var content = page.Content; // Canvas content.RenderTransform = transform; var controllerview = Alloy.createController('controllerview'); slidingView.addSomething(controllerview); slidingView.animate(); {code} Test SDK : 7.3.0.v20180618182516
13
3,340
TIMOB-26151
06/23/2018 14:44:08
Ti.Platform.id not working on Android in 7.2.0.GA (works on 7.1.1.GA)
I just tried upgrading to Ti 7.2.0.GA and found that Ti.Platform.id is returning null on Android. It works when reverting back to 7.1.1.GA. And it works on iOS. When using 7.1.1.GA `alert(Ti.Platform.id);` returns a string (as expected). When using 7.2.0.GA `alert(Ti.Platform.id);` returns "null". Given 7.2.0 looks like it was mostly about GDPR, could it have been pulled out inadvertently? Or does the documentation need updating (http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Platform-property-id)? Or am I missing something?
2
3,341
TIMOB-26152
06/25/2018 07:06:03
Windows: ScrollView doesn't return correct event source
{{ScrollView}} doesn't return correct source when event listener is added to the scroll view's parent. {code} var win = Ti.UI.createWindow({ backgroundColor: 'green', width: 800, height: 600 }); var view = Ti.UI.createView({ backgroundColor: 'red', width: '80%', height: '80%', id: 'view' }), view2 = Ti.UI.createScrollView({ width: '70%', height: '70%', backgroundColor: 'blue', id: 'view2' }), view3 = Ti.UI.createView({ width: '70%', height: '70%', backgroundColor: 'pink', id: 'view3' }); view2.add(view3); view.add(view2); view.addEventListener('click', function (e) { alert(e.source.id); }); win.add(view); win.open(); {code} Expected: When blue view is clicked, it should show "view2".
8
3,342
TIMOB-26158
06/26/2018 15:09:51
Windows: Build fails with ENOENT error when using transpile
h5.Description When enabling transpilation the build fails with the below error {{ENOENT: no such file or directory, mkdir' C:\Users\awam\.titanium\vsbuild\ticreateapp\bin\assets\Resources\node_modules'}}, I believe this is because it's trying to copy to the wrong place. h5.Steps to reproduce # Enable transpilation in the tiapp.xml {{<transpile>true</transpile>}} # Build the project h5.Actual Above error thrown h5.Expected No error
8
3,343
TIMOB-26161
06/26/2018 21:26:14
Android: Activity Listening Broken on run-on-main-thread = true
Tested with a Pixel on Android 8.0 using a wireless keyboard. Build the app and you will see the OS logs appear. When a wireless keyboard is connected to the device via bluetooth it causes the app to soft reset on Android. I used {code:java} Ti.App._restart(); {code} because I've had problems with the soft reset holding things in memory. When {code:xml} <property name="run-on-main-thread" type="bool">false</property> {code} the listener works correctly. The app restarts and runs 'Start by OS' and 'Resume by OS'. When {code:xml} <property name="run-on-main-thread" type="bool">true</property> {code} the listener does not fire the 'START' & 'RESUME' activity listener after the reset. You will notice this by the lack of error logs.
5
3,344
TIMOB-26159
06/27/2018 02:09:52
Windows: File.getDirectoryListing() returns empty array for file or non-existent directory.
Windows: {{File.getDirectoryListing()}} returns empty array for file or non-existent directory. {code} // FIXME Windows returns empty array it.windowsBroken('returns null for non-existent directory', function () { var nonExistentDir = Ti.Filesystem.getFile('madeup'); var result = nonExistentDir.getDirectoryListing(); should(nonExistentDir).be.ok; should(nonExistentDir.exists()).eql(false); should(result).eql(null); }); // FIXME Windows returns empty array it.windowsBroken('returns null for file', function () { var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'app.js'); var result = file.getDirectoryListing(); should(file).be.ok; should(file.exists()).eql(true); should(file.isFile()).eql(true); should(result).eql(null); }); {code} Expected: {{null}} should be returned for file or non-existent directory.
8
3,345
TIMOB-26160
06/27/2018 08:27:04
iOS: ScrollableView + run-on-main-thread - views dont render until scroll when re-adding views
When enabling {code:java}<property name="run-on-main-thread" type="bool">true</property>{code} ScrollableView does not render views when re-adding views to the ScrollableView until you scroll a bit then they suddenly render. When removing `run-on-main-thread` it works just fine. Steps to reproduce: 1. Create new alloy project 2. In your index.js add the code below 3. Build to ios simlulator 4. Scroll to see everything is working 5. Click on re-add views button - See that views are now all white / not rendered 6. Scroll left or right and see that the views then render 7. Remove run-on-main-thread from tiapp.xml and build and see that everything works fine. {code:java} function reAddViews(){ oldViews = scrollableView.views; scrollableView.views = oldViews; // ANOTHER TEST TO PROVE ONLY NEWLY CREATED VIEWS WORK //var view3 = Ti.UI.createView({ backgroundColor:'orange'}); //scrollableView.views = [oldViews[0],oldViews[1],view3,oldViews[3],oldViews[4]] scrollableView.currentPage = 2; } var button = Titanium.UI.createButton({ title: 'Re-Add Views', bottom: 10, height: 50, }); button.addEventListener('click',reAddViews); $.index.add(button); var view1 = Ti.UI.createView({ backgroundColor:'red'}); var view2 = Ti.UI.createView({ backgroundColor:'blue'}); var view3 = Ti.UI.createView({ backgroundColor:'yellow'}); var view4 = Ti.UI.createView({ backgroundColor:'green'}); var view5 = Ti.UI.createView({ backgroundColor:'pink'}); var scrollableView = Ti.UI.createScrollableView({ views:[view1,view2,view3,view4,view5], showPagingControl:true, bottom: 50, currentPage:2, cacheSize: 9, }); $.index.add(scrollableView); $.index.open(); {code}
0
3,346
TIMOB-26162
06/27/2018 10:51:22
iOS: Animation is not working when the app window is opened from the background.
*Issue Description:* Animation is working fine if application is in foreground, but if we launch the app from background, animation is not working on iOS using ti SDK 7.2.0.GA, 7.0.2.GA. App just freezes. On android, it works as expected. *Test Code:* *index.xml* {code} <Alloy> <Window class="container"> <View height="Ti.UI.SIZE" width = "100%" layout="vertical"> <Label id="title_lbl" touchEnabled="true"></Label> <View id="progressBarView" height="5dp" backgroundColor= "#3340ae4d" width="218dp" top="16dp"> <View id="progressBarItemsView" height="Titanium.UI.FILL" width="59dp" backgroundColor= "#40ae4d"></View> </View> </View> </Window> </Alloy> {code} *index.js* {code} move($.progressBarItemsView); Ti.App.addEventListener("paused", onPausediOS); Ti.App.addEventListener("resumed", onResumediOS); function onPausediOS() { move($.progressBarItemsView, true); } function onResumediOS() { move($.progressBarItemsView, false); } /*function move(view) { view.right = 0; var origin = view.getRect(); var forth = Titanium.UI.createAnimation(); forth.duration = 1500; forth.left = 0; forth.autoreverse = true; forth.repeat = 999999; view.animate(forth); }*/ function move(view, pauseFlag) { view.right = 0; var origin = view.getRect(); var forth = Titanium.UI.createAnimation(); if (pauseFlag) { forth.duration = 0; forth.left = 0; forth.autoreverse = false; forth.repeat = 0; //view.animate(forth); } else { Ti.API.info('pauseFlag>>>' + pauseFlag); forth.duration = 1500; forth.left = 0; forth.autoreverse = true; forth.repeat = 999999; view.animate(forth); } } $.index.open(); {code} *index.tss* {code} ".container": { backgroundColor:"white" } "Label": { width: Ti.UI.SIZE, height: Ti.UI.SIZE, color: "#000" } "#label": { font: { fontSize: 12 } } "#title_lbl": { color: "#515151", text: "Just a Moment . . .", height: Titanium.UI.SIZE, textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER, font: { fontSize: "24sp", //fontFamily: Alloy.Globals.IMG_CONFIG.FONT_SANS_REGULAR }, touchEnabled: true, }, {code} *Steps to reproduce:* Run the test code. Observe that animation is working. Keep the app in background. Launch the app from background again and observe that animation does not work *Expected:* Animation should work when app is launched from background. *Actual:* Animation does not work *Test log:* {code} [INFO] : pauseFlag>>>undefined [DEBUG] : Application booted in 3630.563974 ms [DEBUG] : Firing app event: resumed [INFO] : pauseFlag>>>false [WARN] : New layout set while view [object progressBarItemsView] animating: Will relayout after animation. [WARN] : New layout set while view [object progressBarItemsView] animating: Will relayout after animation. [WARN] : New layout set while view [object progressBarItemsView] animating: Will relayout after animation. [WARN] : New layout set while view [object progressBarItemsView] animating: Will relayout after animation. [DEBUG] : Firing app event: paused [DEBUG] : Firing app event: resumed [INFO] : pauseFlag>>>false [DEBUG] : Firing app event: paused [DEBUG] : Firing app event: resumed [INFO] : pauseFlag>>>false {code} Dropbox link for animation POC: https://www.dropbox.com/s/pr2ua7ndz93pzhf/ProgressbarPOC.zip?dl=0
0
3,347
TIMOB-26164
06/28/2018 08:21:11
iOS: TableView + run-on-main-thread - insertRowAfter directly after updateRow causes error / race crash
When enabling {code:java} <property name="run-on-main-thread" type="bool">true</property> {code} and using TableView, if one runs insertRowAfter directly after updateRow the app will throw the error below or cause race crash with no error. Error: {code:java} [ERROR] Script Error { [ERROR] column = 27; [ERROR] line = 90; [ERROR] message = "Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (20) must be equal to the number of rows contained in that section before the update (20), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out)."; {code} Steps to reproduce: 1. Create new alloy project 2. In your index.js add the code below 3. Build to ios simlulator 5. Click on "Update + Add" button 7. Remove run-on-main-thread from tiapp.xml and build and see that everything works fine. PS....when adding the setTimeout you will see that it works {code:java} var rowData = []; for (var i=0; i<20; i++){ var row = Ti.UI.createTableViewRow({ height: "50dp", width: Ti.UI.FILL, title: "row" + i, }); rowData.push(row); }; var tableView = Ti.UI.createTableView({ data:rowData, bottom: 50, }); $.index.add(tableView); var button = Titanium.UI.createButton({ title: 'Update + Add', bottom: 10, height: 50, }); button.addEventListener('click',function(){ var updatedRow = Ti.UI.createTableViewRow({ height: "50dp", width: Ti.UI.FILL, title: "updatedRow", }); tableView.updateRow(0,updatedRow); //setTimeout(function(){ // uncomment to see it working with a delay var newRow = Ti.UI.createTableViewRow({ height: '50dp', width: Ti.UI.FILL, title: "newRow", }); tableView.insertRowAfter(0,newRow); //}, 500); }); $.index.add(button); $.index.open(); {code}
0
3,348
TIMOB-26165
06/28/2018 12:27:25
iOS: Requiring a JSON file that contains single quotes throws error
h5.Description When requiring a JSON file where a value contains a single quote an error like below is thrown, this works fine on Windows/Android {code} [ERROR] Script Error { [ERROR] column = 32; [ERROR] line = 2; [ERROR] message = "Unexpected identifier 's'. Expected ')' to end an argument list."; [ERROR] sourceURL = "file:///Users/eharris/Library/Developer/CoreSimulator/Devices/EE6CA02F-4F3A-4407-9929-FEAC97512C66/data/Containers/Bundle/Application/4B53071A-F963-4006-9FEC-DA1C01E87548/ticreateapp.app/jsonfile.json"; [ERROR] stack = " at require@[native code]\n at global code(/app.js:1:32)"; [ERROR] } [ERROR] Script Error Module "jsonfile.json" failed to leave a valid exports object {code} *Workaround* Read the file in like {{JSON.parse(Ti.Filesystem.getFile('file.json').read())}} h5.Steps to reproduce # Add the below into a JSON file under your project {code} { "foo": "Singlequotes can ruin one's day" } {code} # Add a require statement into your code that requires the file h5.Actual Error like the above is thrown h5.Expected File should be imported
0
3,349
TIMOB-26167
06/28/2018 19:59:46
Android: Cannot edit TextField/TextArea while in a ScrollView as of 7.3.0
*Summary:* As of Titanium 7.3.0 (not released yet), Android's TextField/TextArea view cannot be edited while they're in a ScrollView. When tapping on them, they immediately drop the focus. This is not an issue in Titanium 7.2.0. I've confirmed it. *Steps to reproduce:* # Create a classic app with the below code targeting Titanium 7.3.0. # Build and run on Android. # Tap on a TextArea. # Notice that the virtual keyboard does not appear. You are unable to edit it. # Scroll down to the bottom. # Tap on a TextField. # Notice that the virtual keyboard does not appear. You are unable to edit it. {code:javascript} var window = Ti.UI.createWindow(); var scrollView = Ti.UI.createScrollView({ showVerticalScrollIndicator: true, layout: "vertical", width: Ti.UI.FILL, height: Ti.UI.FILL, }); for (var index = 1; index <= 20; index++) { var row = Ti.UI.createView({ layout: "horizontal", width: Ti.UI.FILL, height: Ti.UI.SIZE, }); row.add(Ti.UI.createLabel({ text: "Row " + index.toString(), left: "5dp", })); var fieldCreator = (index <= 10) ? Ti.UI.createTextArea : Ti.UI.createTextField; row.add(fieldCreator({ value: "Welcome to the Appcelerator Platform! The Appcelerator Platform helps you develop cross-platform mobile applications using the Titanium SDK, Alloy, Appcelerator Studio and the Appcelerator CLI, then lets you manage the entire lifecycle of the application with debugging, testing, deploying, crash monitoring and analytic data collection.", hintText: "Hint Text", hintType: Ti.UI.HINT_TYPE_ANIMATED, left: "5dp", right: "5dp", width: Ti.UI.FILL, height: (fieldCreator == Ti.UI.createTextArea) ? "100dp" : Ti.UI.SIZE, })); scrollView.add(row); } window.add(scrollView); window.open(); {code}
3
3,350
TIMOB-26172
06/30/2018 03:49:09
Android: "focus" and "blur" events bubbles to parent views when it shouldn't
*Summary:* A view's {{focus}} and {{blur}} events are not supposed to bubble up to the view's parents according to our documentation here... https://docs.appcelerator.com/platform/latest/#!/guide/Event_Handling-section-src-29004896_EventHandling-Bubblingandnon-bubblingevents On Android, they do bubble up. This can cause confusion since these events will bubble up to the window which use the {{focus}} and {{blur}} events to indicate if the window is active, not if it has gained/received input focus. This is not an issue on iOS. *Steps to reproduce:* # Build and run the below code on Android. # If the TextField has the focus, then tap on the "Remove Focus" button. # Clear the Android log. # Tap on the "Set Focus" button. # In the log, notice that the TextField focus event's "bubbles" property is set true. This is wrong. # In the log, notice the Window received a focus event after the TextField did. This is wrong. # Tap on the "Remove Focus" button. # In the log, notice that the TextField blur event's "bubbles" property is set true. This is wrong. # In the log, notice the Window received a blur event after the TextField did. This is wrong. {code:javascript} var window = Ti.UI.createWindow({ layout: "vertical", fullscreen: true, }); var textField = Ti.UI.createTextField({ value: "Focus Test", width: Ti.UI.FILL, height: Ti.UI.SIZE, }); textField.addEventListener("focus", function(e) { Ti.API.info("@@@ TextField 'focus' event received. bubbles: " + e.bubbles); }); textField.addEventListener("blur", function(e) { Ti.API.info("@@@ TextField 'blur' event received. bubbles: " + e.bubbles); }); window.add(textField); var focusButton = Ti.UI.createButton({ title: "Set Focus" }); focusButton.addEventListener("click", function(e) { textField.focus(); }); window.add(focusButton); var blurButton = Ti.UI.createButton({ title: "Remove Focus" }); blurButton.addEventListener("click", function(e) { textField.blur(); }); window.add(blurButton); window.addEventListener("focus", function(e) { Ti.API.info("@@@ Window 'focus' event received."); }); window.addEventListener("blur", function(e) { Ti.API.info("@@@ Window 'blur' event received."); }); window.open(); {code} *Expected Result:* The {{focus}} and {{blur}} events should not not bubble. Their {{bubbles}} property should be {{false}} and the parent window should not have received the TextField's events. *Work-Around:* Set the {{focus}} and {{blur}} event's {{cancelBubble}} property to {{true}} to prevent the event from propagating up the view hierarchy. {code:javascript} var textField = Ti.UI.createTextField(); textField.addEventListener("focus", function(e) { e.cancelBubble = true; }); textField.addEventListener("blur", function(e) { e.cancelBubble = true; }); {code}
3
3,351
TIMOB-26173
07/02/2018 11:55:17
Android: Add the Android Studio default SDK/NDK install paths to the Android lookup
h5.Description Currently if you install the Android SDK through Android Studio you have to add the path in your Titanium config (however we may also find it if you set the env vars, or add the build/platform tools to the path). It would be nice if the Android Studio default install location could be added to the lookup so that it can work a bit more seamlessly, and for some parity with the daemon. The default locations are {{~/Library/Android/Sdk}} and {{%LOCALAPPDATA%/Android/Sdk}}, in that folder also is where the NDK installs to under {{~/Library/Android/Sdk/ndk-bundle}} which we should handle also
3
3,352
TIMOB-26177
07/03/2018 01:04:40
Windows: "focus" and "blur" events bubbles to parent views when it shouldn't
*Summary:* A view's {{focus}} and {{blur}} events are not supposed to bubble up to the view's parents according to our documentation here... https://docs.appcelerator.com/platform/latest/#!/guide/Event_Handling-section-src-29004896_EventHandling-Bubblingandnon-bubblingevents On Windows, they do bubble up. This can cause confusion since these events will bubble up to the window which use the {{focus}} and {{blur}} events to indicate if the window is active, not if it has gained/received input focus. This is not an issue on iOS. *Steps to reproduce:* # Build and run the below code on Windows. # If the TextField has the focus, then tap on the "Remove Focus" button. # Tap on the "Set Focus" button. # In the log, notice that the TextField focus event's "bubbles" property is set true. This is wrong. # In the log, notice the Window received a focus event after the TextField did. This is wrong. # Tap on the "Remove Focus" button. # In the log, notice that the TextField blur event's "bubbles" property is set true. This is wrong. # In the log, notice the Window received a blur event after the TextField did. This is wrong. {code:javascript} var window = Ti.UI.createWindow({ layout: "vertical", }); var textField = Ti.UI.createTextField({ value: "Focus Test", width: Ti.UI.FILL, height: Ti.UI.SIZE, }); textField.addEventListener("focus", function(e) { Ti.API.info("@@@ TextField 'focus' event received. bubbles: " + e.bubbles); }); textField.addEventListener("blur", function(e) { Ti.API.info("@@@ TextField 'blur' event received. bubbles: " + e.bubbles); }); window.add(textField); var focusButton = Ti.UI.createButton({ title: "Set Focus" }); focusButton.addEventListener("click", function(e) { textField.focus(); }); window.add(focusButton); var blurButton = Ti.UI.createButton({ title: "Remove Focus" }); blurButton.addEventListener("click", function(e) { textField.blur(); }); window.add(blurButton); window.addEventListener("focus", function(e) { Ti.API.info("@@@ Window 'focus' event received."); }); window.addEventListener("blur", function(e) { Ti.API.info("@@@ Window 'blur' event received."); }); window.open(); {code} *Expected Result:* The {{focus}} and {{blur}} events should not not bubble. Their {{bubbles}} property should be {{false}} and the parent window should not have received the TextField's events.
8
3,353
TIMOB-26178
07/03/2018 01:08:33
Windows: TextField/TextArea should not receive focus by default when a window is opened
h2. Behavior TextField should not receive focus right after Windows is opened to match iOS's behavior. h2. Test case {code:javascript} var window = Ti.UI.createWindow(); var textField = Ti.UI.createTextField({ value: "Focus Test", width: Ti.UI.FILL, height: Ti.UI.SIZE, }); textField.addEventListener("focus", function(e) { Ti.API.info("@@@ TextField 'focus' event received. bubbles: " + e.bubbles); }); textField.addEventListener("blur", function(e) { Ti.API.info("@@@ TextField 'blur' event received. bubbles: " + e.bubbles); }); window.add(textField); window.open(); {code} Expected: No focus log should be shown after app launched and TextField should not have focus.
8
3,354
TIMOB-26182
07/03/2018 08:49:14
An exception is raised when a remote image URL is set on an ImageView on some Android devices
On one of our Android device, a native exception is raised when we set a remote URL on an ImageView (no problems with local URLs). Visually, no remote images are displayed on the app. If we turn on the storage permission on the device for our app, the images are displayed. This error happens only on SDKs 7.1 and more. Here's the exception : {code:java} [ERROR] TiDrawableReference: (pool-6-thread-1) [46,103593] Problem opening stream with url [the URL]: /storage/emulated/0/Android/data/[the package name]/cache/_tmp/remote-cache/ec4d7d79f9e6687d490bf9eea8f8a779667ad14f.hdr: open failed: EACCES (Permission denied) java.io.FileNotFoundException: /storage/emulated/0/Android/data/[the package name]/cache/_tmp/remote-cache/ec4d7d79f9e6687d490bf9eea8f8a779667ad14f.hdr: open failed: EACCES (Permission denied) at libcore.io.IoBridge.open(IoBridge.java:452) at java.io.FileInputStream.<init>(FileInputStream.java:76) at java.io.FileReader.<init>(FileReader.java:42) at org.appcelerator.titanium.util.TiResponseCache.readHeaders(TiResponseCache.java:351) at org.appcelerator.titanium.util.TiResponseCache.get(TiResponseCache.java:338) at com.android.okhttp.internal.huc.CacheAdapter.getJavaCachedResponse(CacheAdapter.java:103) at com.android.okhttp.internal.huc.CacheAdapter.get(CacheAdapter.java:47) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:229) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:433) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:384) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:231) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java) at java.net.URL.openStream(URL.java:470) at org.appcelerator.titanium.util.TiFileHelper.handleNetworkURL(TiFileHelper.java:248) at org.appcelerator.titanium.util.TiFileHelper.openInputStream(TiFileHelper.java:186) at org.appcelerator.titanium.view.TiDrawableReference.getInputStream(TiDrawableReference.java:896) at org.appcelerator.titanium.view.TiDrawableReference.getBitmap(TiDrawableReference.java:373) at org.appcelerator.titanium.view.TiDrawableReference.getBitmap(TiDrawableReference.java:330) at org.appcelerator.titanium.util.TiLoadImageManager$LoadImageJob.run(TiLoadImageManager.java:132) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818) Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied) at libcore.io.Posix.open(Native Method) at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186) at libcore.io.IoBridge.open(IoBridge.java:438) ... 22 more {code}
3
3,355
TIMOB-26179
07/03/2018 13:23:29
iOS: Property check on proxy always returns true
Checking for property existence on Titanium proxy objects always returns true, ignoring if a property really exists or not. Various aspects of Vue/Angular and module bundling with Rollup/Webpack rely on proper existence checks for properties on our proxies. *Steps to reproduce the behavior* Run the following example code in a Titanium app which compares the behavior to a plain JavaScript object. {code} const win = Ti.UI.createWindow(); const plainObject = { prop: 'bar', func: () => {} }; Ti.API.debug('### hasProperty check ###'); Ti.API.debug('non-existing property'); Ti.API.debug(`proxy: ${'foo' in win}`); Ti.API.debug(`plain: ${'foo' in plainObject}`); Ti.API.debug('existing property'); Ti.API.debug(`proxy: ${'children' in win}`); Ti.API.debug(`plain: ${'prop' in plainObject}`); {code} *Actual behavior* The property check returns true for non-existing properties on the Ti.UI.Window object. *Expected behavior* The property check should return true only for existing properties and false otherwise.
3
3,356
TIMOB-26181
07/03/2018 22:01:33
Android: Application throws exception after close on 7.4.0
- Due to fixing lifecycle events, an exception will be thrown when the events are fired after the KrollRuntime has been destroyed.
3
3,357
TIMOB-26184
07/05/2018 14:42:27
iOS: Timer functions can not be re-assigned
The callbacks for timing function like {{setTimeout}} or {{setInterval}} are bound with the readonly flag and can not be reassigned. This is contradictory to other JS environments like the Web or Node where this is very much possible.
1
3,358
TIMOB-26185
07/06/2018 02:09:38
Hyperloop: iOS - Support Carthage
There has been kind of a shift in deps-management on iOS lately. Some major devs are moving to Carthage to have more control over their deps and some new packaged are even not CocoaPods available so far, like [Flight-School/Money|https://github.com/Flight-School/Money]. We should consider supporting the Carthage build as an alternative to CocoaPods...and silently start thinking about the Apple Swift Package Manager as well... :-)
13
3,359
TIMOB-26189
07/10/2018 00:36:58
Windows: add buttonClickRequired method on Ti.UI.AlertDialog
Adds the {{buttonClickRequired}} property to {{Ti.UI.AlertDialog}}, which controls whether the dialog can be cancelled by clicking the system back button. Defaults to `true`. {code} var win = Ti.UI.createWindow({layout: 'vertical'}), button1 = Ti.UI.createButton({title: 'Cancelable'}), button2 = Ti.UI.createButton({title: 'Non-cancelable'}), dialog = Ti.UI.createAlertDialog({ message: 'Message', ok: 'OK', title: 'Title', persistent: true }); button1.addEventListener('click', function () { dialog.buttonClickRequired = false; dialog.show(); }) button2.addEventListener('click', function () { dialog.buttonClickRequired = true; dialog.show(); }) win.add([button1, button2]); win.open(); {code}
8
3,360
TIMOB-26196
07/10/2018 20:44:50
iOS: Move Ti.Media microphone related APIs to AVAudioRecorder and remove 3rd-party library
iOS should be using AVAudioRecorder for mic recording related APIs, but is using a very, very old 3rd-party library: [SCListener|https://github.com/stephencelis/sc_listener]. Full affected list of API's: - startMicrophoneMonitor() - stopMicrophoneMonitor() - peakMicrophonePower (property) - averageMicrophonePower (property) This does not have to be a breaking change as the newer API's are pretty solid to use. We should also add an example for this into our KitchenSink (cc [~topener])
0
3,361
TIMOB-26201
07/11/2018 15:11:25
TiAPI: Remove all deprecated API's (<= SDK 7.0)
There are many API's (321 in total) that are currently deprecated in the SDK. All API's that have been deprecated before 5.x (e.g. 3.2, 4.0 etc) should go away these days. Some major examples: - Titanium.Android.Calendar -> Ti.Calendar (since 3.2.0) - PENDING_INTENT_FOR_* (since 2.0.0) - Android geolocation legacy mode (since 2.0.0) - Ti.Network.SOCKET_* (since 1.7.0) We could likely save a good amount of compile time for both docs-gen and the SDK itself by removing this. (Edit by Hans: Renamed the ticket to handle all deprecations, not just Ti.Calendar.Event).
13
3,362
TIMOB-26204
07/11/2018 16:21:30
Android: TransformAfterLayout NullPointerException in Ti.Animation
{code:java} [ERROR] TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.appcelerator.titanium.proxy.TiViewProxy.handlePendingAnimation(boolean)' on a null object reference [ERROR] TiApplication: at org.appcelerator.titanium.view.TiUIView$1$1.callAsync(TiUIView.java:549) [ERROR] TiApplication: at org.appcelerator.titanium.util.TiAnimationBuilder$AnimatorListener.onAnimationEnd(TiAnimationBuilder.java:1371) [ERROR] TiApplication: at com.nineoldandroids.animation.AnimatorSet$AnimatorSetListener.onAnimationEnd(AnimatorSet.java:756) [ERROR] TiApplication: at com.nineoldandroids.animation.ValueAnimator.endAnimation(ValueAnimator.java:1034) [ERROR] TiApplication: at com.nineoldandroids.animation.ValueAnimator.access$11(ValueAnimator.java:1024) [ERROR] TiApplication: at com.nineoldandroids.animation.ValueAnimator$AnimationHandler.handleMessage(ValueAnimator.java:669) [ERROR] TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] TiApplication: at android.os.Looper.loop(Looper.java:135) [ERROR] TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5221) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) {code} https://github.com/appcelerator/titanium_mobile/blob/0a7dce77bb4fbdd21370512800a61542670e6006/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java#L549
1
3,363
TIMOB-26206
07/12/2018 11:44:27
CLI: Network check errors with 502 on accessing http://preview.appcelerator.com
h5.Description When running {{[appc] ti setup check}} the network section shows errors as http://preview.appcelerator.com returns a 502, we should either fix this, or remove/replace the url from the list. I prefer the latter, I think we could replace to access {{https://preview.appcelerator.com/appc-studio}} h5.Steps to reproduce # Run {{appc ti setup check}} h5.Actual The following error is shown {code} ✕ http://preview.appcelerator.com (HTTP status: 502) is unreachable ✕ https://preview.appcelerator.com (HTTP status: 502) is unreachable {code} h5.Expected No error should be shown
1
3,364
TIMOB-26207
07/12/2018 13:42:11
CLI: Titanium CLI errors with winston.Logger is not a constructor
h5.Description When using the titanium cli from master branch, the cli errors out with the below {code} /Users/eharris/Documents/git/titanium/lib/logger.js:33 logger = new winston.createLogger({ ^ TypeError: winston.createLogger is not a constructor {code} This is because of the upgrade to winston 3.0.0, we can either downgrade to 1.1.2 (the old version), or fix the usage. The former is probably safer h5.Steps to reproduce # Download the git repo for titanium cli # run {{npm install}} # run {{./bin/titanium}} h5.Actual Above error h5.Steps to reproduce CLI should work
1
3,365
TIMOB-26209
07/12/2018 16:23:04
CLI: If any Xcode installs don't have EULA accepted (even one not being used), build won't work
On our CI build machines we have Xcode 8.1, 9, and 10 beta 3 installed. It seems that accepting the license for 10 beta 3 and 8.1 are mutually exclusive (i.e. if I accept 10 beta 3's license using xcodebuild -license accept, it causes Xcode 8.1 xcodebuild -checkFistLaunchStatus to return a non-zero exit code; and vice versa). When doing ti info or a ti build, this ends up complaining with an error about the Xcode EULA not being accepted - even though in this particular case we have Xcode 10 beta 3 selected and what we are going to use for the build set up properly. The CLI should be able to determine if the Xcode version we're using is ok and mark the other Xcode EULA acceptance as a warning instead of an error that stops the build.
5
3,366
TIMOB-26210
07/13/2018 04:37:46
Windows: Compler warnings PRI249: 0xdef00520 - Invalid qualifier
Currently lots of compiler warnings being produced when building app, seems like it happens only on 7.4.0 master branch. Although it does not prevent app building we want to suppress compiler warnings whenever possible. {code} ... GENERATEPROJECTPRIFILE : warning PRI249: 0xdef00520 - Invalid qualifier: HAS-METADATA [.titanium\vsbuild\win10_classic\win10.x86\Win10Classic.vcxproj] GENERATEPROJECTPRIFILE : warning PRI249: 0xdef00520 - Invalid qualifier: HAS-OWN-METADATA [.titanium\vsbuild\win10_classic\win10.x86\Win10Classic.vcxproj] GENERATEPROJECTPRIFILE : warning PRI249: 0xdef00520 - Invalid qualifier: TO-JSON [.titanium\vsbuild\win10_classic\win10.x86\Win10Classic.vcxproj] GENERATEPROJECTPRIFILE : warning PRI249: 0xdef00520 - Invalid qualifier: MATCH-ALL [.titanium\vsbuild\win10_classic\win10.x86\Win10Classic.vcxproj] GENERATEPROJECTPRIFILE : warning PRI249: 0xdef00520 - Invalid qualifier: PAD-END [.titanium\vsbuild\win10_classic\win10.x86\Win10Classic.vcxproj] GENERATEPROJECTPRIFILE : warning PRI249: 0xdef00520 - Invalid qualifier: PAD-START [.titanium\vsbuild\win10_classic\win10.x86\Win10Classic.vcxproj] GENERATEPROJECTPRIFILE : warning PRI249: 0xdef00520 - Invalid qualifier: TRIM-LEFT [.titanium\vsbuild\win10_classic\win10.x86\Win10Classic.vcxproj] GENERATEPROJECTPRIFILE : warning PRI249: 0xdef00520 - Invalid qualifier: TRIM-RIGHT [.titanium\vsbuild\win10_classic\win10.x86\Win10Classic.vcxproj] GENERATEPROJECTPRIFILE : warning PRI249: 0xdef00520 - Invalid qualifier: ASYNC-ITERATOR [.titanium\vsbuild\win10_classic\win10.x86\Win10Classic.vcxproj] 378 Warning(s) 0 Error(s) {code}
8
3,367
TIMOB-26211
07/13/2018 22:04:52
iOS: Percentage based layout rounds floating widths/heights incorrectly
*Summary:* iOS will incorrectly wrap views within a horizontal layout if their percentage based widths total to 100%. This is not an issue on Android. *Steps to reproduce:* # Build and run [^HorizontalPercent50x50Test.js] on iOS. # Note that the left view width is 50% and the right view width is 50%. # Observe the layout. *Result:* On iOS, the right view is wrongly wrapped to the next row. !HorizontalPercent-iOS-bad.png|thumbnail! *Expected Result:* Both views are expected to be on the same row since they both have a width of 50%. Android does this correctly as seen here... !HorizontalPercent-Android-good.png|thumbnail! *Work-Around:* Use {{Ti.UI.FILL}} to the right-most view's {{width}} property instead of using a percentage. *Note:* The attached [^HorizontalFillTest.js] provides a more complex horizontal layout test. iOS has 2 issues with this as well: * The {{Left (50%) | Right (50%)}} test shows that the views are wrongly shrunk to 25% width instead of 50%. * The yellow {{(75%)}} label does not have the same width as the {{(25%)|(50%)}} labels above it. iOS looks like this... !HorizontaFill-iOS-bad.png|thumbnail! Android handles it correctly as can be seen here... !HorizontalFill-Android-good.png|thumbnail!
5
3,368
TIMOB-26216
07/18/2018 02:22:16
iOS CLI: Incremental build does not remove unencrypted JS files when switching deploy type from "development" to "test"
*Summary:* There is an iOS incremental build issue where if you build for the iOS Simulator first, then an iOS device afterwards, the resulting iOS app bundle will contain both encrypted {{.js}} files an unencrypted plain text {{.js}} files. Builds for device (ie: deployment type "test" and "production") must encrypt all {{.js}} files. This is *+not+* an issue with production/release builds. This is only an issue with debug builds. *Steps to reproduce:* # On Mac, open a "Finder" window. # Go to an existing Titanium project directory. # Delete its "build" directory if it has one. # Open a "Terminal" window. # In the terminal, {{cd}} to the same project directory. # Run: {{appc run -p ios -D development --build-only}} # Wait for the build to finish. # Run: {{appc run -p ios -D test --build-only}} # Wait for the build to finish. # In "Finder", go to directory: {{./build/iphone/build/Products/Debug-iphonesimulator}} # Right click on the app bundle file and select "Show Package Contents" from the popup menu. *Result:* The app bundle for the "test" build contains plain text {{.js}} files such as "app.js" when it shouldn't. A "test" build must encrypt all {{.js}} files. *Notes:* * This is an incremental build issue. The app bundle includes both encrypted {{.js}} files and plain text {{.js}} files from the previous "development" build. * I'm not sure if the reverse is true. When doing a "test" build first and then doing a "development" build, the generated {{ApplicationRouting.m}} does not contain any assets.
0
3,369
TIMOB-26217
07/18/2018 03:16:15
iOS: File methods isFile() and isDirectory() are missing for encrypted assets
*Summary:* On iOS, when loading an encrypted asset such as "app.js" via {{Ti.Filesystem.getFile()}}, the returned {{File}} object is missing methods {{isFile()}} and {{isDirectory()}}. Attempting to call these methods will cause JavaScript runtime error. This is an issue for iOS "production" builds and "test" builds for device. This is not an issue for iOS Simulator builds since JS files are not encrypted. This is not an issue on Android. *Steps to reproduce:* # Create a Titanium project with the below code. # Build and run to an iOS device. # Notice that the app crashes on startup. # Build and run to the iOS simulator. # The {{isFile()}} and {{isDirectory()}} methods work and are correctly logged. {code:javascript} var file = Ti.Filesystem.getFile("app.js"); Ti.API.info("@@@ app.js isFile(): " + file.isFile()); Ti.API.info("@@@ app.js isDirectory(): " + file.isDirectory()); {code} *Cause:* Our {{TiFileSystemBlobProxy.m}} code is missing the {{isFile()}} and {{isDirectory()}} methods.
1
3,370
TIMOB-26218
07/19/2018 22:21:58
Android: Resolve Veracode string equality warnings
*Summary:* The Veracode scanner has sighted the following string equality/comparison issues in Titanium's Android Java code... ||Class||Line||Description|| |MediaModule.java|729|Member variable {{intentType}} should use {{equals()}} instead of {{==}}| |TiBlob.java|263|Member variable {{mimeType}} should use {{equals()}} instead of {{==}}.| |TiBlob.java|421|Member variable {{mimeType}} should use {{! equals()}} instead of {{!=}}.| |TiCameraActivity.java|413|Member variable {{mediaType}} should use {{equals()}} instead of {{==}}.| |TiCameraActivity.java|682|Member variable {{mediaType}} should use {{equals()}} instead of {{==}}.| Note that there are no bugs in the above code. String reference equality happens to work for the way it's written, but we should change to use {{equals()}} to avoid potential bugs in the future.
1
3,371
TIMOB-26219
07/20/2018 00:53:24
Windows : Implement Ti.UI.WebView.mixedContentMode
Android 5 (21) adds WebSettings.setMixedContentMode to control how mixed content is handled (https that contains inlined http). Need to add access to this. https://developer.android.com/reference/android/webkit/WebSettings#setMixedContentMode(int) Description: Images doesn't load in webview if they are hosted on http server! E.g. if you assign webview url property to https://blogs-dev.vmware.com/vov/authors/ Some images get load properly but some which are hosted on http server or have http://xyz path they are not getting loaded. Test code: {code:xml} <Alloy> <Window class="container"> <WebView id="label" url="https://blogs.vmware.com/vov/authors/"></WebView> </Window> </Alloy> {code} Error Log: {code} [INFO] : I/TiWebChromeClient.console: (main) [111,16675] Mixed Content: The page at 'https://blogs.vmware.com/vov/authors/#' was loaded over HTTPS, but requested an insecure image 'http://blogs.vmware.com/vov/files/2018/02/boney-francis.jpg'. This request has been blocked; the content must be served over HTTPS. (0:https://blogs.vmware.com/vov/authors/#) [INFO] : I/TiWebChromeClient.console: (main) [1,16676] Mixed Content: The page at 'https://blogs.vmware.com/vov/authors/#' was loaded over HTTPS, but requested an insecure image 'http://blogs.vmware.com/vov/files/2018/03/Jerry_Griffin.png'. This request has been blocked; the content must be served over HTTPS. (0:https://blogs.vmware.com/vov/authors/#) [INFO] : I/TiWebChromeClient.console: (main) [0,16676] Mixed Content: The page at 'https://blogs.vmware.com/vov/authors/#' was loaded over HTTPS, but requested an insecure image 'http://blogs.vmware.com/vov/files/2017/11/Bask-Iyer-170x170.jpg'. This request has been blocked; the content must be served over HTTPS. (0:https://blogs.vmware.com/vov/authors/#) [INFO] : I/TiWebChromeClient.console: (main) [1,16677] Mixed Content: The page at 'https://blogs.vmware.com/vov/authors/#' was loaded over HTTPS, but requested an insecure image 'http://blogs.vmware.com/vov/files/2018/05/ankur.jpg'. This request has been blocked; the content must be served over HTTPS. (0:https://blogs.vmware.com/vov/authors/#) [INFO] : I/TiWebChromeClient.console: (main) [1,16678] Mixed Content: The page at 'https://blogs.vmware.com/vov/authors/#' was loaded over HTTPS, but requested an insecure image 'http://blogs.vmware.com/vov/files/2018/03/romy-kaura.png'. This request has been blocked; the content must be served over HTTPS. (0:https://blogs.vmware.com/vov/authors/#) {code} Test Environment: {code} Android 8.0, Android 6.0 Operating System Name = Microsoft Windows 10 Pro Version = 10.0.16299 Architecture = 32bit # CPUs = 4 Memory = 17091956736 Node.js Node.js Version = 8.9.1 npm Version = 5.5.1 Titanium CLI CLI Version = 5.1.0 Titanium SDK SDK Version = 7.1.0.GA, 6.3.0.GA {code} Thanks
1
3,372
TIMOB-26221
07/20/2018 14:24:49
iOS : ScrollView content scrolling vertically in bigger iPads when using percent-based layout
Hello, The customer is using the scrollView with Horizontal layout and adding the required UI elements to a main view and adding it back to the actual scrollview. Even after fixing the height of scrollView equal to that of main view inside it, its still scrolling vertically which is not an expected behaviour. The sample code to replicate the issue in iPAD pro 12.9 inch (2nd generation) and other bigger iPAD's. *Sample code:* {code} var window = Ti.UI.createWindow(); var osname = Ti.Platform.osname; function pixelsToDipUnits(pixels) { if ((osname === 'iphone') || (osname === 'ipad')) { return pixels; } if (Titanium.Platform.displayCaps.dpi > 160) return (pixels / (Titanium.Platform.displayCaps.dpi / 160)); else return pixels; }; Ti.App.PLATFORM_HT = pixelsToDipUnits(Ti.Platform.displayCaps.platformHeight); Ti.App.PLATFORM_WD = pixelsToDipUnits(Ti.Platform.displayCaps.platformWidth); var scrollView = Ti.UI.createScrollView({ height : 0.09 * Ti.App.PLATFORM_HT, top : 8, verticalBounce : false, width : Ti.UI.FILL, layout : 'horizontal', bubbleParent : false, borderColor : 'green', backgroundColor : 'white', scrollType : 'horizontal' }); for (var i = 0; i < 10; i++) { var mainSubView = Ti.UI.createView({ height : 0.09 * Ti.App.PLATFORM_HT, backgroundColor : 'white', width : 0.22 * Ti.App.PLATFORM_WD, borderColor : 'red' }); var subView = Ti.UI.createView({ width : 0.22 * Ti.App.PLATFORM_WD, layout : 'vertical', height : Ti.UI.SIZE, borderColor : 'blue' }); subView.add(Ti.UI.createImageView({ image : '/clock.png', touchEnabled : false, height : Ti.UI.SIZE })); mainSubView.add(subView); scrollView.add(mainSubView); } window.add(scrollView); window.open(); {code} *Test Environment:* Appcelerator Command-Line Interface, version 7.0.4 SDK: 7.2.0.GA, 7.1.1 GA iOS device: iPAD pro 12.9 inch (2nd generation) Thanks
1
3,373
TIMOB-26222
07/20/2018 14:28:50
Android: App crashes when trying to re-open a closed window
When trying to re-open a window previously closed the app crashes. This didn't happen on 7.2.0.GA. As per example above, click the button, close the window then click the button again. {code} var win2 = Ti.UI.createWindow({backgroundColor: 'red'}); var win1 = Ti.UI.createWindow({backgroundColor: 'white'}); var button = Ti.UI.createButton({title: "Click me", color: "#000"}); button.addEventListener('click', function(){ win2.open(); }); win1.add(button); win1.open(); {code} Question is. Which behaviour is the expected behaviour. Not being able to reopen a window, or being able to reopen a window
3
3,374
TIMOB-26224
07/21/2018 04:50:23
Android: Modify "OptionDialog" to display a list of normal buttons
*Summary:* The {{Ti.UI.OptionDialog}} currently displays a vertical list of radio buttons, but none of the radio buttons are ever enabled if property {{selectedIndex}} is not set. This is not a good interface. Especially if the {{buttonNames}} property is not set as well. It would be better to display a vertical list of normal button like how it works on iOS. {code:javascript} var window = Ti.UI.createWindow(); var button = Ti.UI.createButton({ title: "Show Dialog" }); button.addEventListener("click", function(e) { var dialog = Ti.UI.createOptionDialog({ title: "Option Dialog", options: ["Option 1", "Option 2", "Cancel"], cancel: 2, }); dialog.addEventListener("click", function(e) { Ti.API.info("@@@ Dialog 'click' index: " + e.index + ", button: " + e.button + ", cancel: " + e.cancel); }); dialog.show(); }); window.add(button); window.open(); {code} We should only use radio buttons if the {{buttonNames}} property is also set. In which case, tapping a radio button should not automatically close the dialog. Doing it this way, we'll be following Google's material design guideline here... https://material.io/design/components/dialogs.html#usage
3
3,375
TIMOB-26225
07/21/2018 08:41:58
Android: TableView leaks memory when overwriting "data" property
*Summary:* Replacing a {{TableView}}'s "data" array property causes a memory leak where the previous array of rows do not get garbage collected. *Steps to reproduce:* _(Below requires an Android emulator and Chrome web browser to be installed.)_ # Create a "classic" Titanium project with the below code. # Go to the project directory at the command line. # Enter: {{appc ti build -p android --debug-host /127.0.0.1:51388}} # Wait for the app to launch. It'll "hang" on the splash screen. # In the log, copy the the "chrome-devtools://devtools/bundled/inspector.html?..." URL. # Open the Chrome browser and paste the copied URL. # In Chrome, select the "Memory" tab. # Select the "Allocation instrumentation on timeline" radio button. # Click the "Start" button. # Select the "Sources" tab. # Click the "Resume script execution" toolbar button in top-right corner. Looks like: [>] # Wait for the Titanium app to display a TableView. # Click the "Reload" button in the bottom-right corner of the app. # Click the Android back button. # In Chrome, select the "Memory" tab. # In Chrome, top-left corner, click the "Stop recording heap profile" toolbar button. # Under the "Constructor" column, expand the "Label" tree. # Note that 50 Labels are listed under it. These have not been garbage collected. {code:javascript} function createTableData() { var tableData = []; var maxIndex = 50; //var maxIndex = Math.floor(Math.random() * 100) + 1; for (var index = 1; index <= maxIndex; index++) { var row = Ti.UI.createTableViewRow(); row.add(Ti.UI.createLabel({ text: "Row " + index.toString() })); tableData.push(row); } return tableData; } var window = Ti.UI.createWindow({ exitOnClose: false }); var container = Ti.UI.createView({ width: Ti.UI.FILL, height: Ti.UI.FILL, }); var tableView = Ti.UI.createTableView({ data: createTableData(), }); container.add(tableView); var reloadButton = Ti.UI.createButton({ title: "Reload", bottom: "10dp", right: "10dp", }); reloadButton.addEventListener("click", function(e) { Ti.API.info("@@@ Reloading table data."); tableView.data = createTableData(); }); container.add(reloadButton); window.add(container); window.open(); {code} *Notes:* * If a {{TableView}} is garbage collected, then its rows are correctly garbage collected as well. This is only an issue when overwriting the rows via the "data" property. * This is an issue for Alloy since its generated code will replace the {{TableView}} "data" array any time the model changes via a "fetch", "destroy", "change", "add", "remove", or "reset" event.
8
3,376
TIMOB-26227
07/21/2018 11:04:59
Android: Remove kroll-thread
The kroll thread was deprecated in SDK 7 and should be removed in 8. This means that the "tiapp.xml" property "run-on-main-thread" will be ignored and will be internally hard-code to {{true}}.
8
3,377
TIMOB-26228
07/22/2018 14:48:45
Android: Cannot get current activity in native module when using 7.3.0+
I have a module where I want to configure an SDK by passing the current activity to it automatically on app start. We have the {{onCreate}} method via the {{@Kroll.onCreate}} annotation, but neither of the following methods worked there: - {{getActivity()}} (because of the static context) - {{TiApplication.getAppRootOrCurrentActivity()}} errors: {quote} No valid root or current activity found for application instance {quote} - TiApplication.getInstance().getCurrentActivity(): Same as above I also tried invoking them in the constructor of the module but that did not work either. I am trying to prevent a manually {{initialize()}} call from the module, so I am wondering if there is a better approach here.
0
3,378
TIMOB-26235
07/24/2018 19:58:32
Windows : Support KEYBOARD_TYPE_NUMBER_PAD / KEYBOARD_TYPE_NUMBERS_PUNCTUATION
Hello! Can you please let me know how to show numeric keyboard on windows app on textbox or TextField? Titanium.UI.KEYBOARD_TYPE_NUMBERS_PUNCTUATION is only available for Android and iOS. https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI-property-KEYBOARD_TYPE_NUMBERS_PUNCTUATION Thanks
13
3,379
TIMOB-26239
07/26/2018 10:02:38
Android: Window leak in Ti.UI.currentWindow
Steps to reproduce: 1. Create application, put attached files in {{Resources}} 2. Run {{ti build}} with {{--debug-host localhost:8990}} 3. Open {{chrome-devtools://}} link in Chrome 4. Resume script execution, wait for app load 5. In memory tab, press "Take snapshot" 6. In app press "OPEN 2ND WINDOW" 7. In memory tab, press "Take snapshot" 8. In app press "OPEN 3RD WINDOW" 9. In memory tab, press "Take snapshot" 10. In app press back button 11. In memory tab, press "Take snapshot" 12. In app press back button 13. In memory tab, press "Take snapshot" Now you got five snapshots. 1. Select "Snapshot 2" 2. Change "Summary" to "Comparison", put "Window" in "Class filter" 3. Expand "Window", observe one new "Window" instance, remember @id 4. Select "Snapshot 5", put "Window" in "Class filter" 5. Expand "Window", observe three instance of "Window" 6. Select "Window" instance with @id from (3) 7. Observe "Retainers" below
3
3,380
TIMOB-26240
07/27/2018 03:11:09
Android: Remove harmless activity errors/warnings logged on startup
*Summary:* A Titanium 7.3.0 built Android app will log the following messages on startup. {code} [ERROR] : TiApplication: (main) [806,864] No valid root or current activity found for application instance [ERROR] : TiApplication: (main) [3,867] No valid root or current activity found for application instance [ERROR] : TiApplication: (main) [25,892] No valid root or current activity found for application instance [ERROR] : TiApplication: (main) [13,905] No valid root or current activity found for application instance [ERROR] : TiApplication: (main) [4,909] No valid root or current activity found for application instance [ERROR] : TiApplication: (main) [1,910] No valid root or current activity found for application instance [ERROR] : TiApplication: (main) [3,913] No valid root or current activity found for application instance [WARN] : TiAndroid: (main) [2,915] Application instance no longer available. Unable to get current activity. [ERROR] : TiApplication: (main) [1,916] No valid root or current activity found for application instance [WARN] : TiAndroid: (main) [1,917] Application instance no longer available. Unable to get current activity. [WARN] : TiAndroid: (main) [0,917] Application instance no longer available. Unable to get current activity. [ERROR] : TiApplication: (main) [2,919] No valid root or current activity found for application instance [ERROR] : TiApplication: (main) [6,925] No valid root or current activity found for application instance [ERROR] : TiApplication: (main) [1,926] No valid root or current activity found for application instance [ERROR] : TiApplication: (main) [2,928] No valid root or current activity found for application instance [ERROR] : TiApplication: (main) [2,930] No valid root or current activity found for application instance {code} These errors/warnings are actually harmless noise triggered by Titanium when loading its core modules (ie: {{Ti}}, {{Ti.UI}}, {{Ti.Platform}}, etc.) when the Android {{Application}} instance gets created, but before an {{Activity}} has been created. There is no {{Activity}} to fetch at this point in the code and the modules already correctly handle {{null}} and will fetch a valid {{Activity}} later when needed. *Recommended Solution:* It's the responsibility of the caller to handle the null case, not the method. So, remove the {{"Application instance no longer available."}} log message in {{AndroidModule.getCurrentActivity()}} here... https://github.com/appcelerator/titanium_mobile/blob/7_3_X/android/modules/android/src/java/ti/modules/titanium/android/AndroidModule.java#L580 And remove the {{"No valid root or current activity found for application instance"}} log message from {{TiApplication.getRootOrCurrentActivity()}} here... https://github.com/appcelerator/titanium_mobile/blob/7_3_X/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java#L297 *Side Note:* The {{TiApplication.getInstance()}} call can never return {{null}}. The Android {{Application}} class is always the 1st object to be created within the app and is guaranteed to exist for the lifetime of the app. There is no point in doing a {{null}} check on it. Nor do we need to keep a weak reference to it within {{TiApplication}}. A normal strong reference will suffice.
1
3,381
TIMOB-26242
07/27/2018 12:15:23
Android: Change in memory behavior
[~jquick], [~gmathews] I noticed a change in the memory management after the recent changes on it that I think deserves some attention. Until 7.2.0.GA the sample app I have attached had this behavior. 1. Open the application. 2. Click "Remove". 3. Force GC through the Android profiler tool. 4. Click "Add again". The colorized views are successfully added again to the window. After the merge of: https://github.com/appcelerator/titanium_mobile/pull/10174 the same sequence results in a crash (attached in the ticket). That happens because the Views are garbage collected. The same goes with Ti.Map module when AnnotaionProxies are released (that happens when they are removed from the MapView) for example. What bothers me is that this change may cause problems in applications that are relying on keeping the references to proxies in the same context after heavy memory usage (one that can cause the system to garbage collect). And I think if that is the case for Proxies in general we may have that problem in a variety of usages. How do you think we should go about that? Note: I haven't matched the position of the views to be related to the device's screen. I have been testing on Pixel emulator. P.S. We talked with Joshua about that earlier this week and at that moment we had a upcoming changes in the most recent PR for memory management. I have tested today with it and the described change in behavior is still present.
5
3,382
TIMOB-26250
08/02/2018 02:38:40
Android: Allow activity "android:launchMode" attribute to be set in "tiapp.xml"
*Summary:* In Titanium 6.1.0, our build tools ignore the activity "android:launchMode" setting in "tiapp.xml" and log the following build warning. This was to avoid confusion over how Google's "singleTask" feature works and to favor Titanium's "intent-filter-new-task" property instead. {code} [WARN] : android:launchMode should not be used. Ignoring definition from <ActivityName> {code} We should change the behavior to allow developers to set "android:launchMode" again, but keep the build warning. Some developers already know how to deal with the repercussions of the "singleTask" setting where all child activity windows are automatically closed upon app resume. *Test:* # Add the below Android xml settings to your "tiapp.xml" file. # In the XML, change the {{<activity>}} element's "name" attribute's {{<ProjectName>}} part to the name of your Titanium project where only the 1st letter is capitalized. (Ex: "MyProject" would become "Myproject".) # Build the application for Android. # Note the build warning that appears regarding "android:launchMode". *tiapp.xml* {code:xml} <?xml version="1.0" encoding="UTF-8"?> <ti:app xmlns:ti="http://ti.appcelerator.org"> <android xmlns:android="http://schemas.android.com/apk/res/android"> <manifest> <application> <activity android:name=".<ProjectName>Activity" android:launchMode="singleTask"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application> </manifest> </android> </ti:app> {code}
1
3,383
TIMOB-26251
08/02/2018 11:57:46
Android: TableView with remote image crash
Moved from TIMOB-26225 into separate issue. Test app: {code:javascript} var image = "https://raw.githubusercontent.com/appcelerator/titanium_mobile/" + "master/.github/logo-titanium.png"; function createTableData() { var tableData = []; var maxIndex = 50; //var maxIndex = Math.floor(Math.random() * 100) + 1; for (var index = 1; index <= maxIndex; index++) { var row = Ti.UI.createTableViewRow(); var view = Ti.UI.createView({ width: Ti.UI.FILL, height: Ti.UI.SIZE, backgroundColor: '#555' }); var url = [image, '?time=', Date.now(), '_', index].join(''); view.add(Ti.UI.createImageView({ width: 20, height: 20, defaultImage: image, image: url })); row.add(view); tableData.push(row); } return tableData; } var window = Ti.UI.createWindow({ exitOnClose: false }); var container = Ti.UI.createView({ width: Ti.UI.FILL, height: Ti.UI.FILL, }); var tableView = Ti.UI.createTableView({ data: createTableData(), }); container.add(tableView); var reloadButton = Ti.UI.createButton({ title: "Reload", bottom: "10dp", right: "10dp", }); reloadButton.addEventListener("click", function(e) { Ti.API.info("@@@ Reloading table data."); tableView.data = createTableData(); }); container.add(reloadButton); window.add(container); window.open(); {code} Steps to reproduce: 1. Build app with {{<property name="run-on-main-thread" type="bool">*false*</property>}}) 2. Run app 3. Double click on "Reload" button [Explanation|https://jira.appcelerator.org/browse/TIMOB-26225?focusedCommentId=439536&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-439536] Affects any build with [TIMOB-26202] changes. refs [TIMOB-26225], [TIMOB-26202]
1
3,384
TIMOB-26253
08/03/2018 01:45:55
Android: NotificationManager.notify() will crash while screen is off and if app is missing WAKE_LOCK permission
*Summary:* As of Titanium 6.2.0, posting a local notification while the screen is off will cause the app to crash if the app does not have the {{WAKE_LOCK}} permission. Titanium should not require the {{WAKE_LOCK}} permission. *Steps to reproduce:* # Connect an Android device to your machine. # Turn the Android device's screen off. # Build and run the below code on that Android device. # View the log and notice an exception was printed on startup. # Turn on the device's screen and view the app. Notice an exception dialog was displayed. {code:javascript} Ti.Android.NotificationManager.notify(123, Ti.Android.createNotification({ contentTitle: "Titanium Notification", contentText: "Content Text", contentIntent: Ti.Android.createPendingIntent({ intent: Ti.App.Android.launchIntent, }), })); {code} *Result:* The following exception gets logged... {code} [ERROR] : TiExceptionHandler: Error: Neither user 10256 nor current process has android.permission.WAKE_LOCK. [ERROR] : TiExceptionHandler: at /ActivitySingleTaskTest.js:29:32 [ERROR] : TiExceptionHandler: at Module._runScript (ti:/module.js:613:9) [ERROR] : TiExceptionHandler: at Module.load (ti:/module.js:105:7) [ERROR] : TiExceptionHandler: at Module.loadJavascriptText (ti:/module.js:457:9) [ERROR] : TiExceptionHandler: at Module.loadAsFile (ti:/module.js:512:15) [ERROR] : TiExceptionHandler: at Module.loadAsFileOrDirectory (ti:/module.js:429:20) [ERROR] : TiExceptionHandler: at Module.require (ti:/module.js:296:17) [ERROR] : TiExceptionHandler: at require (ti:/module.js:570:15) [ERROR] : TiExceptionHandler: at /app.js:7:1 [ERROR] : TiExceptionHandler: at Module._runScript (ti:/module.js:596:17) [ERROR] : TiExceptionHandler: [ERROR] : TiExceptionHandler: android.os.Parcel.readException(Parcel.java:1942) [ERROR] : TiExceptionHandler: android.os.Parcel.readException(Parcel.java:1888) [ERROR] : TiExceptionHandler: android.os.IPowerManager$Stub$Proxy.acquireWakeLock(IPowerManager.java:405) [ERROR] : TiExceptionHandler: android.os.PowerManager$WakeLock.acquireLocked(PowerManager.java:1342) [ERROR] : TiExceptionHandler: android.os.PowerManager$WakeLock.acquire(PowerManager.java:1326) [ERROR] : TiExceptionHandler: ti.modules.titanium.android.notificationmanager.NotificationManagerModule.notify(NotificationManagerModule.java:159) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:184) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollRuntime.runModule(KrollRuntime.java:247) [ERROR] : TiExceptionHandler: org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:135) [{code} *Expected Result:* App should not require the {{WAKE_LOCK}} permission. Java code should check if app has {{WAKE_LOCK}} before attempting to use it. If the permission is missing, then avoid it and do not turn on the screen. Note that many Android users tend to avoid apps that use the {{WAKE_LOCK}} permission since they're considered to waste battery life. This permission is a dirty word in the Android world and is best avoided if possible. *Cause:* This is an issue in Titanium's Java {{NotificationManagerModule.notify()}} method... [NotificationManagerModule.java#L137|https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/android/src/java/ti/modules/titanium/android/notificationmanager/NotificationManagerModule.java#L137] The solution is to do the following: * Check if {{WAKE_LOCK}} permission is defined in "AndroidManifest.xml" via the {{Context}} class before creating a wake lock. * {{catch}} block should catch the {{Exception}} type to catch all exception.
3
3,385
TIMOB-26267
08/04/2018 15:20:45
LiveView: Calling "liveview server stop" causes exception, but stops connections
When using {{liveview server stop}} to stop all connections, the following error occurs: {code} [LiveView] Closing file/event server process id: 39542 [LiveView] Error closing server { Error: kill ESRCH at Object._errnoException (util.js:992:11) at process.kill (internal/process.js:183:18) at /Users/hknoechel/Documents/dev/liveview/lib/fserver.js:97:12 at Array.forEach (<anonymous>) at Object.FServer.stop (/Users/hknoechel/Documents/dev/liveview/lib/fserver.js:92:7) at Object.<anonymous> (/Users/hknoechel/Documents/dev/liveview/bin/liveview-server:45:25) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) code: 'ESRCH', errno: 'ESRCH', syscall: 'kill' } {code} It seems to error out, but after checking with {{liveview server status}}, they have been killed properly.
1
3,386
TIMOB-26268
08/05/2018 20:50:46
iOS: Make RefreshControl on ScrollView available on iOS < 10
Currently, we only support the {{refreshControl}} property on the Ti.UI.ScrollView for iOS 10+. We can support it for earlier versions as well: {code:js} var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); var nav = Ti.UI.iOS.createNavigationWindow({ window: win }); var refreshControl = Ti.UI.createRefreshControl(); refreshControl.addEventListener('refreshstart', function () { setTimeout(function () { refreshControl.endRefreshing(); }, 2000); }); var scrollView = Ti.UI.createScrollView({ refreshControl: refreshControl, layout: 'vertical' }); scrollView.add([ Ti.UI.createView({ top: 30, width: 300, height: 100, backgroundColor: 'red'}), Ti.UI.createView({ top: 30, width: 300, height: 100, backgroundColor: 'red'}), Ti.UI.createView({ top: 30, width: 300, height: 100, backgroundColor: 'red'}), Ti.UI.createView({ top: 30, width: 300, height: 100, backgroundColor: 'red'}), Ti.UI.createView({ top: 30, width: 300, height: 100, backgroundColor: 'red'}), Ti.UI.createView({ top: 30, width: 300, height: 100, backgroundColor: 'red'}), Ti.UI.createView({ top: 30, width: 300, height: 100, backgroundColor: 'red'}), Ti.UI.createView({ top: 30, width: 300, height: 100, backgroundColor: 'red'}), Ti.UI.createView({ top: 30, width: 300, height: 100, backgroundColor: 'red'}), Ti.UI.createView({ height: 30 }), ]) win.add(scrollView); nav.open(); {code}
0
3,387
TIMOB-26269
08/05/2018 23:25:19
Android: Closing parent window closes current window as well
I am running into a strange situation in which the current window is closed when i call {{close()}} on the parent window. Is there a workaround for this? It works fine on iOS and is a common pattern for login/logout scenarios.
1
3,388
TIMOB-26270
08/06/2018 09:36:29
Android: Cannot build anymore, "ti info" broken
Our Android setup is broken. Since the latest Android Studio update, I cannot see any emulators anymore and "ti info" is giving the following: {code} NOTE: The following Android information has been determined using deprecated detection logic. To display more accurate information, install and select a Titanium SDK 3.2 or newer. Android SDK Android Executable = /opt/android-sdk/tools/android SDK Path = /opt/android-sdk Android NDK NDK Path = not found NDK Version = not found Android Platforms None Android Add-Ons None Android AVDs None Issues No issues detected! Your development environment should be working perfectly! {code} Not only is the note about "upgrading to Ti SDK 3.2" incorrect, outdated and confusing, but also the CLI thinks there are no issues although obviously no Android platform can be detected properly.
0
3,389
TIMOB-26274
08/07/2018 21:02:46
Android: Drawer hamburger menu disappears on click
While trying to get a reproducible case for memory-issues, I found another issue where when clicking the hamburger menu of a drawer layout will hide it and does not make it come back. Test-Case: {code:js} var window = Ti.UI.createWindow({ backgroundColor: 'white', theme: 'Theme.AppCompat.NoTitleBar', exitOnClose: false }); var btn = Ti.UI.createButton({ title: 'Trigger' }); btn.addEventListener('click', function() { var window2 = Ti.UI.createWindow({ title: 'Test' }); var left = Ti.UI.createView({ backgroundColor: 'red' }); var center = Ti.UI.createView({ backgroundColor: 'blue' }); var button2 = Ti.UI.createButton({ title: 'Close'}); left.add(button2); button2.addEventListener('click', function () { drawer.closeLeft(); window.open(); window2.close(); }) var drawer = Ti.UI.Android.createDrawerLayout({ centerView: center, leftView: left }); window2.add(drawer); window2.open(); window.close(); }); window.add(btn); window.open(); {code} *Work-Around:* The solution is to set up the hamburger button on the ActionBar yourself like this... {code:java} window.addEventListener("open", function(e) { var actionBar = window.activity.actionBar; if (actionBar) { actionBar.displayHomeAsUp = true; actionBar.homeButtonEnabled = true; actionBar.onHomeIconItemSelected = function(e) { // Handle the hamburger button click here... }; } }); {code} We document this here... https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Android.ActionBar
3
3,390
TIMOB-26275
08/08/2018 12:27:00
TypeScript: Update Titanium typings to 7.3.0
The TypeScript typings for Titanium need to be updated for our latest SDK release 7.3.0
3
3,391
TIMOB-26278
08/09/2018 10:54:37
Android: Added Ti.App event "userinteraction"
In order to create a solution for https://jira.appcelerator.org/browse/TIMOB-13884, we're trying to capture all user interaction events. The Android Activity has the onUserInteraction() method. The Activity has to throw events each time the onUserInteraction() is triggered. https://developer.android.com/reference/android/app/Activity#onUserInteraction()
2
3,392
TIMOB-26279
08/09/2018 16:52:53
ES6 transpile not working
Created a new app, added Transpile option to tiapp.xml and some sample ES6 code and when building I get: {code} [ERROR] Error generating AST for "/Users/jkneen/Documents/Appcelerator_Studio_Workspace/es6/app/controllers/index.js" [ERROR] Unexpected token: name (i) [ERROR] line 7, column 4, position 71 [ERROR] Alloy compiler failed {code} Project: https://www.dropbox.com/s/7e467yjzg4a8m1o/es6.zip?dl=1
0
3,393
TIMOB-26286
08/10/2018 14:05:58
Android: Using __dirname in app.js errors with Can't find variable: __dirname
h5.Description *This is not a regression occurs using 5.5.1.GA stack* When using {{__dirname}} in an app.js file the following is thrown *Using __dirname in any file other than app.js works* {code} [ERROR] : Application Error: { [ERROR] : "line": 2, [ERROR] : "column": 10, [ERROR] : "message": "require: Error while require(/app) Can't find variable: __dirname", [ERROR] : "native_stack": [ [ERROR] : "JSExportClass<class Titanium::GlobalObject>::CallNamedFunction" [ERROR] : ] [ERROR] : } {code} h5.Steps to reproduce # In your app.js add {{console.log(__dirname)}} # Build for Android h5.Actual result The above error is thrown h5.Expected result __dirname should be able to be used in app.js file
0
3,394
TIMOB-26293
08/12/2018 16:35:05
Android: node-titanium-sdk 0.6.0 doesn't wait for Genymotion cold boot in 7_3_X
The 7_3_X branch was bumped to version 0.6.0 of the node-titanium-sdk. When using that branch to boot a Genymotion emulator (v2.12.0) the first run isn't working anymore. A second run with a running emulator does properly boot an Android app. Expected behaviour: --- {code} [INFO] Launching emulator: emu-galaxy-s7 [TRACE] Starting emulator: emu-galaxy-s7 [TRACE] Checking if emulator emu-galaxy-s7 is running... [TRACE] Detecting if emu-galaxy-s7 exists... [TRACE] Found 2 emulators [TRACE] Emulator exists, detecting all running emulators and connected devices... [TRACE] Detected 0 running emulators and connected devices [TRACE] Emulator not running, detecting emulator info [TRACE] Found 2 emulators [TRACE] Starting the emulator... [INFO] Running: /Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS/player --vm-name "emu-galaxy-s7" [TRACE] Emulator is starting, monitoring boot state... [TRACE] Checking the boot state for the next 240000 ms [TRACE] Waiting for emulator to register with ADB [TRACE] Emulator process started ........ [TRACE] Found 1 devices, checking if any of them are the emulator... [TRACE] Emulator is running! [TRACE] Checking if boot animation has finished... [TRACE] Emulator is not booted yet; checking again in 2000 ms [TRACE] Emulator is not booted yet; checking again in 2000 ms [TRACE] Emulator is not booted yet; checking again in 2000 ms [TRACE] Emulator is booted, emitting booted event [INFO] Emulator is booted [INFO] SD card not required, skipping mount check [INFO] Emulator ready! {code} --- Current behaviour using (7.3.0.v20180809095942): --- {code} [INFO] Launching emulator: emu-galaxy-s7 [TRACE] Starting emulator: emu-galaxy-s7 [TRACE] Checking if emulator emu-galaxy-s7 is running... [TRACE] Detecting if emu-galaxy-s7 exists... [TRACE] Found 2 emulators [TRACE] Emulator exists, detecting all running emulators and connected devices... [TRACE] Detected 0 running emulators and connected devices [TRACE] Emulator not running, detecting emulator info [TRACE] Found 2 emulators [TRACE] Starting the emulator... [INFO] Running: /Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS/player --vm-name "emu-galaxy-s7" /Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/lib/emulators/genymotion.js:41 return finished(null, cache); ^ TypeError: Cannot set property 'child' of undefined at /Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/lib/emulators/genymotion.js:531:26 at Object.detect (/Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/lib/emulators/genymotion.js:41:10) at Object.start (/Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/lib/emulators/genymotion.js:500:10) at EmulatorManager.<anonymous> (/Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/lib/emulator.js:417:11) at /Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/lib/emulator.js:110:4 at Object.detect (/Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/lib/android.js:77:10) at EmulatorManager.<anonymous> (/Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/lib/emulator.js:85:11) at /Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/node_modules/async/dist/async.js:3888:9 at /Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/node_modules/async/dist/async.js:473:16 at iteratorCallback (/Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/node_modules/async/dist/async.js:1064:13) --------------------------------------------- at Socket.Readable.on (_stream_readable.js:772:35) at Connection.exec (/Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/lib/adb.js:135:9) at ADB.devices (/Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/lib/adb.js:438:23) at EmulatorManager.<anonymous> (/Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/lib/emulator.js:145:7) at /Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/lib/emulator.js:110:4 at Object.detect (/Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/lib/android.js:77:10) at EmulatorManager.<anonymous> (/Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/lib/emulator.js:85:11) at /Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/node_modules/async/dist/async.js:3888:9 at /Users/jvandijk/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.v20180809095942/node_modules/node-titanium-sdk/node_modules/async/dist/async.js:473:16 {code} ---
1
3,395
TIMOB-26295
08/13/2018 18:47:30
Android: Listview with template causes a nullpointer on itemclick
When you click on a listitem, using a Listview with template, it causes a nullpointer. It happens when you try to manipulate the items of a section. *Test case:* *index.xml* {code:java} <Alloy> <Window id="win"> <ListView id="listView" backgroundColor="#fff"> <Templates> <ItemTemplate name="menuItem"> <View bindId="item" height="50" backgroundColor="#24292e" color="#fff" onClick="onMenuItemClick"> <Label bindId="name" color="#fff"></Label> </View> </ItemTemplate> </Templates> <ListSection /> </ListView> </Window> </Alloy> {code} ------------------- *index.js* {code:java} function onMenuItemClick(e) { $.listView.sections[0].items = []; } var menuItems = []; menuItems.push({ name: { text: "A" }, template: 'menuItem' }, { name: { text: 'B' }, template: 'menuItem' }, { name: { text: "C" }, template: 'menuItem' }, { name: { text: "D" }, template: 'menuItem' }); $.listView.sections[0].items = menuItems; $.win.open(); {code}
1
3,396
TIMOB-26298
08/14/2018 10:06:04
Android 9: Cannot launch Emulator with API-level 28
When trying to boot an Android emulator with API-level 28 (Android 9), the build fails with the following error: {code} [ERROR] Emulator exited with error: 1 [ERROR] PANIC: Missing emulator engine program for 'x86' CPU. {code} As a workaround, the emulator can be booted before and it works: {code} cd /path/to/android-sdk cd emulator ./emulator -list-avds ./emulator -avd ID_OF_YOUR_EMULATOR {code}
1
3,397
TIMOB-26299
08/14/2018 12:17:49
iOS: Ti.Media.AudioPlayer test-suite crashes in some situations
It seems like our Ti.Media.AudioPlayer test-suite crashes in some situations. The crash report is attached and looks like being an issue with the KVO-observer we use to handle the AVPlayer API. I remember we had some issue with closing the audio-player and still listening to the KVO, so this may be similar.
0
3,398
TIMOB-26306
08/15/2018 05:01:37
Android: Support faster SDK builds with parallel execution '-j' on Windows
When building the Titanium SDK (ie: titanium_mobile) on Mac, the Android NDK will build the C/C++ library with the {{-j8}} command line argument. This enables "parallel execution" of up to 8 build tools to be ran in parallel, allowing for faster build times. On Windows, this feature is purposely disabled due to file locking errors caused by dependency order and code generation issues in the make file. These issues should be resolved for faster build times on Windows.
13
3,399
TIMOB-26307
08/16/2018 08:06:45
iOS (webView): text remains hidden behind the keyboard in iPad(landscape mode) when writing into text area within the webview.
*Issue description:* I am opening the following URL in the webView. When I write into text area within the webView, the writing goes back under the keyboard. https://lite.educode.ca/nativeexercise/59ef7ee6dfae4e3ea58b4d36/91ae5c31-254a-433b-a736-0a002b998829 This happens on iPad in landscape mode, doesn't happen in portrait mode. *Steps to reproduce:* 1. Run the test code, webview will show the webpage. 2. Set the orientation to landscape. 3. In the editor area you can keep pressing enter and go on line 31 or more and write any text there you will find text going under the keyboard *Test code:* {code} var win1 = Titanium.UI.createWindow({ }); var webview = Titanium.UI.createWebView({ url: 'https://lite.educode.ca/nativeexercise/59ef7ee6dfae4e3ea58b4d36/91ae5c31-254a-433b-a736-0a002b998829', }); win1.add(webview); win1.open(); {code}
1
3,400
TIMOB-26308
08/16/2018 14:33:28
Reduce splash screen image sizes
The current splash screen images are pretty big (in terms of kb's). They can be compressed without loosing quality
0
3,401
TIMOB-26310
08/16/2018 19:28:37
iOS: Crash on iOS 12 Beta
Taken from [this Slack thread|https://ti-slack.slack.com/archives/C03CVQX2A/p1534443895000100]: We are trying to run app on iOS 12.0 Beta Version App crashes with Following Error Logs. Can Anyone direct me what is causing app to Crash. {code} App_Test 0x00000001007c5468 -[KrollEval jsInvokeInContext:exception:] (KrollContext.m:643) App_Test 0x00000001007c23fc -[KrollBridge loadCommonJSModule:withSourceURL:] (KrollBridge.m:734) App_Test 0x00000001007c2ec4 -[KrollBridge loadJavascriptText:fromFile:withContext:] (KrollBridge.m:922) App_Test 0x00000001007c3124 -[KrollBridge loadAsFile:withContext:] (KrollBridge.m:986) App_Test 0x00000001007c3338 -[KrollBridge loadAsFileOrDirectory:withContext:] (KrollBridge.m:1055) App_Test 0x00000001007c38d4 -[KrollBridge require:path:] (KrollBridge.m:1167) App_Test 0x00000001007c68b4 CommonJSRequireCallback (KrollContext.m:249) App_Test 0x00000001e6e3a1d8 0x00000001e6daf000 + 569816 {code}
1
3,402
TIMOB-26311
08/16/2018 20:08:17
Windows: leverage extended execution restricted capabilities
Hello, One a Windows App with Appcelerator which calls an asynchronous function on a .NET Core SDK which downloads extensive amounts of data and saves it directly on the App's AppData however, as per limitations from Windows 10, the App must be in the foreground for the whole execution. This creates a problem because if the App gets minimized or it is unfocused while on FullScreenMode, this call will fail. There exists a few restricted capabilities in UWP that may help with this and I wanted to reach out whether these are supported on Ti SDK 7.3 for Windows 10 or whether there's a way to do this within the Titanium SDK. The customer have tried adding {code}``` <Capabilities> ... <Capability Name="extendedBackgroundTaskTime" /> <Capability Name="extendedExecutionUnconstrained" /> </Capabilities> ``` {code} On the tiapp.xml file however, in the vsbuild folder's manifest these were removed. They also tried prefixing the Capability element with rescap but it failed to compile. Please let us know if you need any more information. Thanks
8
3,403
TIMOB-26314
08/16/2018 21:06:30
Android: Add "versionCode" to tiapp.xml template
Currently the default tiapp.xml doesn't include the versionName or versionCode in the manifest. It will always use versionNumber 1 and versionCode 1 in the AndroidManifest. This will lead to an error when a user uploads an update to the playstore and has to search the documentation or internet to find out where to make these settings. Adding the versionNumber to the tiapp.xml will give the user a place to start. And by using the <version> number inside the versionName it will automatically stay in sync with the iOS version. Advanced users can still overwrite the versionName with a custom name like before by adding the parameter to tiapp.xml Scenario: * android:versionCode is exposed in the <manifest> block * user creates an update and can increase the version code * AndroidManifest will use the versionCode from the <manifest> block and the <version> * if a user wants to have a different version number he can add android:versionName to the tiapp.xml (like he would do it today or already has) and it will overwrite the <version> string inside the AndroidManifest Existing apps with a custom android:versionCode and android:versionName would still use those values. New apps will use the new android:versionCode from <manifest> and the normal <version> number as android:versionName
3
3,404
TIMOB-26313
08/17/2018 13:30:32
iOS: accessibilityLabel doesn't get properly set on Ti.UI.TableView
While working through our Appium suite, I noticed that tests that relied on using the accessibility id/label for a table view ere failing. Using the Appium Desktop inspector, I see that the table view has no accessibility id assigned, though the code has set an accessibilityLabel. I assume this is because the view gets attached async, so the code here does not attempt to set it: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiViewProxy.m#L2856-L2863
2
3,405
TIMOB-26315
08/18/2018 09:28:14
Android: Support touch feedback on backgroundImage, backgroundGradient, and transparent backgrounds
*Summary:* A {{Ti.UI.View}} object's {{touchFeedback}} and {{touchFeedbackColor}} properties will only show a touch/tap ripple animation if you set the view's {{backgroundColor}} property to a non-transparent color. This is a documented limitation. https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-touchFeedback https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-touchFeedbackColor We should add touch feedback to the following as well: * {{backgroundImage}} property (only apply ripple to non-transparent part) * {{backgroundGradient}} property (only apply ripple to non-transparent part) * No background (ripple applied to entire transparent background) *Use-Case:* This is needed for developers who want to show buttons with custom image backgrounds. {code:javascript} var window = Ti.UI.createWindow(); var button = Ti.UI.createButton({ title: "Tap Me", backgroundImage: "android.resource://android/drawable/panel_picture_frame_bg_focus_blue", touchFeedbackColor: "yellow", touchFeedback: true, }); button.addEventListener("click", function() { Ti.API.info("### Button was clicked on."); }); window.add(button); window.open(); {code} *Note:* The touch feedback feature only works on Android 5.0 and newer OS versions.
8
3,406
TIMOB-26318
08/18/2018 14:03:05
Hyperloop: iOS - TiApp Utility Class methods throw selector-error
When attempting to register a UIApplicationDelegate instance through hyperloop the following exception is thrown: {noformat} [ERROR] : can't find selector registerApplicationDelegate for <TiApp: 0x7fe5699036b0> [ERROR] : -[HyperloopPointer registerApplicationDelegate]: unrecognized selector sent to instance 0x60c00009c520 [ERROR] : Script Error { [ERROR] : column = 26; [ERROR] : description = "-[HyperloopPointer registerApplicationDelegate]: unrecognized selector sent to instance 0x60c00009c520"; [ERROR] : line = 128; [ERROR] : message = "-[HyperloopPointer registerApplicationDelegate]: unrecognized selector sent to instance 0x60c00009c520"; [ERROR] : name = NSInvalidArgumentException; [ERROR] : nativeStack = "1 libobjc.A.dylib 0x0000000114af1031 objc_exception_throw + 48\n2 CoreFoundation 0x0000000115beb784 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132\n3 Hyperloop Test 0x000000010d1ab106 +[HyperloopUtils invokeSelector:args:target:instance:] + 4646\n4 Hyperloop Test 0x000000010d19f1a1 Dispatch + 1489\n5 JavaScriptCore 0x000000010d5a0b63 _ZN3JSC19APICallbackFunction4callINS_18JSCallbackFunctionEEExPNS_9ExecStateE + 595\n6 ??? 0x000002c074094034 0x0 + 3025603739700\n7 JavaScriptCore 0x000000010d567d00 llint_entry + 29438\n8 JavaScriptCore 0x000000010d567d00 llint_entry + 29438\n9 JavaScriptCore 0x000000010d56081a vmEntryToJavaScript + 304\n10 JavaScriptCore 0x000000010da41d43 _ZN3JSC7JITCode7executeEPNS_2VMEPNS_14ProtoCallFrameE + 147\n11 JavaScriptCore 0x000000010d9fd617 _ZN3JSC11Interpreter14executeProgramERKNS_10SourceCodeEPNS_9ExecStateEPNS_8JSObjectE + 12343\n12 JavaScriptCore 0x000000010dc442c4 _ZN3JSC8evaluateEPNS_9ExecStateERKNS_10SourceCodeENS_7JSValueERN3WTF8NakedPtrINS_9ExceptionEEE + 308\n13 JavaScriptCore 0x000000010d59fec2 JSEvaluateScript + 482\n14 Hyperloop Test 0x000000010cece121 -[KrollBridge evalFileOnThread:context:] + 1281\n15 Hyperloop Test 0x000000010ced3f0c -[KrollInvocation invoke:] + 124\n16 Hyperloop Test 0x000000010ced53df -[KrollContext invoke:] + 159\n17 Hyperloop Test 0x000000010ced5775 -[KrollContext invokeOnThread:method:withObject:callback:selector:] + 165\n18 Hyperloop Test 0x000000010cece293 -[KrollBridge evalFile:callback:selector:] + 115\n19 Hyperloop Test 0x000000010cecf105 -[KrollBridge didStartNewContext:] + 2565\n20 Hyperloop Test 0x000000010ced605b -[KrollContext main] + 1819\n21 Hyperloop Test 0x000000010ced51b6 __21-[KrollContext start]_block_invoke + 38\n22 libdispatch.dylib 0x0000000116da86cb _dispatch_call_block_and_release + 12\n23 libdispatch.dylib 0x0000000116da9709 _dispatch_client_callout + 8\n24 libdispatch.dylib 0x0000000116db3708 _dispatch_main_queue_callback_4CF + 1279\n25 CoreFoundation 0x0000000115b2cc99 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9\n26 CoreFoundation 0x0000000115af0ea6 __CFRunLoopRun + 2342\n27 CoreFoundation 0x0000000115af030b CFRunLoopRunSpecific + 635\n28 GraphicsServices 0x0000000118ad4a73 GSEventRunModal + 62\n29 UIKit 0x000000010f7dd057 UIApplicationMain + 159\n30 Hyperloop Test 0x000000010cebae04 main + 100\n31 libdyld.dylib 0x0000000116e1e955 start + 1\n32 ??? 0x0000000000000001 0x0 + 1"; [ERROR] : sourceURL = "file:///Users/richard/Library/Developer/CoreSimulator/Devices/21CF36EB-29EB-4B54-980E-5E6B514B4869/data/Containers/Bundle/Application/EEC17584-4B00-4E92-A39A-8F5E8DDECBCC/Hyperloop%20Test.app/hyperloop/titanium/tiapp.js"; [ERROR] : stack = " at dispatch@[native code]\n at value@file:///Users/richard/Library/Developer/CoreSimulator/Devices/21CF36EB-29EB-4B54-980E-5E6B514B4869/data/Containers/Bundle/Application/EEC17584-4B00-4E92-A39A-8F5E8DDECBCC/Hyperloop%20Test.app/hyperloop/titanium/tiapp.js:128:26)\n at global code@file:///Users/richard/Library/Developer/CoreSimulator/Devices/21CF36EB-29EB-4B54-980E-5E6B514B4869/data/Containers/Bundle/Application/EEC17584-4B00-4E92-A39A-8F5E8DDECBCC/Hyperloop%20Test.app/app.js:31:40)"; [ERROR] : } {noformat} I'm providing an example project where I've copied and pasted the example code from Titanium's wiki
2
3,407
TIMOB-26320
08/20/2018 12:29:15
Xcode 10: Cannot build native modules in Xcode IDE when using new build-system (default)
Related to TIMOB-26109, Xcode cannot find the header-source-paths used before (e.g. {{#import "TiApp.h"}}) from {{~/Library/Application Support/Titanium/mobilesdk/osx/7.3.0.GA/iphone/include/}} anymore. While building the module works fine, building the library from Xcode, for example to debug the development process, does not work anymore. The radar is [rdar://40906817|http://www.openradar.me/40906817] and it's still open after 2 months of iOS 12 / Xcode 10 Beta testing. For our current module architecture, this is fundamental. For our new Swift support and framework-based modules, this will not be an issue anymore, but all existing modules will still be affected by it. As a workaround, the developer can go to {{File > Project Settings}} and select the "Legacy Build System" which does not has this issue.
2
3,408
TIMOB-26325
08/20/2018 22:20:29
Android: Ti.UI.WebView not firing events in 7.x
Setting custom UserAgent for WebView (Android) causes WebView to not fire events (ex. load, beforeLoad and etc.).Using default UserAgent - expected behaviour, events firing.
5
3,409
TIMOB-26330
08/22/2018 19:50:33
Android: WebView does not load when Custom Useragent is set
h5. Steps to reproduce: 1.Use the code below in app.js {code} var win = Ti.UI.createWindow({ backgroundColor : 'black', layout : 'vertical' }); var webview = Titanium.UI.createWebView({url:'https://www.appcelerator.com'}); webview.setUserAgent('test'); webview.addEventListener('beforeload', function(e){ Ti.API.info("beforeload = e.url=" + e.url); }); webview.addEventListener('load', function(e){ Ti.API.info("load = e.url=" + e.url); Ti.API.info("userAgent = agent=" + e.userAgent); }); win.add(webview); win.open(); {code} h5. Actual results: 1.The web view does not load h5.Expected results: 1.Web VIiew should load successfully
0
3,410
TIMOB-26331
08/23/2018 04:21:45
Windows: Improve build/launch time via Titanium CLI
Building/launching apps via CLI is much slower than Visual Studio. I suspect, Titanium Windows CLI is slower because we usually launch external tools (.exe) in order to get information/build/launch projects and then read/parse standard outputs/errors to get the results. I would expect Visual Studio doesn't do such a thing but uses public/private API to deal with them such as MSBuild API.
13
3,411
TIMOB-26333
08/23/2018 18:52:40
Generate source maps for transpiled code
- Currently, we do not generate any source maps for transpiled JS code. Babel can produce a source map that can be used when debugging with Inspector.
5
3,412
TIMOB-26336
08/24/2018 10:25:27
Android: Cursor issue when textfield inside view, which is under tableview
h6.Reproduce 1.Run the following code in an Alloy project. (Simple structure, textfield is under view, and view is under tableviewRow). 2.Click different Rows (basically card type in the example). 3 There will be a textfield to input. 4.Try #2 and #3 serval times. h6.Problem 5. You will see, some times, there is no cursor display in textfield. 6. The other problem is, some times, if you click the textfield, which is focused already. The cursor will disappear. h6.Note Mainly code about focus and cursor is around line 471 - 478 in index.js file
3
3,413
TIMOB-26340
08/28/2018 16:04:46
Android: Update V8 runtime to 7.0.276.42
As an ongoing effort, each major revision of the SDK should target the latest stable branch tip. For 8.0.0 we should target roughly V8 6.9. We can track the stable versions here: https://omahaproxy.appspot.com The release cycle for V8 is ~6 weeks. Currently V8 stable is 6.8.x, 6.9.x is beta. It's anticipated that at least 6.9.x will become stable by the 8.0.0 timeframe.
13
3,414
TIMOB-26341
08/28/2018 23:08:51
iOS: Remove Ti.UI.ButtonBar "index" property
*Summary:* The {{Ti.UI.ButtonBar}} is a row of buttons on does not display a "selection" state when a button is tapped like {{Ti.UI.TabbedBar}}. Because of this, the {{Ti.UI.ButtonBar}} "index" property should be removed since it isn't relevant. *Issue 1:* Setting the "index" property should not put a button in the "selected" state. # Run the below code on iOS. # Note that the middle button "Two" is selected. (See attached "Screenshot.png".) # Tap on the middle button. # Notice the selection state is removed. # Tap on the left button. # Notice the left button is not selected. (It shouldn't be selected.) *Issue 2:* Fetching the value of property "index" always returns -1 unless fetched during the "click" event # Run the below code on iOS. # Tap on the right-most button. # Notice the 1st logged message "(1) buttonBar.index: 2" has the correct index. # Notice the 2nd message "(2) buttonBar.index: -1" has the incorrect index. In this case, it would be better to use the "click" event's "index" property. {code:javascript} var window = Ti.UI.createWindow(); var buttonBar = Ti.UI.createButtonBar({ labels: ["One", "Two", "Three"], index: 1, }); buttonBar.addEventListener("click", function(e) { Ti.API.info("@@@ (1) buttonBar.index: " + buttonBar.index); setTimeout(function() { Ti.API.info("@@@ (2) buttonBar.index: " + buttonBar.index); }, 10); }); window.add(buttonBar); window.open(); {code} *Recommended Solution:* Remove the "index" property. It is not appropriate for this type of UI control. It would be better to use the "click" event's "index" property to identify which button was clicked on. *Note:* I think the "index" property exists for this UI control because it shares the same Objective-C code as {{Ti.UI.TabbedBar}}. An "index" property makes sense for {{TabbedBar}} since it has a selection state. This issue is being raised since we want to add {{ButtonBar}} to Android and Windows and we don't think the "index" property will make sense on those platforms either.
3
3,415
TIMOB-26342
08/29/2018 09:18:43
iOS 12: App crashes in certain Ti.Database / Promises operations
(Via Slack community) The developer is trying to run app on iOS 12.0 Beta and it crashes with the following error logs: {code} App_Test 0x00000001007c5468 -[KrollEval jsInvokeInContext:exception:] (KrollContext.m:643) App_Test 0x00000001007c23fc -[KrollBridge loadCommonJSModule:withSourceURL:] (KrollBridge.m:734) App_Test 0x00000001007c2ec4 -[KrollBridge loadJavascriptText:fromFile:withContext:] (KrollBridge.m:922) App_Test 0x00000001007c3124 -[KrollBridge loadAsFile:withContext:] (KrollBridge.m:986) App_Test 0x00000001007c3338 -[KrollBridge loadAsFileOrDirectory:withContext:] (KrollBridge.m:1055) App_Test 0x00000001007c38d4 -[KrollBridge require:path:] (KrollBridge.m:1167) App_Test 0x00000001007c68b4 CommonJSRequireCallback (KrollContext.m:249) App_Test 0x00000001e6e3a1d8 0x00000001e6daf000 + 569816 {code} - A reproducible test-app can be found [here|https://github.com/sachincredible9/ModelTemplateTest] - The full discussion can be found [here|https://ti-slack.slack.com/archives/C03CVQX2A/p1534443895000100] Looking at the provided error log, it seems like evaluating a javascript-file fails in {{loadCommonJSModule}} after requiring a common-js file. I am not sure so far if this happens with Alloy (and the model-binding with Backbone) only or classic Titanium apps as well. The app works fine on iOS < 12, e.g. iOS 11.4.1
0
3,416
TIMOB-26344
08/29/2018 23:27:24
iOS: Applications Shortcuts crash on SDK 7.3.0+ when triggered from background
Please check out the following: {code:java} var windowA = Ti.UI.createWindow(); var windowB = Ti.UI.createWindow(); var tabA = Ti.UI.createTab({ window:windowA, title:'Tab A' }); var tabB = Ti.UI.createTab({ window:windowB, title:'Tab B' }); var tabGroup = Titanium.UI.createTabGroup({ tabs:[tabA, tabB] }); tabGroup.open(); var label = Ti.UI.createLabel({ text: '' }); windowA.add(label); if (Ti.UI.iOS.forceTouchSupported) { Ti.App.iOS.addEventListener('shortcutitemclick', function(e) { Ti.API.info('shortcutitemclick'); label.text = 'Shortcut icon clicked, with title = ' + e.title; }); var appShortcuts = Ti.UI.iOS.createApplicationShortcuts(); appShortcuts.removeAllDynamicShortcuts(); appShortcuts.addDynamicShortcut({ itemtype:'itemt_a', title:'Itemt A', icon:Titanium.UI.iOS.SHORTCUT_ICON_TYPE_MESSAGE }); appShortcuts.addDynamicShortcut({ itemtype:'itemt_b', title:'Itemt B', icon:Titanium.UI.iOS.SHORTCUT_ICON_TYPE_ADD }); } {code} 1) Open the app from shortcut
 2) Take the app to run on background 
3) Open the app from shortcut again The app terminates instantly
5
3,417
TIMOB-26349
09/01/2018 11:52:01
iOS 10: A couple of issues related to remote push-notifications
There are a couple of issues with notifications on iOS right now: # On iOS 10+, if a notification is delivered while the app is opened, the notification is presented in-app and the usual callback is not fired # On iOS 10+, the contents of the "aps" key are not in the top-level of the "data" key that is returned by the callback of the {{registerForPushNotifications}} callback # On iOS 10+, the "localnotificationaction" event is triggered, although "remotenoticationaction" should be triggered # On iOS 10+, the "sound" property of queued pushes can lead to a crash because it's not bridged to a consumable JS-type # On all supported iOS versions, if a remote notification action is triggered and the app is closed, the {{notificationaction}} is not triggered # On all supported iOS versions, silent pushes are fired to both the {{registerForPushNotifications}} callback and {{silentpush}} event. it should only be fired to the {{silentpush}} event for parity and API clearance.
5
3,418
TIMOB-26350
09/01/2018 20:03:12
Android: Cannot use Android Play Beta-testing
When trying to upload an Android app to Google Play alpha/beta testing, the following error occurs: {code} ERROR (Jar signer APP_NAME.RSA): JAR signature META-INF/APP_NAME.RSA uses digest algorithm SHA-256 and signature algorithm RSA which is not supported on API Level(s) 16-17 for which this APK is being verified {code} I am using SDK 7.3.0.
0
3,419
TIMOB-26354
09/05/2018 09:03:12
Android: Refactor TabGroup and introduce new style
Refactor the implementation of TabGroup keeping the visual representation. Introduce the {{BOTTOM_NAVIGATION_STYLE}} ( check: https://jira.appcelerator.org/browse/TIMOB-25953 ) for {{TabGroup}} which will be using the native {{BottomNavigationView}} native component.
8
3,420
TIMOB-26355
09/05/2018 18:41:17
Android: Implement V4 Analytics specification
- Implement V4 analytics specification outlined https://techweb.axway.com/confluence/pages/viewpage.action?spaceKey=analytics&title=Event+v4+Specification
13
3,421
TIMOB-26356
09/05/2018 18:41:41
iOS: Implement V4 Analytics specification
- Implement V4 analytics specification outlined https://techweb.axway.com/confluence/pages/viewpage.action?spaceKey=analytics&title=Event+v4+Specification
13
3,422
TIMOB-26357
09/05/2018 18:41:59
Windows: Implement V4 Analytics specification
- Implement V4 analytics specification outlined https://techweb.axway.com/confluence/pages/viewpage.action?spaceKey=analytics&title=Event+v4+Specification
13
3,423
TIMOB-26372
09/08/2018 10:44:59
iOS: Assigning text value in change event causes duplicated input on TextView
*Steps to reproduce the behavior* Add the following code to your app.js of a classic project: {code} var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); const textArea = Ti.UI.createTextArea({ backgroundColor: 'lightgray', height: 100, width: 200 }); textArea.addEventListener('change', (e) => { // This will trigger an additional change event and duplicate input textArea.value = e.value; }); win.add(textArea); win.open(); {code} *Actual behavior* Any input will be duplicated in the TextView itself. For example pressing 'H' will result in 'HH' appearing in the TextView. *Expected behavior* The value of the text view can be assigned without any side effects. *Additional notes* This is required for the two-way binding in Vue.js. The iOS TextField does not have this issues, neither does any of the text widgets on Android.
3
3,424
TIMOB-26375
09/10/2018 19:22:23
Windows: Blur is not working for TextField in ScrollView
Hi, We are having trouble with TextField not losing focus if it is in a ScrollView. If the TextField is in ScrollView, clicking anywhere else on the screen or by explicitly calling 'blur' method on TextField doesn't make the field lose focus. Since we have some events that are triggered whenever the user leaves that field, that functionality is getting impacted because of this issue. There was feature request created a while back - [TIMOB-25235|https://jira.appcelerator.org/browse/TIMOB-25235] to have blur method work for TextField. I have created a sample app where you can reproduce this issue. Steps to reproduce: 1. Run the attached project TestTextFieldBlurNew. You can see the TextField highlighted 2. Click anywhere on the screen and the TextField will not lose its focus. Its parent has a click event attached where blur is called on that TextField as well which doesn't seem to be working. If we replace the ScrollView with a normal View, it is working as expected though. Please provide a solution or work around for this issue.
8
3,425
TIMOB-26378
09/11/2018 13:48:13
Android: backgroundDisabledColor is ignored
Property {{backgroundDisabledColor}} is ignored for Ti.UI.View. *Sample:* _app.js_ {code:javascript} var win = Ti.UI.createWindow({ layout: 'vertical'}), view = Ti.UI.createView({ top: 50, width: 100, height: 100, backgroundColor: 'red', backgroundDisabledColor: 'gray'}), button = Ti.UI.createButton({ title: 'toggle' }); view.addEventListener('click', function () { Ti.API.info('Click!'); }); button.addEventListener('click', function () { view.enabled = !view.enabled; }); win.add([view, button]) win.open(); {code} Clicking the button changes the state of the view, but the background color stays the same. It is expected that the color changes accordingly to the enabled state. Edit: The previous version of the sample was not the best one.
3