I have an application, that is running in a WebView in Titanium, using sdk 3.1.2.GA.5ceaff8. The platform is iOS. The application keeps crashing with an index out of bounds exception. Here is the top portion of the error output:
[ERROR] : The application has crashed with an uncaught exception 'NSRangeException'. [ERROR] : Reason: [ERROR] : -[__NSCFConstantString characterAtIndex:]: Range or index out of boundsThe interesting/strange thing about this, is that if I run it in a UIWebView using XCode/Objective-C, the crash does not occur. Also, the index out of bounds exception isn't occurring when run in a browser.
The code that is running in the WebView is a javascript web app. I am passing the webview an html file. As shown below.
var webview = Ti.UI.createWebView({ url : 'web/index.html', width : Ti.Platform.displayCaps.platformWidth, height : Ti.Platform.displayCaps.platformHeight, scalesPageToFit : true, willHandleTouches: true, horizontalWrap: false, });Any suggestions, or ideas anyone has would be greatly appreciated.