Post

Replies

Boosts

Views

Activity

StoreKit sample project from Apple fails concurrency checks
I am trying to use code from Apple's sample project on StoreKit (Implementing a store in your app using the StoreKit API). However, even if I don't make any changes to this sample project except enable "complete" concurrency checking in the build settings, I get warnings like Capture of 'self' with non-sendable type 'Store' in a '@Sendable' closure. How worried should I be about these warnings and how can I fix them?
1
0
763
Dec ’23
Stop Xcode UITests running for light/dark and orientation permutations
I'm trying to run UITests just once. However, Xcode by default seems to run every permutation of light/dark color theme and device orientation and localizations. This means all UITests run 8 times (with 1 additional localization besides English). With tests that can take a couple minutes, the time to run all these adds up. Nothing in my UITest depends on the color theme, so I'd like to turn those permutations off always. The orientation and localization variations I might want sometimes but would generally also like to turn off. Questions: Can I disable any/all of these permutations? How can I get the locale string for the current run? I've tried using Locale(identifier: Locale.preferredLanguages.first!) but this just gets the device language, not the language being used on that run of the UI Test. Minimal reproducible example: Make a new SwiftUI app project in Xcode 15. Add a UI Testing Bundle target Add a localization in the general app settings, then add a string catalog called Localizable and at least one string's translation in that string catalog. Run a UITest Observe that it runs 8 times. Thanks for the help!
0
0
545
Nov ’23