[ALOY-1590] Android: OS_IOS assigned to a variable causes a crash.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-11-09T22:39:25.000+0000 |
Affected Version/s | n/a |
Fix Version/s | CLI Release 7.0.0 |
Components | Runtime |
Labels | n/a |
Reporter | Joshua A. Ceaser |
Assignee | Feon Sua Xin Miao |
Created | 2017-11-07T17:36:12.000+0000 |
Updated | 2017-11-09T23:01:41.000+0000 |
Description
When opening a window if the controller has a variable assigned eg. var ANIMATION = OS_IOS; on android the app will crash.
Attachments
File | Date | Size |
---|---|---|
index.js | 2017-11-07T17:38:49.000+0000 | 67 |
Hello [~jceaser], Thanks for sharing with us. Can you please visit this [link](https://gist.github.com/rakhimoni/a801f624bc838da0e303a0a3589d8f16) , test the sample code on iOS platform and let us know the results.
The
OS_IOS
,OS_ANDROID
andOS_WINDOWS
variables are used by the compiler and resolved to classic Titanium code at build-time, so there are not supposed to be assigned to variables, just like the@available(iOS 11.0,*)
flag in Swift. [~fmiao] to confirm, but I don't think this is something we should fix.Why would it work prior to 6.3?
[~jceaser] That makes it to a different thing :-) Unfortunately, you didn't provide any context so we could only guess. Please attach your full environment (including Alloy- and Appc-CLI-version).
Sorry about that, I created the ticket too fast. What information do you need about my environment?
I was using 6.3.0.GA when I got this error Appcelerator Command-Line Interface, version 6.3.0 Copyright (c) 2014-2017, Appcelerator, Inc. All Rights Reserved. Operating System Name = Mac OS X Version = 10.12.6 Architecture = 64bit # CPUs = 8 Memory = 16.0GB Node.js Node.js Version = 6.10.3 npm Version = 3.10.10 Titanium CLI CLI Version = 5.0.14 node-appc Version = 0.2.41
PR: https://github.com/appcelerator/alloy/pull/858
FR Passed. Error is no longer present when using OS_IOS, OS_ANDROID, and OS_WINDOWS in variable assignment.