Starten Sie den iOS-Simulator über Xcode und es wird ein schwarzer Bildschirm angezeigt, woraufhin Xcode hängen bleibt u

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Starten Sie den iOS-Simulator über Xcode und es wird ein schwarzer Bildschirm angezeigt, woraufhin Xcode hängen bleibt u

by Guest » 27 Jan 2025, 04:18

Ich habe Probleme beim Ausführen meiner grundlegenden iPhone-Anwendung (während ich die Stanford iTunes CS193p-Vorlesungen durchführe) im iOS-Simulator.

Ich habe nach einer gesucht while (sowohl Google als auch SO), konnte aber bisher keine Lösung finden. Es gibt viele ähnliche Fehler, aber die Lösungen scheinen das nicht zu beheben.

In Xcode klicke ich auf „Ausführen“. Es wird erfolgreich kompiliert und erstellt, startet den iOS-Simulator, lädt die App jedoch nie. Nur die Statusleiste oben. Mit einem schwarzen Bildschirm.

Ich habe nur sehr einfachen Code geschrieben (im Anschluss an die Vorlesungen) und komme an diesem Problem nicht vorbei.

Um die Sache noch mehr zu verwirren, habe ich vor diesen Vorlesungen einen Web-Wrapper (UIWebView) geschrieben, und das funktioniert gut. Aber es gibt kaum einen Unterschied im Code. Alle neuen Apps, die ich von Grund auf erstelle, schlagen alle mit dem gleichen Problem mit dem schwarzen Bildschirm fehl.

Wenn ich die Home-Taste am Simulator drücke und die App starte, wird sie angezeigt. Aber Xcode scheint nicht zu wissen, was los ist.

Es ist, als hätte Xcode die Fähigkeit verloren, mit dem iOS-Simulator zu kommunizieren, und geht davon aus, dass er läuft (auch wenn ich iOS beende). Simulator). Ich versuche, Xcode zu beenden, und es fordert mich auf, die Aufgaben zu stoppen. Dann hängt es einfach. Also muss ich einen Neustart erzwingen, um Xcode zu verlassen.

Ich verwende:
OSX 10.8.2
Xcode 4.5.2
iOS Simulator 6.0

CalculatorAppDelegate.h

Code: Select all

#import 

@interface CalculatorAppDelegate : UIResponder 

@property (strong, nonatomic) UIWindow *window;

@end
< /code>

[b]CalculatorAppdelegate.m[/b]

#import "CalculatorAppDelegate.h"

@implementation CalculatorAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions (NSDictionary *)launchOptions
{
// Override point for customization after application launch.
return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application
{
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end
CalculatorViewController.h

Code: Select all

#import 

@interface CalculatorViewController : UIViewController
@property (weak, nonatomic) IBOutlet UILabel *display;

@end
CalculatorViewController.m

Code: Select all

#import "CalculatorViewController.h"

@implementation CalculatorViewController

@synthesize display = _display;

- (IBAction)digitPressed:(UIButton *)sender
{
NSString *digit = [sender currentTitle];
NSLog(@"digit pressed = %@", digit);
}

@end

Top