Dive into the vast array of tools and services available to developers.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

UI Test Cases Failing with Custom Accessibility Labels in SwiftUI
Hello Apple Developer Support, I am writing to seek assistance with an issue we are experiencing in our SwiftUI application concerning UI test cases. Our application uses accessibility labels that differ slightly from the display content to enhance VoiceOver support. However, we have encountered a problem where our UI test cases fail when the accessibility label does not match the actual display content. Currently, we are using accessibility identifiers in our tests, but they only retrieve the accessibility label, leaving us without a method to access the actual display content. This discrepancy is causing our automated tests to fail, as they cannot verify the visual content of the UI elements. We would greatly appreciate any guidance or solutions you could provide to address this issue. Specifically, we are looking for a way to ensure our UI tests can access both the accessibility label and the actual display content for verification purposes. For ex: Problem scenario - setting accessibilityLabel masks access to any displayed content If an accessibilityLabel is set on a UI element, then it seems to be no-longer possible to check/access the displayed content of that element: var body: some View { Text("AAA") .accessibilityIdentifier("textThing") .accessibilityLabel("ZZZ") // Different label from the text which is displayed in UI } // in test... func test_ThingExists() { XCTAssert(app.staticTexts["AAA"].exists) // Fails, cannot find the element XCTAssertEqual(app.staticTexts["ZZZ"].label, "AAA") // Fails - '.label' is the accessibilityLabel, not the displayed content XCTAssertEqual(app.staticTexts["ZZZ"].label, "ZZZ") // Passes, but validates the accessibility content, not the displayed content XCTAssert(app.staticTexts["textThing"].exists) // Passes, but does not check the displayed content XCTAssertEqual(app.staticTexts["textThing"].label, "AAA") // Fails - '.label' is the accessibilityLabel, not the displayed content XCTAssertEqual(app.staticTexts["textThing"].label, "ZZZ") // Passes, but validates the accessibility content, not the displayed content } element.label still only checks the accessibilityLabel. There is not, it seems, an way back to being able to check the content of the Text element directly. Thank you for your attention and support. We look forward to your valuable insights.
1
1
135
Mar ’25
Unexpected performance penalty attributed to first Swift Testing test
I have a Swift package with a test suite that contains some tests implemented with Swift Testing. Locally, they run quickly, but when I run them on Semaphore CI (https://semaphore.io), the first Swift Testing test to execute incurs a performance penalty. I'm running the tests with xcodebuild on iOS Simulator: xcodebuild test \ -scheme "Scheme" \ -workspace Workspace.xcworkspace \ -destination "platform=iOS Simulator,name=iPhone 16,OS=18.2" The scheme is configured to use a test plan that has parallelization disabled. Here's an excerpt from the output showing what I'm seeing: Test Suite 'All tests' started at 2025-04-03 07:47:37.328. ◇ Test run started. ↳ Testing Library Version: 102 (arm64-apple-ios13.0-simulator) ◇ Iteration 1 started. ◇ Suite <redacted> started. ◇ Test foo() started. ✔ Test foo() passed after 23.063 seconds. When foo() is not the first test it runs in under 100 ms. The reason that I have parallelization disabled is that I was initially seeing all of the tests in this suite incur a performance hit. But now it's clear that there must be some startup cost. Things I'm wondering: What is this startup penalty? Why don't I encounter it locally? Why is it attributed to the first test? (this seems like a bug) My wild guesses around 1 so far have been… maybe some simulator clone is booting. I've tried to rule that out by disabling parallelization, but maybe there's still something there. maybe swift testing is getting loaded lazily and there's some kind of dynamic linking cost Thoughts on 2… maybe there's some one-time penalty when using swift testing that I've already incurred locally but that has not yet been incurred in the CI image Guidance welcome! x-posted: FB17102970 (Unexpected performance penalty attributed to first Swift Testing test) https://forums.swift.org/t/first-swifttesting-test-always-slow/79066
1
0
86
Apr ’25
Flutter IOS deep links
Hello all, I am building a simple Flutter app, and I want to support entering the app through an email. I have used flutter deep links on android and all works well, but for some reason on IOS it doesnt. What I have achieved: When clicking the link I do get navigated into the app, but I get navigated to whatever the last screen was, regardless of the path in the URL. Furthermore, the logical code inside the app doesnt seem to run either - no logs are printed etc. I have even tried following the flutter tutorial at https://docs.flutter.dev/cookbook/navigation/set-up-universal-links to the letter, and it doesnt work I am using: Flutter 3.22.3 Go Router 14.2.7 Thanks in advance
1
0
179
Feb ’25
Flutter: abnormal delay on iOS in position recovery on first opening
Good morning everyone, I am developing a Flutter app for Android and iOS. When I press a button, the app detects the location of the device (obviously with permissions already granted). On Android everything works correctly. On iOS, however, when I press the button for the first time after opening the app, the location is detected after about 30-50 seconds. On the other hand, if I repeat the operation later, the response time is drastically reduced (only a few seconds). I am using the location package (https://pub.dev/packages/location), and the code to get the location is as follows: var currentLocation = await location.getLocation(); Has anyone experienced this problem before or knows how to solve it? Thank you very much! Federico
1
0
190
Sep ’25
Regarding Launch Screens
When building an app with iOS26 beta3, I received a warning saying "Launch screens will soon be required." Does this mean that, similar to the thread below, the app might not launch in builds for iOS27 and later (including iOS27)? https://developer.apple.com/forums/thread/789004
1
0
114
Jul ’25
.Net MAUI (Windows & Mac)
Hello, I have created a .NET MAUI application in Windows Visual Studio 2022. Also I have a MAC fully configured with latest Visual Studio for MAC and Xcode Installed. When pairing the MAC for windows machine I am able to run the simulators for various IPhone devices(as they are attached to MAC) but when I try to run for the MacCatalyst from my Windows machine it doesnt work. Is it possible to create a build for the MAUI application for MacCatalyst from my windows machine.The build should be created in my Windows folder directory.?
1
0
567
Feb ’25
La version IOSOS 18.3.1 PARA IPAD AIR 5 GENERACION NO ESTA DISPONIBLE
How do I download the iPad Air (5th generation) 18.3 simulator? I activated my Mac and only have version 18.2 available. I need to test the simulator that they are testing, but I can't because I don't have version 18.3 available. I only have the iPad version 18.2 available and the application works fine on that version. I have already added logs in different parts of the application, but in the files that you shared with me no log appears. The macOS operating system is macOS Drought.
1
0
319
Feb ’25
Error when building Maui project for macCatalyst
I'm trying to build and run a Maui project but keep getting the following error: I'm using JetBrains Rider and I have it set not to build for iOS but I can't seem to get past this message. I'm using an Apple Silicon Mac, the project is cross platform, builds and runs fine on Windows. The problem seems to be with libSDL2.a. Has anyone encountered this error before? If so any suggestions on what to do about it?
1
0
446
Nov ’24
Permission Folder
Hello everybody! I would like some help to resolve the error "/usr/bin/openssl" x509 -noout. I've tried different ways but it persists. I'm using Delphi (Embarcadero) version 12, I've also tried with 11 and without success. I use MacMini version 15.2. What could be causing this error Thank you in advance
1
0
229
Feb ’25
Xcode Preview Crashes: "xcpreviewagent crashed because Alamofire.framework is missing"
Question: I have created a workspace containing a SwiftUI app and two frameworks: B Framework: Handles UI components C Framework: Handles service classes I added a Podfile to manage dependencies. My Podfile is structured as follows: inhibit_all_warnings! workspace 'ABC.xcworkspace' def shared_pods # Shared pods here pod 'Alamofire' end target 'A' do use_frameworks! project 'A/A.xcodeproj' shared_pods end target 'B' do use_frameworks! project 'B/B.xcodeproj' shared_pods end target 'C' do use_frameworks! project 'C/C.xcodeproj' shared_pods end post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' end end end After installing pods and building the project, everything works fine except for Xcode’s SwiftUI Preview, which crashes with the following error: xcpreviewagent crashed because Alamofire.framework is missing Question: How can I resolve this issue and make SwiftUI Previews work without Xcode crashing?
1
1
410
Feb ’25
dyld assertation failure during linking w/ custom codegen
I am working on adding Objective-C ABI support to DLang and currently I'm getting the following error when linking with ld. Assertion failed: (fixups().size() == 1), function classTarget I'm curious as to why I am getting this error, looking at the objective-c runtime source, i have not applied any of the fixup flags to any protocol definitions. From my understanding, the source of the linker is not available so it's a bit on the difficult side to determine which part is wrong. The source of my pull-request is available here: https://github.com/ldc-developers/ldc/pull/4777
1
0
447
Nov ’24
Auth with app specific password to access SearchAds API
Hi I'm building native app for SearchAds. Is it possible to use app specific password with SearchAds API or get a token using app specific password? I know its possible using JWT: https://developer.apple.com/documentation/apple_search_ads/implementing_oauth_for_the_apple_search_ads_api But using that in the app is not very user friendly even if the app will generate public and private keys.
1
3
471
Nov ’24
Automatic process in assembling app and send to Apple Store
Hello! We would like to know the steps required to build an application and submit it to the Apple Store using an automated process on a server. Here are our conditions: We have a server running macOS Sonoma 14.6.1 on Amazon EC2. Xcode 16.1 (Build version 16B40) is installed. We use only console commands, as the GUI is not available. We use Cordova to add the iOS platform to the application. A private key, certificate, and provisioning profile have already been created and are located on the server. Could you please clarify: What commands are needed to configure the Keychain to use the certificate and provisioning profile? How can we build the application using xcodebuild? What are the steps to sign and submit the application to the App Store with minimal human interaction? Thank you in advance for your assistance!
1
0
322
Feb ’25