Post

Replies

Boosts

Views

Activity

iOS app fails to run with Xcode 16, no issue with Xcode 15 (no build errors)
When I build and run my iOS app with Xcode 16.0 RC (16A242), it fails to run on both a physical iPhone (running iOS 18.0) and any iOS simulator (17.5, 18.0 RC tested). To be clear, this is an issue when running – there are zero build errors, and compilation always completes successfully. The same app, building and running from Xcode 15.4 (15F31d) runs on both a physical iPhone (same OS version) and an iOS simulator (same version) with no issues, and is currently deployed to TestFlight with no crashes at launch reported from users. Xcode 16's console logs the following: warning: (arm64) /Users/seb/Library/Developer/Xcode/DerivedData/Feed-bvzobcgzcnaibqbcwiasvpoxsetu/Build/Products/Debug-iphonesimulator/Feed.app/Feed empty dSYM file detected, dSYM was created with an executable with no debug info. No entry point found. Checked '(null)' I've so far tried a clean build, as well as clearing out my derived data folder entirely. Happy to provide any more info. Does anyone have any pointers as where I even start to debug this issue and narrow down on what's going on with Xcode 16?
11
3
7.3k
Sep ’24
SwiftData crash: PersistentModel.keyPathToString(keypath:)
I'm distributing an iOS (17.4+) and visionOS (1.2+) app via TestFlight that's using SwiftData. The most common crash by far is from SwiftData when deleting models from a context using a predicate (first snippet below), but so far I've been unable to reproduce it myself locally (second snippet below). I'm using SwiftData outside of SwiftUI views, via my own wrapper, and converting between my app models and SwiftData models. Does anyone have any ideas how I could potentially narrow this issue down (or reproduce), or know of any similar issues? Thanks! — Seb do { try context.transaction { context in let predicate = #Predicate<PersistedFeed> { $0.id == id } do { try context.delete(model: PersistedFeed.self, where: predicate) } catch { // .. Omitted for brevity } } } catch { // .. Omitted for brevity } Crash: Thread 0 Crashed: 0 libswiftCore.dylib 0x000000018dd558c0 _assertionFailure(_:_:file:line:flags:) + 264 (AssertCommon.swift:144) 1 SwiftData 0x000000022f7f323c static PersistentModel.keyPathToString(keypath:) + 1496 (DataUtilities.swift:0) 2 SwiftData 0x000000022f83312c PredicateExpressions.KeyPath.convert(state:) + 492 (FetchDescriptor.swift:394) 3 SwiftData 0x000000022f834a24 protocol witness for ConvertibleExpression.convert(state:) in conformance PredicateExpressions.KeyPath<A, B> + 16 (<compiler-generated>:0) 4 SwiftData 0x000000022f830a70 PredicateExpression.convertToExpressionOrPredicate(state:) + 724 (FetchDescriptor.swift:203) 5 SwiftData 0x000000022f831874 PredicateExpression.convertToExpression(state:) + 36 (FetchDescriptor.swift:217) 6 SwiftData 0x000000022f83b6c8 PredicateExpressions.Equal.convert(state:) + 328 7 SwiftData 0x000000022f8360ec protocol witness for ConvertibleExpression.convert(state:) in conformance PredicateExpressions.Equal<A, B> + 64 (<compiler-generated>:0) 8 SwiftData 0x000000022f830a70 PredicateExpression.convertToExpressionOrPredicate(state:) + 724 (FetchDescriptor.swift:203) 9 SwiftData 0x000000022f82fd60 PredicateExpression.convertToPredicate(state:) + 28 (FetchDescriptor.swift:224) 10 SwiftData 0x000000022f82edb4 nsPredicate<A>(for:) + 956 (FetchDescriptor.swift:88) 11 SwiftData 0x000000022f807c2c ModelContext.delete<A>(model:where:includeSubclasses:) + 596 (ModelContext.swift:1846) 12 SwiftData 0x000000022f81994c dispatch thunk of ModelContext.delete<A>(model:where:includeSubclasses:) + 56
1
2
461
Jun ’24
Guidance on 'responsiveData' URL request network service type
The documentation of the responsiveData network service type simply says "A service type for data that the user is actively waiting for." Reading an NSHipster post from when this was introduced in iOS 12: ...guidance from the engineers presenting WWDC 2018 Session 714: “Optimizing Your App for Today’s Internet” is to use this feature judiciously, only when time is of the essence. The example they provide is “the checkout page for a shopping app”... My question: how far does 'responsive' extend to other use cases? In an app where the user primarily interacts with a list of friends or a list of chats for example, would fetching this list of friends or chats fall under the 'responsive data' type, or would that primarily be used for instant messaging itself?
1
0
590
Jun ’21
Is my understanding of kSecAttrAccessible– WhenUnlocked & AfterFirstUnlock correct?
For kSecAttrAccessibleWhenUnlocked, data is accessible "while the device is unlocked by the user", while for kSecAttrAccessibleAfterFirstUnlock data is accessible after the first unlock by the user "until the next restart" according to Apple's documentation. In this use case timeline: Turn on device Unlock device Lock device Unlock device Restart device Unlock device Would the following be correct? For WhenUnlocked, data is available: Between 2 and 3 Between 4 and 5 After 6 AfterFirstUnlock, data is available: Between 2 and 5 After 6 Thanks!
1
0
618
Jun ’21