Reputation: 11053
I have an app in appstore which worked fine until iOS6.
There it crashes - but only when downloaded from the store. When its installed through xCode there is no crash.
While I read the crash report in the Organizer I get this:
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x32b6f526 objc_retain + 6
1 XXXX 0x000cefd8 -[XXXX messageComposeViewController:didFinishWithResult:] (XXXX.m:96)
2 CoreFoundation 0x348659c0 __invoking___ + 64
3 CoreFoundation 0x347bcfe6 -[NSInvocation invoke] + 282
4 CoreFoundation 0x347bcb3e -[NSInvocation invokeWithTarget:] + 46
5 UIKit 0x35f89324 -[_UIObjectArgumentReplacingProxy forwardInvocation:] + 300
6 CoreFoundation 0x34864616 ___forwarding___ + 622
7 CoreFoundation 0x347bbf64 _CF_forwarding_prep_0 + 20
So I assume it is line 96 in the file.
This is the code:
- (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result {
[self dismissModalViewControllerAnimated:NO]; //take away the SMS screen fast
NSString *sms = controller.body; //**** THIS IS LINE 96
switch (result)
{
case MessageComposeResultCancelled:
//message.text = @"Canceled";
NSLog(@"Result: canceled");
break;
case MessageComposeResultSent: {
NSLog(@"Result: sent %@",sms);
}
break;
case MessageComposeResultFailed:
//message.text = @"Failed";
NSLog(@"Result: failed");
break;
default:
//message.text = @"Not sent";
NSLog(@"Result: not sent");
break;
}
[self.delegate myVCDidFinishWithValue: val];
}
So basically I in this case I just take out the complete code since I do not need it anymore.
My question:
Is there a way now to test the app as if it was loaded from the AppStore so I can check other problems?
Or do I gamble now and hope the error is gone?
ps when I istall the app through xCode - or even use TestFlight to distribute to testers it worked fine! Only from Appstore it crashes. Any idea if they do anything to the code?
Many thanks!
Upvotes: 0
Views: 212
Reputation: 4406
i think you should dismiss it at the bottom of your method. --- Install: You can drag the archived (and stored for enterprise) ipa onto your device in the organizer.
(look at comments for detail)
Upvotes: 1