The application shows a white screen on startup after the transition to iOS 4.2

Over the past few weeks, I have been working on an application that uses the SoundManager class, which I found through comments on this blog post: http://www.gehacktes.net/2009/03/iphone-programming-part-6-multiple- sounds-with-openal /

A link to the SoundManager app and tester is provided in David Evans comments. I am not allowed to provide a second link, so I mention the name of the ZIP file to which it refers: SoundTester.zip

I was very pleased with this code until iOS 4.2 was released. After updating my iPad and Xcode respectively, my applications that use the SoundManager class only display a navigation bar with the name. The rest of the screen is white. This is not a specific iPad behavior. I saw the same thing on iPhone4 and iPhone 3G, which were updated to iOS 4.2.

When running applications in the simulator, I get the same results. The problem is that I do not receive error messages in the console window and do not build or compile errors at all. Very unpleasant and very difficult to fix for an iPhone developer who started using the iPhone SDK only a few months ago.

Does anyone know what could break and how to fix it? Any help is appreciated!

+3
3

-, , ...

, , Cookbook iPhone Developer.

SoundManager ( - , !), : didFinishLaunchingWithOptions: App Delegate.

, iOS 4.2, iOS 3.2:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

// Create a Navigation Controller on the fly.
// Use the View Controller as root view controller.
viewController.title = @"ThreeSounds";

UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:viewController];
nav.navigationBar.barStyle = UIBarStyleBlack;

// Add the view controller view to the window and display.
[window addSubview:nav.view];
[nav release];

[window makeKeyAndVisible];

return YES;
} 

: , : [nav release]. - iOS 3.2. iOS 4.2 .

, , , . , , , :

-(BOOL) respondsToSelector:(SEL)aSelector {
 printf("SELECTOR: %s\n", [NSStringFromSelector(aSelector) UTF8String]);
 return [super respondsToSelector:aSelector];
}

, .

+1

(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
if (!window) 
{
  [self release];
  return 0;
}

. 3.2/4.0 SDK. SDK 4.3 . , .

+1

I had the same problem. The problem was duplicated by UIWindow.

+1
source

Source: https://habr.com/ru/post/1776680/


All Articles