Test working in iPad Simulator not on iPad
Hi!
I am new onboard and I'm trying out a few things that do not seem to work. I'd appreciate any and all pointers!
I have written an app which works fine in the iPad Simulator, but when I install it on the iPad it freezes with no error message. If I open the project in Xcode and attempt to compile and run it I am able to see the error messages.
The errors trigger when I use either of the following calls:
var ui = Ti.UI;
var win = ui.createWindow({
backgroundColor:'red'
});
or
var tabGroup = Ti.UI.createTabGroup({});
[WARN] attempted to load: TiUITabGroupProxy
[ERROR] Script Error = invalid method (createTabGroup) passed to UIModule at app.js (line 1).
[ERROR] application received error: invalid method (createTabGroup) passed to UIModule at app.js (line 1)
2 Answers
-
Try to use the full names, sometimes the 'Ti' variable is not available in all the functions scope
var win = Titanium.UI.createWindow({ backgroundColor:'#f00' })
Also keep the colors in hexa 3 or 6 digits ( #F00 or #FF0000)
-
I had a similar issue. I moved all code inside app.js to an include file app-window.js to solve this error
Take a look on "SOLUTION?!" on this link http://developer.appcelerator.com/question/100971/get-crash-log-from-iphone#179941