Hello,
I have two questions about new widgets :
First I can't access my iCloud keyValues from new widgets, is it normal ? I configured correctly app capabilities.
That's a big problem we have on watchOS too and I don't understand why it's still not available.
Second, in WWDC apple say a timeline is typically 24hours.
Should we make 24hours if possible ? My timeline is for a week because it's a schedule but I could do a shorter and refresh each 24 hours without problems.
I have two questions about new widgets :
First I can't access my iCloud keyValues from new widgets, is it normal ? I configured correctly app capabilities.
That's a big problem we have on watchOS too and I don't understand why it's still not available.
Second, in WWDC apple say a timeline is typically 24hours.
Should we make 24hours if possible ? My timeline is for a week because it's a schedule but I could do a shorter and refresh each 24 hours without problems.
Using the iCloud Key Value store in an extension should work, although it can be a little tricky to set up. One key element is that you need to configure both the app and the extension for the key value storage capability, and you should set the com.apple.developer.ubiquity-kvstore-identifier to the same value. I would configure the app first, then copy the default identifier that Xcode configures in the entitlement over to the extension after configuring it there.
One other thing to note is that the extension won't be able to access the KV store if the device is not signed into iCloud (or more specifically, does not have iCloud Drive enabled). In that scenario you would need to fall back, either to just storing information in a shared app group container or by indicating that data isn't available in the widget and the user should sign into iCloud.
Hope that helps some. If you have trouble getting this working, I'd suggest contacting our Developer Technical Support group: https://developer.apple.com/support/technical.
One other thing to note is that the extension won't be able to access the KV store if the device is not signed into iCloud (or more specifically, does not have iCloud Drive enabled). In that scenario you would need to fall back, either to just storing information in a shared app group container or by indicating that data isn't available in the widget and the user should sign into iCloud.
Hope that helps some. If you have trouble getting this working, I'd suggest contacting our Developer Technical Support group: https://developer.apple.com/support/technical.