Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Mobile app crashing, running in WebView

$
0
0

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 bounds
The 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.

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>