[AC-751] Can't use ti.cloud in mobileweb app
| GitHub Issue | n/a |
| Type | Bug |
| Priority | n/a |
| Status | Resolved |
| Resolution | Cannot Reproduce |
| Resolution Date | 2015-09-30T00:58:03.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Alloy, Appcelerator Modules, Titanium SDK & CLI |
| Labels | exports, mobileweb, ti.cloud |
| Reporter | Nicolas Weinachter |
| Assignee | Shak Hossain |
| Created | 2015-04-12T22:37:07.000+0000 |
| Updated | 2016-03-08T07:37:00.000+0000 |
Description
Hello,
When I compile my code as mobile web, the ti.cloud parts doesn't work.
When launching the app in the browser, there are errors in the javascript console :
exports is not defined
Cloud.sendRequest is not a function
The app is working fine on android.
I tried different sdk or ti.cloud version but there is always the same error.
Thank you,
Nicolas.
Attachments
| File | Date | Size |
| build.rar | 2015-04-12T22:37:07.000+0000 | 1451286 |
Hello, We tested this issue in our environment. Its working as expected. I will mark this as resolved we can't reproduce it. Test Environment: CLI Version = 4.0.1 Titanium SDK Version = 4.1.0.GA Google Chrome 44.0.2403.157 (64-bit) *Test Code:* *index.js*
Thanksfunction doClick(e) { (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); ACS.sendRequest({ url : "users/login.json", method : "POST", data : { login : 'rakhimonimitro@gmail.com', password : 'test1234' } }, function(e) {// The callback called when the request completes if (e.success) { var user = e.users[0]; alert('Success:\n' + 'id: ' + user.id + '\n' + 'first name: ' + user.first_name + '\n' + 'last name: ' + user.last_name); } else { alert('Error:\n' + ((e.error && e.message) || JSON.stringify(e))); } }); })(); } $.index.open();