[AC-836] Cannot use Ti.Cloud commonjs module with MobileWeb
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2014-08-26T00:34:37.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Titanium SDK & CLI |
| Labels | TCSupportTriage, cloud, commonJS, mobileweb, ti.cloud, undefined |
| Reporter | Brenton House |
| Assignee | Mauro Parra-Miranda |
| Created | 2014-07-25T18:44:25.000+0000 |
| Updated | 2016-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
| File | Date | Size |
|---|---|---|
| alloy.acs.test2.zip | 2014-07-25T18:44:25.000+0000 | 8237984 |
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.0Steps 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
Thanksvar 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))); } });Hello! We tested the cloud module, and looks like working with mobile web. Best Regards!