Search code examples
iosobjective-csplash-screen

your app loads indefinitely upon launch


I have an app which works fine on below devices.

iPhone 4s (iOS 7.1) iPhone 5 (iOS 9.1) iPhone 6 (iOS 9.1)

However app is rejecting saying below rejection.

We discovered one or more bugs in your app when reviewed on iPad and iPhone running iOS 9.1 on both Wi-Fi and cellular networks.

  • App did not load its contents, did not load beyond the flash screen.

However when I run this from my side, its working fine but it has problem at Apple end only. I don't know how can app run at my end and its giving problem at Apple end only? I tried to upload with iOS 8.4, but still Apple reply still we can't go beyond splash screen.

Did anyone face such issue OR does anyone point me where I can be wrong?

I have uploaded 6 builds and all are rejected saying same reason.

Note: Same app was working fine earlier (before iOS 9.1 release), but when I try to upload now, it is giving this error.

The biggest challenge for me is, I don't know what is the problem, but I need to FIX this problem


Edit 1

I have first screen as language screen where I have animation of images.

animationImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 1080, 1920)];
animationImageView.hidden = NO;
animationImageView.animationImages = mArray;
animationImageView.animationDuration = 1.5;
animationImageView.animationRepeatCount = 1;
[self.view addSubview:animationImageView];
[animationImageView startAnimating];

Solution

  • After testing on testflight, I found a problem.

    If I open the app after clicking app icon, it was working fine.

    The problem comes when I click Open button from testflight

    When I click Open button, launchOptions in AppDelegate was not nil, so the code in push was going wrong and internally it was crashing but still app was hanged at splash screen (not sure why though)

    Below is what I have when I print launchOptions in AppDelegate didFinishLaunchingWithOptions

    launchOptions==={
        UIApplicationLaunchOptionsSourceApplicationKey = "com.apple.TestFlight";
    }
    

    So I changed my code to below and all is working perfectly.

    NSLog(@"launchOptions===%@", launchOptions);
    
    if (launchOptions!=nil) {
        NSMutableDictionary *userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
    
        NSLog(@"userInfo===%@", userInfo);
        NSLog(@"userInfo===%d", userInfo.count);
    
        if (userInfo.count>=1) {
              // here is my code on what to do if i click on push
        }
    }
    

    Do let me know if someone is not clear

    It was crashing saying below

    Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSPlaceholderString initWithString:]: nil argument'

    So I feel problem was at line below.

    NSString *badge =[[NSString alloc] initWithFormat:@"%@", [apsInfo objectForKey:@"badge"]];
    

    But after putting above condition, all was working fine.