Titanium JIRA Archive
Appcelerator Community (AC)

[AC-836] Cannot use Ti.Cloud commonjs module with MobileWeb

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-08-26T00:34:37.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
LabelsTCSupportTriage, cloud, commonJS, mobileweb, ti.cloud, undefined
ReporterBrenton House
AssigneeMauro Parra-Miranda
Created2014-07-25T18:44:25.000+0000
Updated2016-03-08T07:37:07.000+0000

Description

** This issue is a result of a patch that had gotten run against ti.cloud to fix a different issue. I removed the patch and this issue no longer exists. You can close this issue and I will open a different issue for the problem that the patch was fixing. Thanks!! ** ------------------------------------- require('ti.cloud') is not working in MobileWeb projects. It does not have any of the methods that it should have on the object such as CreateUser, etc. I am not doing anything special. Just out-of-the-box usage of ti.cloud on MobileWeb.

Attachments

FileDateSize
alloy.acs.test2.zip2014-07-25T18:44:25.000+00008237984

Comments

  1. Motiur Rahman 2014-08-06

    Hello, we have tested this issue. It’s not a bug, ti.cloud works as expected in mobile web.

    Testing Environment:

    Titanium SDK: 3.3.0.GA, Titanium CLI: 3.3.0, Web Browser: Firefox 31.0, OS X Version: 10.9.3, Appcelerator Studio: 3.3.0

    Steps to Test:

    1. Create a Alloy project. 2. Paste this code in alloy.js file. 3. Enable cloud from tiapp.xml file 3. Run this code with the testing environment.

    Test Code

       var Cloud = require("ti.cloud");
       Cloud.Users.create({
           email: 'test@mycompany.com',
           first_name: 'test_firstname',
           last_name: 'test_lastname',
           password: 'test_password',
           password_confirmation: 'test_password'
       }, function (e) {
           if (e.success) {
               var user = e.users[0];
               alert('Success:\n' +
                   'id: ' + user.id + '\n' +
                   'sessionId: ' + Cloud.sessionId + '\n' +
                   'first name: ' + user.first_name + '\n' +
                   'last name: ' + user.last_name);
           } else {
               alert('Error:\n' +
                   ((e.error && e.message) || JSON.stringify(e)));
           }
       });
       
    Thanks
  2. Mauro Parra-Miranda 2014-08-26

    Hello! We tested the cloud module, and looks like working with mobile web. Best Regards!

JSON Source