Post

Replies

Boosts

Views

Activity

Complication update
In Providing Data for Your Complication: When the user first places your complication on the active watch face, ClockKit asks for the complication’s initial set of timeline entries. After that, however, it doesn’t typically request additional timeline entries until you explicitly update your timeline.In Creating a Timeline Entry: ClockKit periodically requests timeline entries from your complication’s data source, both to load the current timeline entry and to batch load future timeline entries.They are contradictory. Which is true?
0
0
788
Dec ’19
Transaction revocationDate
When testing an auto-renewable subscription with StoreKit 2 in Xcode 13 beta 3, the purchase transaction revocationDate is 2001-01-01, which prevents the app to verify the subscription. It should be nil, since there is no simulation of refunding or revocation in the test. Is it a bug in StoreKit 2?
1
0
855
Jul ’21
Turn off white balance
I'm trying to measure light quality with the camera, not to capture good looking photos. How do I get raw camera sensor data, without processing such as white balance? If I lock white balance mode when setting up capture session as following, will white balance be turned off during the session? if device.isWhiteBalanceModeSupported(.locked) { device.whiteBalanceMode = .locked }
0
0
506
Oct ’21
Navigation: update multiple times per frame
After updating to NavigationStack with nested navigation links (with navigation links in a navigation destination), I see a lot of warnings in Xcode 14 beta: Update NavigationAuthority bound path tried to update multiple times per frame. Update NavigationAuthority possible destinations tried to update multiple times per frame. The app often freezes when navigated with a NavigationLink. Do others see these problems?
24
17
15k
Jun ’22
Value based colors
How to create a chart where each data mark has a color based on its value? Like this chart: https://observablehq.com/@d3/gradient-encoding With the following code, the whole curve has one color only. My function Color.forTemperature() returns different colors for different temperatures. Chart(temperatures) { temperature in LineMark(     x: .value("Day", temperature.date, unit: .day),         y: .value("Temperature", temperature.value)     ) .foregroundStyle(Color.forTemperature(temperature.value)) }
2
0
1.6k
Jun ’22
App group shared user defaults
In iOS 16 beta 3, my iOS app sets some strings in the shared user defaults of the app group. The iOS widget extension reads the strings from the shared user defaults correctly, but the watchOS app and watchOS widget extension could not read them (get nil). Integers stored in the shared user defaults can be read everywhere. All targets are in the same app group. Does anyone have similar problems?
7
0
5k
Jul ’22
@Observable and @AppStorage
Converting class Model: ObservableObject { @AppStorage("prop0") var prop0 = 0 } to @Observable struct Model { @AppStorage("prop0") var prop0 = 0 } created error: Property wrapper cannot be applied to a computed property How can properties of @Observable models be saved in user defaults?
6
6
2.8k
Jun ’23
cannot open file
Running my app with SwiftData in iOS 17 beta on iPhone leads to error: cannot open file at line 46973 of [554764a6e7] os_unix.c:46973: (2) open(/private/var/mobile/Containers/Data/Application/ED4308D5-058B-41BC-A617-A46F9754E3EC/Library/Application Support/default.store) - No such file or directory API call with unopened database connection pointer misuse at line 179760 of [554764a6e7] It seems the database file has not been created yet, since it's the first time running the app with SwiftData.
5
1
1.2k
Jun ’23