I have ios UI tests that are build with command
xcodebuild -workspace ... -scheme ... -configuration ... -derivedDataPath ... -destination ... -testPlan ... build-for-testing
Then I run them with
xcodebuild -destination ... -resultBundlePath ... -parallel-testing-worker-count ... -xctestrun ... test-without-building
I also have following settings in testplan
"maximumTestRepetitions" : 3,
"testRepetitionMode" : "retryOnFailure",
With xcode 16.4 tests were retried on failure up to 3 times, but migrating to xcode 26.2 seems to change this behavior and tests are no longer retried. Is it expected behaviour and I should manually add params like -test-iterations 3 -retry-tests-on-failure into xcodebuild test-without-building command?
Here is xcresult - https://drive.google.com/file/d/1xHgiZnIK_lptDSUf-fCyEnT9zYubZlCf/view?usp=sharing
And testrun file -https://drive.google.com/file/d/1aBi2sTjy8zFYtgYn1KA60T8gwD_OnBCF/view?usp=sharing
Testing
RSS for tagDetect issues like logic failures, UI problems, and performance regressions by running tests on your app.
Posts under Testing tag
68 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
On iOS 18, when XCUITest encounters an "Application has not loaded accessibility" error after the 60 second timeout, it performs an undocumented auto-recovery ("Setting up automation session") instead of halting the test as documented. This leaves the XCUITest framework in a corrupted state, causing subsequent tests in the same session to fail with unexpected behavior.
Expected Behavior (per Apple documentation):
Any failure in the launch sequence will be reported as a test failure and the test will be halted at that point.
Actual Behavior:
XCUITest waits 60 seconds for accessibility to load
Logs "Application has not loaded accessibility" error
Instead of halting, performs "Setting up automation session" (auto-recovery)
Test continues with corrupted framework state
Subsequent tests in the same session fail with phantom element queries
Steps
Run XCUITest suite on a real iOS 18 device
Have an app with moderately heavy initialization (e.g., synchronous network operations during bootstrap)
Observe intermittent "accessibility not loaded" errors
When error occurs, subsequent tests fail with unexpected behavior
Test Logs Evidence
First test (accessibility failure + recovery):
t = 11.11s Wait for accessibility to load
t = 71.14s Capturing diagnostic spindump
t = 76.24s Assertion Failure: Application 'com.example.app' has not loaded accessibility
t = 76.26s Setting up automation session ← Undocumented recovery
t = 77.29s Tear Down
Second test (corrupted state):
t = 35.01s Tap "signin-button"
t = 35.55s Waiting for "bannerButtonStackFirstItem" ← Query NOT in test code!
t = 40.58s Assertion Failure: Failed to find element
The second test executes element queries that do not exist in its source code, indicating leaked/corrupted state from the previous test's failed recovery.
Note: The tearDown() method terminates the app but cannot reset the internal state of the XCUITest framework itself, so corruption persists across tests.
We are observing this behavior consistently on iOS 18 real devices. We would like to know:
Is this a known issue with XCUITest on iOS 18?
Is anyone experiencing similar "accessibility not loaded" failures followed by auto-recovery?
Is the "Setting up automation session" recovery behavior intentional or a bug?
Is there a recommended workaround to prevent framework state corruption between tests?
Hi all,
We can’t install our app from TestFlight. The app is visible in TestFlight for invited internal testers, but tapping Install fails immediately with:
“The requested app is not available or doesn’t exist.”
--Setup--
Distribution: TestFlight – Internal Testing
Internal group created and testers added (invite accepted)
Build processing status in App Store Connect: Complete
TestFlight build status shows: Ready to Submit / Prepare for Submission
Minimum iOS deployment target: iOS 15.0
Version/Build: 1.0.0 (1)
What we tried
Confirmed tester is signed into TestFlight with the same Apple ID email that was invited
Removed/added testers to the internal group and resent invites
Reinstalled TestFlight, signed out/in
Verified build is assigned to the internal group
Set and saved Monetization → Pricing and Availability → App Availability (All Countries/Regions)
Question
Has anyone resolved this issue? Is there a known TestFlight/App Store Connect stuck state that causes this error even for internal testing? Any recommended steps (new build number, group reset, availability/pricing settings, etc.)?
Screenshots available (TestFlight error + App Store Connect build/group view).
Thanks.
Topic:
App Store Distribution & Marketing
SubTopic:
TestFlight
Tags:
App Store
App Store Connect
TestFlight
Testing
Since I moved to Xcode 26.1 and Xcode 26.2 then, my UI tests all fail only for iOS 26+, for both simulator and real device.
Everything worked perfectly with Xcode 26.0, and the code base of the application under test and the test cases are the same. With Xcode 26.0, the tests pass for iOS 26+ and iOS < 26, for both simulator and real device.
In addition, even the Accessibility Inspector tool fails to display the view hierarchy for iOS 26+ with Xcode 26.2. With Xcode 26.0, whatever are the devices and the OS versions, the tool was able to display the view hierarchy. Otherwise the tool is empty even if the device and app are selected.
This failing tests issue occurs both on my local environment and on GitHub Actions runners, excluding the hypothesis I have troubles with my own side.
The error message for failing tests explains the element cannot be found anymore.
Given for example the test case:
@MainActor
func testMakeScreenshotsForDocumentation_Button() {
let app = launchApp()
goToComponentsSheet(app)
waitForButtonToAppear(withWording: "app_components_button_label", app)
tapButton(withWording: "app_components_button_label", app)
tapButton(withWording: "Strong", app)
takeScreenshot(named: "component_button_", ACDC.buttonX, ACDC.buttonY, ACDC.buttonWidth, ACDC.buttonHeight, app)
}
the goToComponentSheet(app) line shows the error:
ActionsDocumentationScreenshots.testMakeScreenshotsForDocumentation_Button()
In details the function:
/// Opens the page of the components, i.e. tap on the 2nd of the tab bar
@MainActor func goToComponentsSheet(_ app: XCUIApplication) {
app.tabBars.buttons.element(boundBy: 1).tap()
}
with the following error on the app.tabBars line:
.../AppTestCase.swift:157 testMakeScreenshotsForDocumentation_Button(): Failed to tap Button (Element at index 1): No matches found for Descendants matching type TabBar from input {(Application, pid: 1883)}
I have the feeling with Xcode 26.2 (and Xcode 26.1) the view hierarchy is not accessible anymore for both XCUITest framework and Accessibility Inspector tool.
Note I have on my side macOS Tahoe 26.1 (25B78) and my GitHub Actions runner are on macOS 26.0.1 (25A362). When I used Xcode 26.0 I was on macOS Tahoe 26.1 (25B78) .
Any ideas? 🙂
Although the application functions correctly when deployed locally to a physical iPhone using Flutter (direct debug/development build via Xcode), we are encountering the following issues only within App Store Connect / TestFlight:
1- Internal Testing Issue:
After completing all required steps in App Store Connect and adding internal testers, testers are unable to install the app. TestFlight displays the error:
“Could not install app. The requested app is not available or doesn’t exist.”
2- External Testing Issue:
When attempting to add a processed build to an External Testing group (Public Link), App Store Connect returns the following message:
“There was an error processing your request. Please try again later.”
The build has successfully uploaded and processed, and is marked as Ready to Submit in TestFlight. These issues do not occur during direct device deployment and appear to be isolated to TestFlight / App Store Connect.
We would appreciate guidance on how to solve this issue which is preventing TestFlight distribution.
*Note: we tried multible builds and upgraded the version 4 times, and we signed all agreements.
Topic:
App Store Distribution & Marketing
SubTopic:
TestFlight
Tags:
App Store Connect
TestFlight
Testing
Hello, I have a question about running tests on multiple simulators.
Currently, my company has a WDIO+Appium test suite with XCUITEST driver that runs on a single simulator through a mockttp proxy (we are intercepting and mocking some of the responses from our APIs and pass through the rest). In order to route the traffic we are currently using 'networksetup -setsecurewebproxy '. Everything works as expected.
With growing number of tests we'd like to scale number of simulators on a single host to 3-5. We have a working setup but the problem are system-wide proxy settings routing traffic from multiple simulators, which we can't distinguish by UDID or any other means, we know of. We can spin multiple mock servers on the same machine but we are struggling to find the way to route the traffic on a simulator basis.
In the end, both options are viable:
1 mock server running for multiple simulators
N number of mock servers for N number of simulators
Has anyone had the same/similar problem? How to approach this? We are currently running on Sequoia OSX and platform version 18.6. Thanks!
Like any good developer, I try to add tests where I can. The AgeRangeService.AgeRange type does not provide an initializer. I know the routine, create an interface or a simple struct that I control and use that instead. Thanks to extensive time with frameworks like Core Bluetooth or Core Location, this is a well understood practice (looking at you CBPeripheral...).
Great I'll make my own 'AgeRange' struct. Make it Hashable, make it Sendable, use the framework types as properties. Scratch that, most of the properties on AgeRangeService.AgeRange type are not Sendable and many are also not Hashable. This is proving to be challenging.
I hope to open source my little Swift Package wrapper library for DeclaredAgeRange which will add types with full Hashable and Sendable conformance. I hope Apple updates the API and makes this obsolete. I don't see why these simple types can't be Hashable and Sendable. They're structs, enums, and OptionSets (structs).
FB20959748 - DeclaredAgeRange: DeclaredAgeRangeAction is not sendable causing main actor compile errors with default isolation settings
FB20960560 - DeclaredAgeRange: AgeRangeService.AgeRangeDeclaration is not sendable as expected
FB20960574 - DeclaredAgeRange: AgeRangeService.ParentalControls is not sendable as expected
FB20960590 - DeclaredAgeRange: AgeRangeService.ParentalControls is not hashable as expected
On the note of the library and using the types as-is, there are some issues using the new cases in AgeRangeDeclaration and the isEligibelForAgeFeatures property. I started another thread over here: https://developer.apple.com/forums/thread/808144
Topic:
App Store Distribution & Marketing
SubTopic:
General
Tags:
Swift
Beta
Testing
Declared Age Range
In a modal dialog, when tabbing to next NSTextField, or programmatically selecting a NSTextField, the NSTextfField that is loosing focus (aka resigning FirstResponder) appears empty in Tahoe 26 ( aka not displaying its content) .
The same thing works oK in all systems before Tahoe.
Found no workaround this issue which looks to be a Tahoe problem.
i have a small app that demonstrate the issue.. but cannot be posted here due to zip format not accepted...
i appreciate any help or apple engineer attention to that issue also posted with Evaluation Assistant under #FB21102969
ThX
"UITests recording reports 'The capability "Create Service Socket" is not supported by this device.' on M1 chip, but works normally on Intel chip."
Hi Everybody!
I would like to develop an iOS app with MDM features and distribute it on App Store. The problem I got stuck with is how to QA-test the MDM features of such an app.
The app is not yet on App Store, it's under development. I can upload builds to App Store Connect, invite testers, they can test the app using TestFlight, all fine. But features that require an MDM configuration don't work since the app is not deployed via an MDM solution. It cannot be deployed via MDM since it's not an enterprise app and it's not on App Store yet. There are ways to work around this only for dev-testing (like a hardcoded configuration) but I need to give this to QA engineers.
AI answers suggest that Custom Apps in ASM/ABM might be the way out of this. Apple docs say I need to have the app reviewed by Apple first, only then can I assign it to organizations. But again, I need this for internal testing the app before releasing it. And before having to submit the build to Apple for approval.
I am quite sure it's possible to do this, there are apps on App Store with such features (Jamf Self Service), and other platforms provide a way (private store on Android) for internal testing, but I haven't been able to find the Apple solution yet. Any help would be appreciated.
Best regards,
Balazs
Topic:
App Store Distribution & Marketing
SubTopic:
General
Tags:
App Store
App Store Connect
Testing
Device Management
I am developing an app that allows the user to ask it to process the clipboard contents and do something with it.
In developing a XC UI Test, I find the app stops while it waits for the user to give permission. That breaks the automation.
I tried:
let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
let allowButton = springboard.buttons["Allow Paste"]
But that does not work. Is there a way to tell the framework to automatically give the test permission to access the Paste clipboard (or to allow me to write tests to grant this)?
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
Xcode
XCTest
Testing
Swift Testing
Hello Apples,
Noticed that after iOS 26.1 update the Xcode simulator seems to be prompting to login with Apple ID arbitrarily while working on some UI tests.
This does not happen with previous iOS 26.0 or 26.0.1 but is now causing trouble when launching the app or uninstalling at teardown. The current other issue with the uninstallation being sticky and taking a long time (waiting for springboard to become idle) is not helping either.
The dialog seems to appear a bit unreliably to be able to handle it correctly. Have tried both manual springboard dialog mapping and handling as well as an interruption monitor. The latter only seems to work for the first dialog which appears but then ceases to function so not much help…
Anyone else seeing this and are there any knowledge or good workarounds? Or should we just roll back to testing with previous OS versions and cross fingers for iOS 26.2?
Bottom line we cannot login with an Apple ID while running tests on a simulator…
As bonus noticed the simulator background images are not working?
Thanks!
BR,
ARu_ (Senior QE)
Since around September (iOS 26 release), i'm unable to test my app normally. It says "internet connection is required to verify [my certificate id]", or just crashing. All terms and conditions accepted, everything is valid, certificates are OK.
Reinstallation via xcode does not help. Removal of provisioning profile, generating new does not help. Revoking of certificate and generating new does for around week, then it happens again, but do i need to do it every week now?
In logs i see the following:
default amfid validation failed because of missing trust and/or authorization (0xe8008026)
error amfid not valid: 0xe8008026: The provisioning profile requires online authorization.
error amfid Unexpected MISError (0xe8008026): The provisioning profile requires online authorization.
default +0300 amfid /private/var/containers/Bundle/Application/5B8E560E-75B2-46EF-8606-02072D99E9CF//Frameworks/oss.dylib not valid: Error Domain=AppleMobileFileIntegrityError Code=-400 "An unknown error was encountered" UserInfo={NSURL=file:///private/var/containers/Bundle/Application/5B8E560E-75B2-46EF-8606-02072D99E9CF//Frameworks/oss.dylib, NSLocalizedDescription=An unknown error was encountered}
default kernel AMFI: code signature validation failed.
It looks like apple validation servers are not working, or is it iOS bug? All provisioning profiles are showing like "valid" in apple developer center.
My network is not behind a proxy, connection is direct.
If use EXACTLY the same app, signed with the same provisioning, same signature, on another test device, it works!
When i reset current device to default settings and installing the EXACTLY same app after it, it works as well.
Looking for a help from apple developer support
I'm working on moving XCTests to Swift Testing and trying to understand why it shows Testing Library Version: 102 (arm64-apple-ios13.0-simulator) when running. Why iOS 13?
I have an environment variable set in an xctestplan for a set of unit tests that I access like so:
let testType = ProcessInfo.processInfo.environment[TARGET_TEST_TYPE_KEY]
This is always is always returning nil when I run my unit tests in Xcode 26, but seems to work as expected in Xcode 16.4. Were there any changes in Xcode 26 that changes how this works?
Thanks in advance.
Hi *,
I'm trying to add a build for external testers.
Everything work fine up to the point where I have to provide the information about the contact person.
Entring the phone number always results in an error message that the phone number can only consits of numbers (what it really does).
Has anyone a hint how to fix this problem?
Peter
Summary
While parallel testing Core Location on the new iOS 26.1 beta (23B5044i), I observed what I believe to be a regression of the issue described here: https://developer.apple.com/forums/thread/779192
Specifically, user positioning underground subway stations is noticeably inaccurate on the beta, whereas the same scenarios remain accurate on the unupgraded device below.
I work with the MTA (New York City) and work with the OP of that thread. Happy to provide additional testing or details if helpful. Please let me know what else you need.
Test Info
Riding NYCT from Wall St to 34th St Penn Station on the 2 train carrying two iphones
Recording: https://limewire.com/d/dpTWi#pDC3GRYIdE
Expected: Consistent underground positioning comparable to prior releases.
Actual: Degraded/inaccurate underground positioning on iOS 26.1 beta.
Test Devices
Left Screen: iPhone 15 Pro Max - iOS 26.1 beta (23B5044i)
Right Screen: iPhone 11 - iOS 18.6.2 (22G100)
Blue dots show location set by CoreLocation. Red dot on iphone 11 shows the actual location of both devices as I was able to manually place while travelling through a station. Placement through tunnels is not easy to verify and not usually indicated.
Timestamps
Comparison of when train was actually observed in a station vs when 26.1 and 18.6.2 CoreLocation updated to the station
Fulton St
1:48 iOS 26.1 correctly updates (correctly)
2:16 iOS 18.6.2 updates (28sec late)
Park Place
4:12 train arrives
4:15 iOS 18.6.2 updates to ~near Park Place
5:04 iOS 18.6.2 updates to Park Place (correctly)
6:07 iOS 26.1 update to ~near Park Place (over 2 mins late)
Chambers St
6:02 train arrives / iOS 18.6.2 updates (correctly)
6:14 iOS 26.1 updates to ~near Chambers
6:18 iOS 26.1 update to Chambers (correctly)
Franklin St
6:52 train arrives
6:55 iOS 18.6.2 updates (correctly)
x:xx iOS 26.1 does not update
Canal St:
7:16 train arrives
7:18 iOS 18.6.2 updates (correctly)
x:xx iOS 26.1 does not update
Houston St
7:54 train arrives
8:00 iOS 18.6.2 updates (correctly)
x:xx iOS 26.1 does not update
Christopher St
8:37 iOS 26.1 presumably between Houston St and Christopher St
8:40 train arrives / iOS 18.6.2 updates (correctly)
x:xx iOS 26.1 does not update
14 St
9:22 train arrives
9:28 iOS 18.6.2 updates (correctly)
11:01 as train departs station iOS 26.1 updates (1.5 mins late)
Topic:
App & System Services
SubTopic:
Maps & Location
Tags:
Beta
Core Location
Maps and Location
Testing
I'm trying to write performance tests with Xcode 15, but it's not working: even though setting a baseline seems to work (baseline data files are created), Xcode seems to ignore that baseline altogether whenever the test is run. As a result, performance tests never fail, no matter how bad performance gets.
The source editor persistently displays a “No baseline average for Time” message.
Has anyone else encountered this? Figured out how to sidestep the issue?
Of note, the issue is easily reproduced: create a new (macOS in my case) app project with tests, add a dummy performance test; run the test once and save its baseline, and despite this subsequent tests will always succeed, even if you significantly slow the dummy test down.
(I've filed this as FB13330139)
I have a project inside the project structure. I have around 300 unit tests in the project.
I see that for some of the subprojects, the coverage numbers show up correctly, but for other subprojects and the main project, the coverage number shows zero, even though the tests are running successfully.
The log I get is:
Aggregation tool emitted warnings:
warning: /Users/ABC/Library/Developer/Xcode/DerivedData/projectABC-hfzmkbdgpiswoxfvvnvhrafaiqyb/Build/ProfileData/A8EEC1FB-1699-4C29-A88C-D3DDA226DBC0/0A416494-A393-4319-AA47-502D72084C9C-43351.profraw: raw profile version mismatch: Profile uses raw profile format version = 8; expected version = 10
PLEASE update this tool to the version in the raw profile, or regenerate the raw profile with the expected version.
I only have one Xcode (26.0.1) on my machine. I tried cleaning the derived data, the cleaning project, and rerunning the tests, but it hasn't helped.
Please help me get the coverage number back. Thank you.
New Apple Developer here,
I've built my first iOS app in Xcode and wants to get it onto some friends' iPhones to do some external testing and give me some feedback. I've read the Apple Developer documentation on how to use TestFlight, but it's not understandable since step 1 is entering information about the app in App Store Connect and step 2 is uploading the app to App Store Connect?
Can someone please write some easy step-by-step directions on how to get an iOS app from Xcode onto external testers' iPhones for a first-timer in 2024?
Thank you so much!
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
iOS
App Store Connect
TestFlight
Testing