Post

Replies

Boosts

Views

Activity

XCTest UI Testing; boundElementsByIndex stale the main thread
Hi community: I found that after Xcode update from 14.3.1 to 15.0.1, my UITests fail only on the CI (Apple Xcode Cloud) because the use of boundElementsByIndex. Seems that the use of this property stale the main thread: Failed to resolve query: Unable to perform work on main run loop, process main thread busy for 30.0s Is it a known issue? Thanks
8
1
1.7k
Aug ’24
Xcode cloud errors
Hi community: I'm coming across two error types on Xcode cloud during ui tests. encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Test crashed with signal kill before starting test execution. If you believe this error represents a bug, please attach the result bundle at /Volumes/workspace/resultbundlexcresult)) encountered an error (Failed to prepare device 'Clone 7 of iPhone 14 Pro' for impending launch. If you believe this error represents a bug, please attach the result bundle at /Volumes/workspace/ resultbundle.xcresult. (Underlying Error: Unable to boot the Simulator. launch failed to respond. (Underlying Error: Failed to start launch_ sim: could not bind to session, launchd_sim may have crashed or quit responding))) Any ideas on how to solve them? Thanks
6
1
2.4k
Dec ’24
SwiftUI View cannot conform custom Equatable protocol in Swift 6.
In Swift 6, stricter concurrency rules can lead to challenges when making SwiftUI views conform to Equatable. Specifically, the == operator required for Equatable must be nonisolated, which means it cannot access @MainActor-isolated properties. This creates an error when trying to compare views with such properties: Error Example: struct MyView: View, Equatable { let title: String let count: Int static func ==(lhs: MyView, rhs: MyView) -> Bool { // Accessing `title` here would trigger an error due to actor isolation. return lhs.count == rhs.count } var body: some View { Text(title) } } Error Message: Main actor-isolated operator function '==' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode. Any suggestions? Thanks FB: FB15753655 (SwiftUI View cannot conform custom Equatable protocol in Swift 6.)
6
0
964
Mar ’25
onOpenURL(perform:) vs application(_:open:options:)
Hi, community: I was trying to move from application(_:open:options:) (UIKit) to onOpenURL(perform:) (SwiftUI). Maybe there's something that I'm missing. In UIKit you can say to the system that you won't handle the URL then the app is not opened, but when I use onOpenURL(perform:) it is always opened. Is there any way to achieve the same behavior? Thanks in advance.
4
0
1.5k
May ’24
requiresDNSSECValidation sample over request
Hi community: I'm trying to discover how the dnssec api works, but I cannot get a sample that works with it. Maybe I'm wrong with the requirements; if it is please, clarify it to me. So what I understood. All DNS zones (which respond to TLS listed here https://manage.whois.com/kb/answer/2998) have a way to say, hey I'm who I am. So without any extra configuration, we can use the new API. Is that right? So the code that I did, see the next code let urlSession = URLSession.init(configuration: .ephemeral) if #available(iOS 16.0, *) { urlSession.configuration.requiresDNSSECValidation = true } var request = URLRequest(url: URL(string: "https://www.apple.com")!) if #available(iOS 16.1, *) { request.requiresDNSSECValidation = true } cancellable = urlSession .dataTaskPublisher(for: request) .retryWithDelay(retries: 2, delay: 2, scheduler: DispatchQueue.global(qos: .background)) .sink(receiveCompletion: { result in if case let .failure(error) = result { print("Error \(error)") } }, receiveValue: { (data: Data, response: URLResponse) in print("It Works") Result: Task finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001, UserInfo={_kCFStreamErrorCodeKey=-2102, NSUnderlyingError=0x600003d86130 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <040AB9E7-EFCB-4072-8357-E0149769BB9D>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(``` "LocalDataTask <040AB9E7-EFCB-4072-8357-E0149769BB9D>.<2>" ), NSErrorFailingURLStringKey=https://apple.com/, NSErrorFailingURLKey=https://apple.com/, _kCFStreamErrorDomainKey=4} The DNS I'm using is 8.8.8.8. Do you know any other DNS server that supports DNSSEC? If I remove requiresDNSSECValidation from request it works. Also, it's curious that even failing the receiveCompletion is never called. But if I use the dataTask` with completion it's called with the error. Thanks for the clarifications.
3
0
909
Jun ’23
Extensions and Widget localizations
Hi community: I'm experiencing an issue in iOS 17 where the Widgets and Extensions use the local device language instead of the app language (preferred languages displayed on the app settings). This issue was reproducible in iOS 16.1, but then was solved. Now it is back on iOS 17 and iOS 17.1 In terms of code, Locale.current in the app returns the language preference selection, even you can use bundle.main.preferredlanguages and get the first one (because there's a repetition from 2 to 3 times the same value) But in whatever extension, the app's preferred language cannot be got, it always returns the system's preferred language. @eskimo, Is it a known issue? Also, Xcode 15.3 shows 0 files localized when you use the strings catalog. I appreciate any help you can provide.
3
0
1.3k
Sep ’24