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?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
How to enable developer mode on Apple Watch with watchOS 9 beta?
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?
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?
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.
The requestReview() method of SKStoreReviewController is deprecated in iOS 14 beta. There is a new requestReview(in windowScene: UIWindowScene), but with the App structure in SwiftUI, there is no UIWindowScene. How to request app review?
In SwiftUI, how to display a [Link<Text>]?
My app supports English and another language. The English string catalog is empty. Running the app in English in Xcode 15 beta 3, all strings are displayed in capital letters. It seems the behavior when translations are missing. Do we need to translate each English key into the same English translation, or is it a bug?
In Xcode 15 beta 3 and iOS 17 beta 3, my app with SwiftData keeps generating error:
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<NSManagedObject 0x2811cb390> setValue:forUndefinedKey:]: the entity dataSets is not key value coding-compliant for the key "(null)".'
I have a model:
@Model final class Station: Sendable {
...
var dataSets: [String]
}
The error seems to occur when saving entities of the model in SwiftData. There is no entity named "dataSets". Only a property in the above model. What's the null key in the error?
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))
}
I'm trying to convert s String property of a Sendable structure to LocalizedStringResource, so that Xcode extracts it into the string catalog. There is a warning since LocalizedStringResource is not Sendable currently.
I keep getting crashes with the following error in Xcode 15 beta 7:
CoreData: debug: PostSaveMaintenance: fileSize 15009192 greater than prune threshold
CoreData: annotation: PostSaveMaintenance: wal_checkpoint(TRUNCATE)
Is 15M bytes too much data?
CIFormat static var such as RGBA16 give concurrency warnings:
Reference to static property 'RGBA16' is not concurrency-safe because it involves shared mutable state; this is an error in Swift 6
Should all these formats be static let to suppress the warnings (future errors)?
I'm calling the following function in a SwiftUI View modifier in Xcode 16.1:
nonisolated function f -> CGFloat {
let semaphore = DispatchSemaphore(value: 0)
var a: CGFloat = 0
DispatchQueue.main.async {
a = ...
semaphore.signal()
}
semaphore.wait()
return a
}
The app freezes, and code in the main queue is never executed.
With respond() methods, the foundation model works well enough. With streamResponse() methods, the responses are very repetitive, verbose, and messy.
My app with foundation model uses more than 500 MB memory on an iPad Pro when running from Xcode. Devices supporting Apple Intelligence have at least 8GB memory. Should Apple use a bigger model (using 3 ~ 4 GB memory) for better stream responses?
Topic:
Machine Learning & AI
SubTopic:
Foundation Models