I want to get data from userDefaults to use in an Apple Watch app. I'm currently using WatchConnectivity. But for making session, the viewdidload should be open. Then the Phone only sends the data to the Watch when the iPhone app is loaded (viewDidLoad). To solve this, I want to use appGroupUserDefaults. But it doesn't work when I try to load the data in override func awake(withContext context: Any?) like this.
let loadedButtonList = appGroupUserDefaults.object(forKey: "Buttontitles")
if (loadedButtonList as? [String] != nil) {//do something}
It seems like loadedButtonList is nil. Can't I use appGroupUserDefaults in this watchOS version? And Does anyone know the way to share data like this without using WatchConnectivity??