Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23268] Windows: Ti.App.Properties are not persistent between builds

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterJonas Bjurhult
AssigneeUnknown
Created2016-04-20T18:11:19.000+0000
Updated2018-02-28T19:55:22.000+0000

Description

All data stored in any kind of Ti.App.Properties are reset when I rebuild and redeploy my app. I tried building both using Appcelerator Studio and via CLI (ti build --platform windows --target wp-emulator --device-id 8-1-4) and it gives the same result.

Comments

  1. Jonas Bjurhult 2016-04-21

    Test code
       Ti.API.info("Starting");
       
       
       function doClick(e) {
           Ti.API.info("Hi there");
           alert($.label.text);
       }
       
       if (!Ti.App.Properties.hasProperty('testProp'))
       {
       	Ti.API.info('testProp not set');
       	Ti.App.Properties.setBool('testProp', true );
       }
       
       $.win.open();
       
       
    This produces the following debug log every time i build and redeply the app: -- Start application log ----------------------------------------------------- [INFO] : Starting [INFO] : testProp not set [INFO] : Finished launching the application [INFO] : Waiting for app to connect to log relay
  2. Jonas Bjurhult 2016-04-21

    My environment from 'appc info' Appcelerator Command-Line Interface, version 5.2.2 Copyright (c) 2014-2016, Appcelerator, Inc. All Rights Reserved. Operating System Name = Microsoft Windows 10 Pro Version = 10.0.10586 Architecture = 32bit # CPUs = 2 Memory = 5.2GB Node.js Node.js Version = 0.12.7 npm Version = 2.11.3 Appcelerator CLI Installer = 4.2.4 Core Package = 5.2.2 Titanium CLI CLI Version = 5.0.6 node-appc Version = 0.2.31 Titanium SDKs 5.4.0.v20160419234222 Version = 5.4.0 Install Location = C:\ProgramData\Titanium\mobilesdk\win32\5.4.0.v20160419234222 Platforms = android, mobileweb, windows git Hash = 743d79c git Timestamp = 04/19/16 23:42 node-appc Version = 0.2.35 5.4.0.v20160410215408 Version = 5.4.0 Install Location = C:\ProgramData\Titanium\mobilesdk\win32\5.4.0.v20160410215408 Platforms = android, mobileweb, windows git Hash = 97fe3e2 git Timestamp = 04/10/16 21:54 node-appc Version = 0.2.35 5.4.0.v20160330202802 Version = 5.4.0 Install Location = C:\ProgramData\Titanium\mobilesdk\win32\5.4.0.v20160330202802 Platforms = android, mobileweb, windows git Hash = 15320e5 git Timestamp = 03/30/16 20:28 node-appc Version = 0.2.35 5.4.0.v20160301084038 Version = 5.4.0 Install Location = C:\ProgramData\Titanium\mobilesdk\win32\5.4.0.v20160301084038 Platforms = android, mobileweb, windows git Hash = 071c19c git Timestamp = 03/01/16 08:40 node-appc Version = 0.2.35 5.3.0.v20160418111755 Version = 5.3.0 Install Location = C:\ProgramData\Titanium\mobilesdk\win32\5.3.0.v20160418111755 Platforms = android, mobileweb, windows git Hash = 7c38ca5 git Timestamp = 04/18/16 11:17 node-appc Version = 0.2.33 5.3.0.v20160407140024 Version = 5.3.0 Install Location = C:\ProgramData\Titanium\mobilesdk\win32\5.3.0.v20160407140024 Platforms = android, mobileweb, windows git Hash = 9d961f3 git Timestamp = 04/07/16 14:00 node-appc Version = 0.2.33 5.2.0.GA Version = 5.2.0 Install Location = C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.GA Platforms = android, mobileweb, windows git Hash = 384775e git Timestamp = 02/20/16 08:04 node-appc Version = 0.2.33 Intel® Hardware Accelerated Execution Manager (HAXM) Not installed Java Development Kit Not found Genymotion Path = not found Genymotion Executable = not found Genymotion Player = not found Home = not found VirtualBox Executable = not found Version = unknown Android SDK Android Executable = not found ADB Executable = not found SDK Path = not found Android NDK NDK Path = not found NDK Version = not found Android Platforms None Android Add-Ons None Android Emulators None Genymotion Emulators None Connected Android Devices None Microsoft (R) Visual Studio 14.0 (selected) Path = C:\Program Files (x86)\Microsoft Visual Studio 14.0\ CLR Version = v4.0.30319 MSBuild Version = v14.0.24730.2 Windows Phone SDKs = not installed Microsoft (R) Windows Phone SDK 10.0 Path = C:\Program Files (x86)\Windows Kits\10\ 8.1 (selected) Path = C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\ Windows PowerShell Enabled = yes Windows Phone Emulators 8.1 Emulator 8.1 WVGA 4 inch 512MB UDID 8-1-1 Emulator 8.1 WVGA 4 inch UDID 8-1-2 Emulator 8.1 WXGA 4.5 inch UDID 8-1-3 Emulator 8.1 720P 4.7 inch UDID 8-1-4 Emulator 8.1 1080P 5.5 inch UDID 8-1-5 Emulator 8.1 1080P 6 inch UDID 8-1-6 10.0 Windows Phone Devices Device UDID 0 Java Development Kit Issues × JDK (Java Development Kit) not installed. If you already have installed the JDK, verify your JAVA_HOME environment variable is correctly set. The JDK is required for must be manually downloaded and installed from http://appcelerator.com/jdk. Android Issues × JDK (Java Development Kit) not found. If you already have installed the JDK, verify your JAVA_HOME environment variable is correctly set. The JDK can be downloaded and installed from http://appcelerator.com/jdk.
  3. Nazmus Salahin 2016-04-21

    Hello, I am able to get persistent date over building app for the following code.
       var win = Titanium.UI.createWindow({  
           title:'Tab 1',
           backgroundColor:'#fff'
       });
       win.open();
       
       var beforeSetting=Ti.App.Properties.getString('name');
       Ti.App.Properties.setString('name','Appcelerator');
       var afterSetting=Ti.App.Properties.getString('name');
       Ti.API.log(beforeSetting+"  "+afterSetting);
       
    *Steps:* 1. When I first build and run the app I get the following console log.
       [INFO] :   null  Appcelerator
       
    2. When I build and run the app again I get the following console log. It is apparent that date is persistent over build.
       [INFO] :   Appcelerator  Appcelerator
       
    3. Now I add property in tiapp.xml as follows.
       <property name="name" type="string">Titanium</property>
       
    4. When I first build and run the app I get the following console log.
       [INFO] :   Titanium  Titanium
       
    5. When I build and run the app again I get the following console log. It is seen that it is not possible to change property value when set in tiapp.xml.
       [INFO] :   Titanium  Titanium
       
    *Please provide us test code and step to reproduce so that we can understand what's happening in your case.* Thanks *Environment*: *Device info:* Nexus7 (android 6.0.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.4.0 *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0
  4. Jonas Bjurhult 2016-04-21

    Hi, I have only seen this on Windows emulator (not tested on real hardware yet). My colleague running the exact same code does not have this issue. We are both running Windows via OSX (Parallells) but I am running Windows 10, he runs Windows 8.1.
  5. Sharif AbuDarda 2016-04-21

    Hello, It's a well-known facts that Appcelerator has issue with Windows 10. Make sure you followed the guide here http://docs.appcelerator.com/platform/latest/#!/guide/Installing_the_Windows_Phone_SDK and followed the compatibility and download section on Windows OS. "Windows 10 requires Developer mode to be enabled to build ws-local applications. This can be set in Settings > Update & Security > For developers." Regards, Sharif.
  6. Jonas Bjurhult 2016-04-21

    I followed everything on the guide as far as I can see and the Developer Mode is enabled. Are the problems with Windows 10 documented somewhere?
  7. Jonas Bjurhult 2016-04-27

    I have the same behaviour on Windows 8.1. It looks like the app is first deleted as it disappears momentarily from the app list, before being installed again. Maybe this could be the reason?

JSON Source