Please help.
I added a splash screen to my project.
First the launch image is shown, than my localized splash screen is shown for 2 seconds, fading to my first screen.
When installalling directly form Xcode on my device, everything works okay.
When I build an ipa archive and distribute via TestFlight, after install on the same device, the splash screen isn’t shown: immediately after launch image my first screen appears.
My device is a iPhone 4S, with iOS 6.0.1.
Deployment target is set to 5.0 and I use Xcode 4.5.2.
Code for splash screen at the bottom of my didFinishLaunchingWithOptions:
// Splash screen
UIImageView*imageView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:NSLocalizedString(@"Splash_NL.PNG", @"Bestandsnaam splash screen")]];
imageView.contentMode = UIViewContentModeScaleAspectFill;
imageView.frame = self.window.bounds;
[[navigationController view] addSubview:imageView];
[[navigationController view] bringSubviewToFront:imageView];
// as usual
[self.window makeKeyAndVisible];
// korte pauze, dan fade out
[self performSelector:@selector(_fadeSplash:) withObject:imageView afterDelay:1.0];
and after that
- (void) _fadeSplash:(UIView *)view
{
[UIView transitionWithView:self.window duration:2.0f options:UIViewAnimationOptionTransitionNone animations:^(void){view.alpha=0.0f;} completion:^(BOOL finished){[view removeFromSuperview];}];
}
Any help is appreciated; I’m lost/desperate…
Issue is solved. Some time before build of the archive, I supplied new splash screen images. The extension of these files was .png instead of .PNG.
I reckoned the splash screen on the device (via Xcode) should have failed as well (I deleted the previous version of the app before running/building), but obviously somehow these resource files were kept in memory or something.
Changing extension and rebuilding the archive solved it.