0

I am developing apple watch application. my application working like every second it's notify sound and vibrate on my watch app.

Otherwise How can i stop watch from going to lock screen after 15 second?

My code is as follows.

- (void)willActivate {

    [super willActivate];
    soundAlert = [NSTimer scheduledTimerWithTimeInterval:1.2f target:self selector:@selector(SoundAlertNotification) userInfo:nil repeats:YES];
}

- (void)SoundAlertNotification
{
    if (!isRechableFlag) {
        [self playsound];
    }

}

#pragma mark - Play Sound Methods -

- (void) playsound
{
    [[WKInterfaceDevice currentDevice] playHaptic:WKHapticTypeRetry];
}

But when watch is going to lockscreen around 15 secode my sound method stop to call rather then it's work well.

What am I doing wrong?

BuLB JoBs
  • 841
  • 4
  • 20
  • @the4kman I was not find out my answer on above link.my question is simple how can i play sound when watch going on lock screen? – BuLB JoBs Dec 01 '17 at 13:41

1 Answers1

0

This is a user preference setting, https://www.imore.com/how-keep-your-apple-watch-screen-longer

Otherwise you have to set your application up as a workout app to keep the screen from hibernating, but if it is not actually a workout app then it will get denied when you try to publish to the app store.

Zachary Bell
  • 559
  • 4
  • 18