iOS 6 problem - application rejected from App Store

You must Login before you can answer or comment on any questions.

My application was rejected due to crash on iPhone and iPad with iOS6. Any ideas what to do?

I got this from Apple:

Sep 12, 2012 02:35 PM. From Apple. 2.1

We found that your app crashed on iPhone 4 and iPad running iOS 6, which is not in compliance with the App Store Review Guidelines.

Your app crashed on both Wi-Fi and cellular networks when we launched the app.

We have attached detailed crash logs to help troubleshoot this issue. For information on how to symbolicate and read a crash log, please see Tech Note TN2151 Understanding and Analyzing iPhone OS Application Crash Reports.

For discrete code-level questions, you may wish to consult with Apple Developer Technical Support. Please be sure to include any symbolicated crash logs, screenshots, or steps to reproduce the issues when you submit your request.

Crash report: http://pastebin.com/t2D8Q25n

2 Answers

I think I found reason of crash after some debug under Xcode 4.5.

It crashed in TiUILabel.m here:

-(CGSize)sizeForFont:(CGFloat)suggestedWidth
{
    NSString *value = [label text];
    UIFont *font = [label font];
    CGSize maxSize = CGSizeMake(suggestedWidth<=0 ? 480 : suggestedWidth, 10000);
    CGSize shadowOffset = [label shadowOffset];
    requiresLayout = YES;
    if ((suggestedWidth > 0) && [value characterAtIndex:value.length-1] == ' ') {
        // (CGSize)sizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size lineBreakMode:(UILineBreakMode)lineBreakMode method truncates
        // the string having trailing spaces when given size parameter width is equal to the expected return width, so we adjust it here.
        maxSize.width += 0.00001;
    }
    CGSize size = [value sizeWithFont:font constrainedToSize:maxSize lineBreakMode:UILineBreakModeTailTruncation];
    if (shadowOffset.width > 0)
    {
        // if we have a shadow and auto, we need to adjust to prevent
        // font from clipping
        size.width += shadowOffset.width + 10;
    }
    return size;
}
at line
if ((suggestedWidth > 0) && [value characterAtIndex:value.length-1] == ' ') {
with BAR_ACCESS exception

but if modify this line to

if ((value.length > 0) && (suggestedWidth > 0) && [value characterAtIndex:value.length-1] == ' ') {
fixed the crash.

— answered 2 years ago by Sergey Nosenko
answer permalink
6 Comments
  • Wow, thank you so much. This fix worked for me too.

    — commented 2 years ago by Kevin McCallum

  • It's becoming urgent for Appcelerator to release an update of the SDK....

    — commented 2 years ago by Armindo Da Silva

  • I think that problem is connected only with Ti.UI.createLabel() with empty text and 'auto' width.

    — commented 2 years ago by Sergey Nosenko

  • Show 3 more comments

Is there a official fix for the SDK yet? My App was rejected from Apple with this Message.

— answered 2 years ago by Fabian Rodler
answer permalink
1 Comment
  • Try the fix, but iOS 6 will release only in 5 days, and Appcelerator usually support it in 30 days... :)

    — commented 2 years ago by Sergey Nosenko

Your Answer

Think you can help? Login to answer this question!