Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-20421

ti.cloud module methods are not responding on MobileWeb when building from Windows

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Won't Fix
    • Affects Version/s: Release 5.1.2, Release 5.1.1
    • Fix Version/s: None
    • Component/s: MobileWeb
    • Labels:
    • Environment:

      Windows 8.1
      ti.SDK 5.1.2GA
      Studio 4.4
      CLI 5.1.0

      Description

      Issue Description

      Can't get response from ti.cloud module methods running as mobile web preview in browser on windows environment, the same code running from a Mac OS system is working as expected.

      Steps to reproduce
      1. Create a new classic default project application on studio with cloud services enabled
      2. Replace the code inside app.js with the next simple test case:

        // this sets the background color of the master UIView (when there are no windows/tab groups on it)
        Titanium.UI.setBackgroundColor('#000');
         
        // create tab group
        var tabGroup = Titanium.UI.createTabGroup();
         
         
        //
        // create base UI tab and root window
        //
        var win1 = Titanium.UI.createWindow({  
            title:'Tab 1',
            backgroundColor:'#fff'
        });
        var tab1 = Titanium.UI.createTab({  
            icon:'KS_nav_views.png',
            title:'Tab 1',
            window:win1
        });
         
        var label1 = Titanium.UI.createLabel({
        	color:'#999',
        	text:'I am Window 1',
        	font:{fontSize:20,fontFamily:'Helvetica Neue'},
        	textAlign:'center',
        	width:'auto'
        });
         
        win1.add(label1);
         
        //
        // create controls tab and root window
        //
        var win2 = Titanium.UI.createWindow({  
            title:'Tab 2',
            backgroundColor:'#fff'
        });
        var tab2 = Titanium.UI.createTab({  
            icon:'KS_nav_ui.png',
            title:'Tab 2',
            window:win2
        });
         
        var label2 = Titanium.UI.createLabel({
        	color:'#999',
        	text:'I am Window 2',
        	font:{fontSize:20,fontFamily:'Helvetica Neue'},
        	textAlign:'center',
        	width:'auto'
        });
         
        win2.add(label2);
         
         
         
        //
        //  add tabs
        //
        tabGroup.addTab(tab1);  
        tabGroup.addTab(tab2);  
         
         
        // open tab group
        tabGroup.open();
         
         
        // added during app creation. this will automatically login to
        // ACS for your application and then fire an event (see below)
        // when connected or errored. if you do not use ACS in your
        // application as a client, you should remove this block
        (function(){
        var ACS = require('ti.cloud'),
            env = Ti.App.deployType.toLowerCase() === 'production' ? 'production' : 'development',
            username = Ti.App.Properties.getString('acs-username-'+env),
            password = Ti.App.Properties.getString('acs-password-'+env);
         
        // if not configured, just return
        if (!env || !username || !password) { return; }
        /**
         * Appcelerator Cloud (ACS) Admin User Login Logic
         *
         * fires login.success with the user as argument on success
         * fires login.failed with the result as argument on error
         */
        ACS.Users.login({
        	login:username,
        	password:password,
        }, function(result){
        	if (env==='development') {
        		Ti.API.info('ACS Login Results for environment `'+env+'`:');
        		Ti.API.info(result);
        		alert(JSON.stringify(result));
        	}
        	if (result && result.success && result.users && result.users.length){
        		Ti.App.fireEvent('login.success',result.users[0],env);
        	} else {
        		Ti.App.fireEvent('login.failed',result,env);
        	}
        });
         
        })();
        

      3. The alert or Ti info's from the ACS variable are not executed on windows.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbarber Chris Barber
                Reporter:
                rramirez Ricardo Ramirez
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-20971
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code