Post

Replies

Boosts

Views

Activity

Reply to Settings.bundle in iOS 18 seems to no longer work.
Your suggestion to look at the raw .plist XML was interesting. I also tried this and manually keyed in a Multi-Value option and it appears to work now? I slowly copy-pasted from an older plist to the new one and was able to get them all working. Unclear if it is a legacy project issue in Xcode or something else, but I can confirm that I was able to get multi-values working by editing the raw file.
Sep ’24
Reply to Settings.bundle in iOS 18 seems to no longer work.
Although I cannot be 100% sure this is the or a potential cause, I can reproduce this broken behavior. If you make a new project in Xcode and add a settings bundle, it will work 'out of the box' - and you'll see the sample settings populated in the template. They have String, Checkbox, and Slider. If however you add a multi-value option, the settings bundle will disappear. If you remove the multi-value option, clean the build folder, and redeploy, you should see the sample setting controls again. So this is possibly either a change in how multi-values are supposed to work or a bug. I guess the workaround would be to not have multi-value options in the short term but that seems a little user-unfriendly for a shipping app.
Sep ’24
Reply to HoverEffectComponent on one child highlights all siblings in an Entity?
So this is probably a bug. Here's two functions that should produce mostly identical results (and at a minimum enable highlighting on any entity that has 'park' in the name): extension Entity { func applyComponentsRecursively() { if self.name.contains("_8_") || self.name.contains("_9_") || // ... additional fifteen clauses ... self.name.contains("_26_") || self.name.contains("_30_") || self.name.contains("parking") || self.name.contains("retail") || self.name.contains("hotel") { self.components.set(HoverEffectComponent()) } // Recursive call for all child entities for child in self.children { child.applyComponentsRecursively() } } } extension Entity { func applyComponentsRecursively() { // Check if the entity's name contains "park" if self.name.contains("park") { self.components.set(HoverEffectComponent()) // Recursive call for all child entities for child in self.children { child.applyComponentsRecursively() } } } Most of the components in the USDZ have names that work with both the first and second if-thens: 'park_1_1','park_9_4' etc. But the top one works, and the bottom one doesn't (I've seen it either highlight every entity or no entity). I don't have time to debug this further but if I can find an easily reproducible case I'll file a feedback item on this.
May ’24
Reply to Preventing ioError with ArchiveStream.process
So if I use .none for ArchiveCompression I do not see the crashing behavior: guard let compressStream = ArchiveByteStream.compressionStream( using: .none, writingTo: writeFileStream) else { throw DocumentError.compressionStreamCreationFailed } // .lzfse, .zlib, .lzma, .lz4 all sporadically fail Is there any compression type that reliably works with a UIDocument uploaded to iCloud?
Dec ’23
Reply to Preventing ioError with ArchiveStream.process
In looking at this problem, I have determined that the file I have that is the generated archive, the uploaded archive, and the downloaded archive are all the same size. I also was able to determine that the standard Archive Utility can successfully decompress a 'good' archive that doesn't crash the app, and won't decompress a 'bad' archive. Lastly I am compressing and archiving the same data each time, so now I am wondering if there is a nuance in the compression I am missing.
Dec ’23
Reply to SwiftData and command line
It would be great to have even the most bare-bone sample code that illustrates this concept for the CLI template. The build setting for the Info.plist is findable and thanks so far for the pointer to that, but it's only the first step. For example, if you take the default @Model from the app template and want to just inspect the context: import Foundation import SwiftData @Model final class Item { var timestamp: Date = Date() init(timestamp: Date) { self.timestamp = timestamp } } let bundleIdentifier = Bundle.main.bundleIdentifier let container = try ModelContainer(for: Item.self) Task { let context = await container.mainContext print(context.autosaveEnabled) // or actually something useful from the ModelContext like real data } This doesn't compile (and is likely architected horribly) and while I'm sure the ModelConfiguration documentation is the right place to start, it's too opaque to string together. Understandable that not everyone wants to use SwiftData this way, but it seems odd that if I want to propagate some test data to a container I have to make up a UI-based app where I don't want the UI.
Nov ’23
Reply to Speech Recognizer Transcription in Scrumdinger - Stops too early?
Just in case people come across this, if you choose a different quality of service when setting up the DispatchQueue in transcribe(), performance is much improved. I set it to .default and it then happily translated over the Internet at near real time on an iPhone 12. It's unclear if this would be the optimal choice in a production application, but for better understanding the transcription capabilities of iOS it seems to be a better choice than .background.
Jul ’22