Avin
Avin

Reputation: 300

iPhone app crashes after splashscreen

My iPhone App works fine on iOS 5, but crashes after Splashscreen on iOS4. (using PhoneGap) (using HockeyApp.net).

I am new for ios development. I have developed an ios app with deployment target 4.0. It is perfectly installed and working on iPad 2 (os-5.1) and iPod touch ([4g] os-5.0.1). It is installing on iPhone 4 (os-4.2.6) and iPod touch ([2g] os-4.2.1) but not working. It shows the splashscreen, but crashes after that. I have addded my own log function in code and found that it is crashed before going inside didFinishLaunchingWithOptions function.

I am using HockeyApp.net to download the ipa file. I am not getting what is the problem exactly, the following is my AppDelegate.m file.

AppDelegate.m : https://gist.github.com/4343470

The crash report: Crash Report: https://gist.github.com/4343472

Please help me out this. Thank you in advance.

Upvotes: 2

Views: 660

Answers (1)

tom
tom

Reputation: 19163

The crash is because CDVCordovaView is a subclass of UIWebView, and UIWebView's scrollView property is only defined starting in iOS 5. Somewhere in your code you are trying to access the scrollView property, which causes the crash. Check if the CDVCordovaView object respondsToSelector:@selector(scrollView) before you access scrollView, to prevent the crash.

Upvotes: 6

Related Questions