titanium

adding customized parameters to pass as json

岁酱吖の 提交于 2019-12-13 02:35:48
问题 I am sending the parameters using post method to my rails server using this code in titanium- if (email.value != '' && password.value != '') { loginReq.open("POST","http://192.168.0.187:3000/users/sign_in"); var params = { email: email.value, password: password.value }; loginReq.send(params); } On rails server side I am getting this output on console - Parameters: {"password"=>"[FILTERED]", "email"=>"abcdefgh@gmail.com"} But I need the output like this - Parameters: {"user"=>{"email"=>

Cannot get module to work in Titanium Alloy JS

六眼飞鱼酱① 提交于 2019-12-13 01:09:37
问题 I've tried to add the TiSocial.Framework module into Titanium Alloy, and after reading several guides and questions, I still can't get it to work. What am I doing wrong? Here are the steps I took: Copied the unzipped module files into modules/iphone/TiSocial.Framework-master Edited the TiApp.xml file with: <module platform="iphone">TiSocial.Framework-master</module> Cleaned the build tried to run the app. But I get the following error(s): Could not find Titanium module id=TiSocial.Framework

Given a date how to get Sunday & Saturday of that week

北慕城南 提交于 2019-12-12 20:38:56
问题 I want to get the Sunday & Saturday of the week from which a date is provided. I have access to the following functions only: getDate() returns a number from 0-6 (0 being sunday) getDay() returns a number from 1-31 getMonth() returns a number from 0-11 getFullYear() returns the current year I am doing this on titanium. 回答1: Per your description above, I came up with: var sat = new Date(input.getFullYear(), input.getMonth(), 6 - input.getDate() + getDay()); var sun = new Date(input.getFullYear

Titanium StoreKit module won't verify test account

大憨熊 提交于 2019-12-12 20:12:16
问题 I have a recurring subscription product as an in app purchase in my Titanium app. When I go to test this, it retrieves the correct product from iTunes and I get almost all the way through checkout, but before it lets me purchase, it says "Verification Required Before you can make purchases, you must tap Continue to verify your payment info. [Environment: Sandbox]" When I press Continue, it takes me into the App Store and just has a dialog box that says "[Environment: Sandbox]" with a Cancel

Sending email through Appcelerator Cloud API

你说的曾经没有我的故事 提交于 2019-12-12 18:46:53
问题 I was trying to send email through Appcelerator Cloud Service, in my Titanium app. The code I'm using is the standart one, given at the documentation site. But the email is not being sent. Cloud.Emails.send({ template: 'welcome', recipients: '*******@gmail.com' }, function (e) { if (e.success) { Titanium.API.info('Email sent successfully.'); } else { Titanium.API.info('Error:\\n' + ((e.error && e.message) || JSON.stringify(e))); } }); It give the this error, 'Email template welcome is not

How to send attachments (images) and nested params using XHR to uplaoad file in titanium?

血红的双手。 提交于 2019-12-12 17:30:42
问题 I am trying to upload images from the photo gallery of the phone to the server. Images gallery is opening perfectly fine. Here is my code. var win = Ti.UI.createWindow({ navBarHidden : true, }); var ind = Titanium.UI.createProgressBar({ width : 200, height : 50, min : 0, max : 1, value : 0, style : Titanium.UI.iPhone.ProgressBarStyle.PLAIN, top : 10, message : 'Uploading Image', font : { fontSize : 12, fontWeight : 'bold' }, color : '#888' }); win.add(ind); ind.show(); var main_url = "http:/

Installing Titanium ACS

爱⌒轻易说出口 提交于 2019-12-12 16:38:02
问题 We're trying to install Titaniums ACS via command line using sudo npm -g install acs however it keeps failing and we get the below error npm http GET https://registry.npmjs.org/bindings > bson@0.0.4 install /usr/local/lib/node_modules/acs/node_modules/connect-mongo/node_modules/mongodb/node_modules/bson > node install.js sh: node: command not found npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/acs/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js

How to understand EXC_BAC_ACCESS (SIGSEGV) KERN_INVALID_ADDRESS log?

家住魔仙堡 提交于 2019-12-12 14:27:13
问题 I'm doing an app in Titanium for Android and IOS. When I navigate a lot in the application I have a random exception and the app crashes. How can I know where is the problem? The app is a little complex to explain: It has two windows, first window is for "home" view that is only in portrait mode, and when I click to go to another view, I close the first window, I open another window and I add a view with the content to this window. The content view load the same web view with different url.

ImageFactory.imageAsResized returns null

為{幸葍}努か 提交于 2019-12-12 13:25:12
问题 I tried to use ImageFactory.imageAsResized for resizing images. but some times for some images it returns null. I want to know is there any specification for images that we want to upload.??? given code may show my problem var saveImageData = ImageFactory.imageAsResized(image, { width : 480, height : 360 }); if (saveImageData !== null) { var toast = Titanium.UI.createNotification({ duration : 1000, message : "save true "+saveImageData }); toast.show(); } else{ var toast = Titanium.UI

Appcelerator Titanium: Code Sign error: No codesigning identities found

心不动则不痛 提交于 2019-12-12 10:55:49
问题 This is driving me crazy, I have spent about 10 hours now deleting and regenerating Apple keys and provisioning profiles for my Appcelerator Titanium iPad app. I had this all working and compiling 1 year ago, then my Mac crashed and I had to reformat and start over. I cannot get past this error: "Code Sign error: No codesigning identities found (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings ('Okland Construction 2014') were found.