Reputation: 735
I created a simple Apple Watch app in Xcode 6.2 to show a label displaying just "HELLO". But when the watch app is run,the watch screen appears,but it is completely BLACK. How to recover from this ? What are the general procedures to be followed while running an Apple Watch application?
- (void)awakeWithContext:(id)context {
[self.watchlbl setText:@"Hello"];
[super awakeWithContext:context];
}
Is anything wrong in this initialisation? I have also initialised the label in the storyboard.
Upvotes: 1
Views: 2305
Reputation: 3934
I was selecting iPhone 6 (6.2) the Watch App would not start, switched to iPhone 6 (6.3) and it worked.
Upvotes: 0
Reputation: 2175
First, always make the call to [super awakeWithContext:]
before everything else.
Second, you might put your code into the willActivate
method:
- (void)willActivate {
[super willActivate];
[self.watchlbl setText:@"Hello"];
}
EDIT
Also, make sure to use the right target in the XCode menu - the WatchKit App has to be started - like so:
Upvotes: 3