App Got Rejected...

Discussion in 'iOS Programming' started by naphatkrit, Jan 16, 2012.

  1. naphatkrit macrumors member

    Joined:
    Jul 18, 2011
    #1
    My App was rejected earlier today because it crashes on an iPhone before the application can launch properly. Oddly enough, I can't reproduce the effect on my debugger. I am assuming that this is because the problem only occurs the first time the app launches, which doesn't happen when Xcode compiles the app. (I coded my app to perform a method when the app launches, and if it's the second time the app launches, it does the method in background instead of foreground.) This is the crash log from Apple.

    Code:
    Incident Identifier: 711FEC0C-7933-411E-ADF5-0EC9289ABFD0
    CrashReporter Key:   d4365cbed4fa63fb6536c6c6925416357a62e6e7
    Hardware Model:      iPhone3,1
    Process:         EIS SC [1292]
    Path:            /var/mobile/Applications/10CA1577-9D5A-4047-8C17-661A66342688/EIS SC.app/EIS SC
    Identifier:      EIS SC
    Version:         ??? (???)
    Code Type:       ARM (Native)
    Parent Process:  launchd [1]
    
    Date/Time:       2012-01-16 16:28:35.033 -0800
    OS Version:      iPhone OS 5.0.1 (9A405)
    Report Version:  104
    
    Exception Type:  00000020
    Exception Codes: 0x8badf00d
    Highlighted Thread:  0
    
    Application Specific Information:
    com.eis.eissc failed to launch in time
    
    Elapsed total CPU time (seconds): 5.370 (user 5.370, system 0.000), 26% CPU 
    Elapsed application CPU time (seconds): 0.807, 4% CPU
    
    Thread 0 name:  Dispatch queue: com.apple.main-thread
    Thread 0:
    0   libsystem_kernel.dylib        	0x362a0010 0x3629f000 + 4112
    1   libsystem_kernel.dylib        	0x362a0206 0x3629f000 + 4614
    2   CoreFoundation                	0x3436941c 0x342dc000 + 578588
    3   CoreFoundation                	0x34368154 0x342dc000 + 573780
    4   CoreFoundation                	0x342eb4d6 0x342dc000 + 62678
    5   CoreFoundation                	0x342eb39e 0x342dc000 + 62366
    6   CFNetwork                     	0x323fde0c 0x32398000 + 417292
    7   Foundation                    	0x35ceb4b6 0x35cdb000 + 66742
    8   Foundation                    	0x35d0f366 0x35cdb000 + 213862
    9   Foundation                    	0x35d40184 0x35cdb000 + 414084
    10  Foundation                    	0x35d84c70 0x35cdb000 + 695408
    11  EIS SC                        	0x000cb2f4 0xbf000 + 49908
    12  EIS SC                        	0x000c0be8 0xbf000 + 7144
    13  EIS SC                        	0x000c0534 0xbf000 + 5428
    14  UIKit                         	0x377767e4 0x3773b000 + 243684
    15  UIKit                         	0x377703b6 0x3773b000 + 218038
    16  UIKit                         	0x3773e91a 0x3773b000 + 14618
    17  UIKit                         	0x3773e3b8 0x3773b000 + 13240
    18  UIKit                         	0x3773dd26 0x3773b000 + 11558
    19  GraphicsServices              	0x30b70dec 0x30b6c000 + 19948
    20  CoreFoundation                	0x3436954c 0x342dc000 + 578892
    21  CoreFoundation                	0x343694ee 0x342dc000 + 578798
    22  CoreFoundation                	0x3436833c 0x342dc000 + 574268
    23  CoreFoundation                	0x342eb4d6 0x342dc000 + 62678
    24  CoreFoundation                	0x342eb39e 0x342dc000 + 62366
    25  UIKit                         	0x3776f450 0x3773b000 + 214096
    26  UIKit                         	0x3776c73c 0x3773b000 + 202556
    27  EIS SC                        	0x000c03be 0xbf000 + 5054
    28  EIS SC                        	0x000c0368 0xbf000 + 4968
    I looked up the exception code and it seems to indicate that the app took too long to start. Does anyone have a suggestion? Thank you all in advance.
     
  2. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #2
    I notice a reference to CFNetwork in the stack trace. Are you attempting to do network communication at launch? What happens if that network communication fails or is too slow?
     
  3. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #3
    Simply deleting the app from the simulator and installing again will make it behave like its the first time again...

    Try it with wi-fi turned off, to see how well it works without an internet connection like jimi suggested.
     
  4. naphatkrit thread starter macrumors member

    Joined:
    Jul 18, 2011
    #4
    You're right, the app downloads some data at launch. What I did is to run the downloading code in foreground if it's the first time launching the app, and background if it's not (downloaded data is saved for offline use, so if there is no connection, it will just use the data already downloaded earlier). I believe this may be the cause for the crash, but Apple did say in the resolution center that the app is tested under both wifi and cellular data connection.
     
  5. seepel macrumors 6502

    seepel

    Joined:
    Dec 22, 2009
    #5
    Do you have the symbolic binary file? Forgot what it's called. Google "interpreting crash dumps iOS" I'm sure find a tutorial to make sense of the crash you got from Apple.
     
  6. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #6
    http://www.google.com/search?as_q=0...cct=any&safe=off&tbs=&as_filetype=&as_rights=

    Your app was killed by the watchdog because it took too long to launch. I think it's ten seconds. You should symbolicate it because I can see some of your app's code in the stack trace, but basically you're doing something that takes too long when it launches. Don't do that.
     
  7. naphatkrit thread starter macrumors member

    Joined:
    Jul 18, 2011
    #7
    In that case, would it help if I use the method performSelectorInBackground in applicationDidFinishLaunching instead?
     
  8. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #8
    Yes. If you absolutely need this data before the app can do anything then display a screen saying something like "Downloading data for initial usage" whilst you download the data on the first run. If your app can be used without the data then just do it in the background like you do on subsequent executions.
     
  9. ppilone macrumors 6502

    Joined:
    Jan 20, 2008
    #9
    NEVER perform blocking code in applicationDidFinishLaunching methods. If you browse the dev forums you'll see this mantra over and over again.

    The usual solution for this is to use GCD to kick off a block of code that will execute asynchronously on a global thread. If you're unfamiliar with using GCD and blocks in this way I'd suggest taking a look at the GCD docs.
     
  10. naphatkrit thread starter macrumors member

    Joined:
    Jul 18, 2011
    #10
    Ok, I resubmitted the app with the background code instead. It's been "In Review" (not "waiting") for almost 24 hrs now. *fingers crossed* I hope it gets approved.
     
  11. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #11
    Wow, how did it get In Review so quickly? Lately, it seems to take almost a week to go from Waiting For Review to In Review.
     
  12. naphatkrit thread starter macrumors member

    Joined:
    Jul 18, 2011
    #12
    I was surprised too, it happened in less than an hour after I uploaded. I wonder if it's because I resubmitted the same day the old one got rejected?
     
  13. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #13
    Seems strange. Normally resubmission puts you to the back of the line. Oh well, good for you!
     
  14. naphatkrit thread starter macrumors member

    Joined:
    Jul 18, 2011
    #14
    Haha lucky me, I guess.

    Just out of curiosity though, how long does an app stay In Review nowadays? It's been over a day and it's still In Review.
     
  15. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #15
    I guess.

    My experience lately has been less than an hour.

    And then the luck runs out...
     
  16. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #16
    Err, what!?
    Last time, it took 2 weeks review time (took about 4 days to actually go into review). And then after 2 weeks I got rejected because they "suspected" I was stealing 3rd party things, while I had all the rights to myself.
    So I resubmitted while using some copyright logo's, then took only 2 days for going into review, and after a week, they did another reject for same reason.. Was pulling my hairs.. but since I'm in Europe and the guys at the phone can't help me, i'm kinda screwed, jaj.
     
  17. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #17
    Wow.

    That sucks.

    They rejected me once for having a banner prompting the user to upgrade to premium that looked exactly like an iAd (the banner would appear while the iAd request was being processed, the idea was to make the transition from my ad to an iAd be a smooth one... alas, I changed the banner to be solid gold instead.)

    Edit: It seems that if your app is going to be approved, it will be approved within a few hours of going into review. If it's not going to be approved, it's going to be in review for several days. So once it's been more than 4 hours or so, you can count on your app having been rejected and them just making you wait for them to write up an official report with a reason.
     
  18. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #18
    As I said, that's been my experience. YMMV.

    And I guess I was exaggerating a bit with "less than an hour". But certainly within a few hours.

    In case you're curious, here's how the last few versions of Quippa went:
    Waiting For Review:11/11 12:27PM, In Review: 11/17 1:28PM, Processing for App Store: 11/17 4:27PM
    Waiting For Review:11/21 4:40PM, In Review: 11/28 11:54AM, Processing for App Store: 11/28 12:32PM
    Waiting For Review:01/05 5:36PM, In Review: 01/11 10:06AM, Processing for App Store: 01/11 3:09PM
     
  19. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #19
    I know it was your experience, it just seems a bit unfair sometimes.
    My friend got it into review/accepted within 3 days. And I know some people who got stuck for 3 weeks, I don't know the logic they are following, but I'm wondering why I keep sticking around :p
     
  20. naphatkrit thread starter macrumors member

    Joined:
    Jul 18, 2011
    #20
    Does it make a difference that this is a major update (2.0)?
     
  21. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #21
    Shouldn't.
     

Share This Page