Search code examples
ioswatchkit

WatchKit Long Look Notification not showing up


I set up a dynamic long look interface. I'm running the app on a watch with an iBeacon.

When the beacon comes in range I receive the static notification on the watch but when I keep looking the long look does not show up.

I set breakpoints on the first line inside didReceiveLocalNotification and on the first line of didReceiveRemoteNotification. It doesn't break because it's never getting called.

Any thoughts on where to begin looking for why?


Solution

  • I figured it out.

    1) When you click "has a dynamic interface" in the static notification, Xcode creates a notification category called "myCategory". I hadn't set my notification category to match that.

    2) I removed "myCategory" and left it at "default" thinking that this would work because it was the only dynamic notification. No dice.

    3) I set the category of my notification and matched in the notification category and now it works fine.

    Hope this helps someone else.