Detect issues like logic failures, UI problems, and performance regressions by running tests on your app.

Posts under Testing tag

111 Posts
Sort by:
Post not yet marked as solved
0 Replies
57 Views
Hello everyone, I have been receiving this same crash report for the past month whenever I try and export a Final Cut Pro project. The FCP video will get to about 88% completion of export, then the application crashes and I get the attached report. Any leads on how to fix this would be greatly appreciated! Thank you. -Lauren
Posted Last updated
.
Post not yet marked as solved
0 Replies
75 Views
Hello team , We have created a sandbox tester and added all the setting as per the guidelines but the sandbox tester account is blocked from adding the test card . All the test cards show as invalid card . We are not able to able to add wallet from iCloud . We are not able to sign into iTunes with the sandbox tester account . Please help on how to resolve this . Thanks in Advance
Posted Last updated
.
Post not yet marked as solved
1 Replies
202 Views
TL:DR Can anyone provide guidance as to how to get the FileProvider testing API to work? It closes with no error and I have not been able to determine the issue despite careful attention to the documentation and signing. The Console logs seem to imply it is a Sandbox issue. Hi, Writing this as per suggested in the technical support section. I am trying to create some tests that involve controlling the calls from MacOS to the corresponding "event" functions in the FileProvider (e.g. fetchContents()) using the FileProviderExtension test API provided by Apple. I have thoroughly read the documentation (both online and within the API code) in order to get this to work. I have: Added the com.apple.developer.fileprovider.testing-mode entitlement to both my Main App as well as my FileProviderExtension Ensured my I have the correct account permissions, and provisioning profiles for my Main App as well as FileProviderExtension Added the line domain.testingModes = [.alwaysEnabled, .interactive] The issue: I found that setting the .interactive option in my domain.testingModes will result in my domain in Finder appearing to be stuck loading the root folder, and that my FileProviderExtension instance is being invalidated and closing in ~5s. It is reproducible. Is this a bug? Some things I have noticed: Attaching the debugger to the FileProviderExtension process results in no error. Additionally there is no error received when calling add(:domain). I noticed through testing that the Main App appears to be required to have the com.apple.developer.fileprovider.testing-mode entitlement in order to run a FileProviderExtension with that same entitlement. Otherwise I would receive the error: Error Domain=NSCocoaErrorDomain Code=257 "The file couldn’t be opened because you don’t have permission to view it" When trying to sign manually using a group Developer ID Application certificate as opposed to automatically with my Apple Development certificate Xcode presents the error "Main app provisioning profile" doesn't support the FileProvider Testing Mode capability." Despite this I can clearly see that is an enabled capability though the online Apple Developer portal under the Profiles section. Note that the only capabilities enabled when viewing the bundle identifiers of the Main App and FileProviderExtension are "FileProvider Testing Mode", "App Groups", and the (seemingly required) "In-App Purchases". I later realized that this was likely due to using the wrong type of provisioning profile so I generated and switched to MacOS Developer Profiles (as opposed to Distribution) and this error in XCode went away. However the above issue (FileProviderExtension instance being invalidated) persisted. If I look at the Console I see various errors from when the extension is launched till it closes: Sandbox: mdbulkimport(922) deny(1) mach-lookup com.apple.FileProvider Sandbox: hiveDiskProvider(37981) deny(1) mach-lookup com.apple.mobile.keybagd.UserManager.xpc [ERROR] Cannot query for providers. Error: NSError: Cocoa 4099 "<private>" Error from beginMonitoringProviderDomainChangesWithHandler: Error Domain=NSCocoaErrorDomain Code=4099 UserInfo={NSDebugDescription=<private>} Synchronizer coordinateReadingItemAtURL error: Error Domain=NSCocoaErrorDomain Code=3072 With the Development Provisioning Profiles I see a couple new errors: From secinitd(App Sandbox) Failed to set LS data container personality info: <private> A new error repeated a number of times from cfprefsd after trying to access some .plist files that don't appear to be on my system: Error: Couldn't open parent path due to [2: No such file or directory] Paths are: ~/Library/Containers/<extensionBundleID>/Data/Library/Preferences/ByHost/<extensionBundleID>.<ID>.plist /Library/Managed Preferences/<username>/<extensionBundleID>.plist Any help would be greatly appreciated :)
Posted
by T-dawg.
Last updated
.
Post marked as solved
1 Replies
106 Views
In V 0.1 of my app, I went with a simple option for a piece of business logic in my app. I then changed something else that caused my simplified business logic to now crash the app at startup. Excellent, a chance to use Test. Driven Design to replace my flawed business logic. So I wrote my first test TDD test, but when I tried to run the test... It doesn't run because running the test target seems to start by actually running my full app (which as I described in chapter 1 is currently crashing) Have I configured something incorrectly? or is it normal that when I attempt to run a single test, step 1 is running the full app? (note: it is very easy for me to disable/avoid the business logic causing my crash. This question is more about my lack of understanding of what it means to run a test target.) thanks in advance for any and all responses. Mike
Posted Last updated
.
Post marked as solved
2 Replies
127 Views
In order to test an iPhone app I am developing on my mac on an actual device, I connected my iPhone to my mac with a wired connection and installed the app, but got an error message saying “Uneble to verify app”. I went to Settings -> General -> VPN and Device Management -> the app in question in ENTERPRISE APP -> Verify App -> Verify, but no matter how many times I tap on it, the status of the app remains “Not verified”. If anyone has a solution to this problem, we would appreciate it if you could help us.
Posted
by Kyo_jp.
Last updated
.
Post not yet marked as solved
0 Replies
119 Views
Hello everyone, I looked at various methods how to Unit/UITest SwiftData but I couldn't find something simple. Is it even possible to test SwiftData? Does someone found a solution for that?
Posted
by iRIG.
Last updated
.
Post not yet marked as solved
0 Replies
115 Views
Steps to reproduce: Install & Launch App When push notifications are registered, the push notification token received is a "production" push notification token rather than a "development" push notification token. We are trying to test on the sandbox environment with development push notification tokens, however the apn-environment for all builds we release via TestFlight are being set to "production". We wish to distribute builds via TestFlight with apn-environment set to "development". At the moment we have only found one way to run the app with apn-environment set to "development" which is to "Export" a Debug build, then manually install it on a device via iTunes on Windows machines. This method is not efficient or considered seamless enough for non-technical testers and stakeholders. They require a seamless way to receive Debug builds via TestFlight without resorting to other third-party platforms which allow us to manually upload the "Exported Debug build". If anyone knows how to upload a "Debug" build to Testflight which will allow the user to receive a sandbox development push token with "apn-environment" set to development I would really appreciate it.
Posted
by draskov87.
Last updated
.
Post not yet marked as solved
0 Replies
131 Views
In order to fetch the unexpected pop-up dialog window when executing e2e tests. For example: I write a simple Apple script get_popup_windows.scpt as follows: tell application "System Events" tell process "SystemUIServer" set securityAlertWindows to (every window whose subrole is "AXDialog") set securityAlertTitles to {} repeat with securityAlertWindow in securityAlertWindows set securityAlertTitle to (securityAlertWindow's title as text) set end of securityAlertTitles to securityAlertTitle end repeat end tell end tell return securityAlertTitles However, when I execute osascript get_popup_windows.scpt It returns empty even when there is a popup window in my mac. Does anyone know the reason? Thanks for help. Will
Posted
by willkuo.
Last updated
.
Post not yet marked as solved
0 Replies
161 Views
For our iOS inception e2e test, sometimes the test is blocked by the Mac pop-up window alert. The possible pop-up as follows: Java Access Pop-up Accessibility Pop-up SystemProperty Pop-up and so on...... In order to fetch the unexpected pop-up dialog window when executing e2e tests. I write a simple Apple script get_popup_windows.scpt as follows: tell application "System Events" set allProcesses to processes whose background only is false -- Log the count of allProcesses log "Number of processes found: " &amp; (count of allProcesses) set dialogInfos to {} repeat with eachProcess in allProcesses try tell eachProcess log "Process Name: " &amp; (name of eachProcess as text) set allWindows to (windows whose subrole is "AXStandardWindow" or subrole is "AXDialog") log "Number of allWindows found: " &amp; (count of allWindows) repeat with eachWindow in allWindows set uiElements to UI elements of eachWindow log "eachWindow: " &amp; (name of eachWindow as text) set the end of dialogInfos to {title:(name of eachWindow as text), processName:(name of eachProcess as text)} end repeat end tell end try end repeat end tell return dialogInfos However, when I execute the script: osascript get_popup_windows.scpt The result as follows: Number of processes found: 10 Process Name: Terminal Number of allWindows found: 1 eachWindow: scripts — osascript get_popup_windows.scpt — 143×41 Process Name: Google Chrome Number of allWindows found: 1 eachWindow: Gemini - Google Chrome - Will Process Name: sublime_text Number of allWindows found: 0 Process Name: Notes Number of allWindows found: 0 Process Name: Music Number of allWindows found: 0 Process Name: Finder Number of allWindows found: 0 Process Name: app_mode_loader Number of allWindows found: 0 Process Name: Simulator Number of allWindows found: 0 Process Name: app_mode_loader Number of allWindows found: 0 Process Name: Script Editor Number of allWindows found: 0 title:scripts — osascript get_popup_windows.scpt — 143×41, processName:Terminal, title:Gemini - Google Chrome - Will, processName:Google Chrome =&gt; I cannot fetch the target pop-up window in the Mac desktop. Please guide me if you have any suggestions, thanks.
Posted
by willkuo.
Last updated
.
Post not yet marked as solved
2 Replies
266 Views
Hello everyone, I'm programming my app and after a few days I opened and ran it on my iPhone. This app worked, but with one big problem. The problem is that the app doesn't show up in my settings and I don't know why. I didn't program/change anything. Thanks for the advice
Posted
by MORADENS.
Last updated
.
Post not yet marked as solved
2 Replies
883 Views
Our CI pipeline produces .xcresult bundles that allow developers to diagnose failures by opening them in Xcode. If the test crashes, we used to be able to open the diagnostic folders and inspect the raw test logs. As of Xcode 15, that option is no longer available. I know the Diagnostic data is there because I can view it with Xcode 14. Am I just missing something in the Xcode 15 UI? Or has the capability to browse the Diagnostics actually been removed?
Posted Last updated
.
Post not yet marked as solved
0 Replies
207 Views
There was an error processing your request. Please try again later. TestFlight
Posted Last updated
.
Post not yet marked as solved
1 Replies
216 Views
So I have a simple view for my SwiftUI application below: import SwiftUI struct ContentView: View { var body: some View { List { ForEach(0..<4) { index in RowView(index: index) .accessibilityIdentifier("row") } } } } struct RowView: View { let index: Int var body: some View { HStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") Spacer() ButtonView(index: index) } .padding() } } struct ButtonView: View { let index: Int var body: some View { VStack { if index != 3 { Button(action: {}, label: { Text("Cancel") }) .accessibilityIdentifier("cancel_button") } Button(action: {}, label: { Text("Submit") }) .accessibilityIdentifier("submit_button") } } } My goal is to reference each cancel and submit button per row for a UI Test, which I have tried doing so here: let rowElements = app.tables.cells.matching(identifier: "row") for i in 0..<rowElements.count { let cancelButton = rowElements.element(boundBy: i).buttons["cancel_button"] let submitButton = rowElements.element(boundBy: i).buttons["submit_button"] XCTAssertTrue(cancelButton.exists, "Cancel button does not exist in row \(i)") XCTAssertTrue(submitButton.exists, "Submit button does not exist in row \(i)") } Even with the identifiers set like this my tests fail and say it cannot find the buttons labeled as they are with their specific identifiers or the rows. What is the correct way to reference elements if they are in a list or table for UI Testing? I'm specifically trying to use accessibility Identifiers to make my life easy.
Posted
by matson.
Last updated
.
Post not yet marked as solved
0 Replies
217 Views
This code works when I run it in the iOS Simulator with iOS 17.0.1: let passcodeInput = springboard.secureTextFields["Passcode field"] _ = passcodeInput.waitForExistence(timeout: 10) passcodeInput.tap() However if I run it on the iOS Simulator with iOS 17.4 I get this error: t = nans Checking existence of `"Passcode field" SecureTextField` t = nans Capturing debug information t = nans Requesting snapshot of accessibility hierarchy for app with pid 66943 t = nans Tap "Passcode field" SecureTextField t = nans Wait for com.apple.springboard to idle t = nans Find the "Passcode field" SecureTextField t = nans Find the "Passcode field" SecureTextField (retry 1) t = nans Find the "Passcode field" SecureTextField (retry 2) t = nans Requesting snapshot of accessibility hierarchy for app with pid 66943 <unknown>:0: error: PRCheckUITests : Failed to tap "Passcode field" SecureTextField: No matches found for Descendants matching type SecureTextField from input {( Application, pid: 66943, label: ' ' )} Did the hardcoded string "Passcode field" change for iOS 17.4? How can I access the passcode field through springboard in a test?
Posted
by SirEl12.
Last updated
.
Post not yet marked as solved
0 Replies
202 Views
Hi everyone! I'm developing a cross-platform application with Flutter framework and i found an anomaly that is not really answered on any forums or just I'm too blind to find that. So if I'm making a debug build on a real device or I download a test app from TestFlight after the first launch the app pops a "*** would like to find and connect to devices on your local network" dialog. I tested a few app from App Store (some of them was made with Flutter, for example Revolut) but non of them asks for the mentioned permission. So my question is: the released apps in App Store also requires permission for connection to network (so the "*** would like to find and connect to devices on your local network" dialog shows up) and i need to set something in the configs to get the permission instantly or all apps in App Store got the permission by default.
Posted
by Dommma.
Last updated
.
Post not yet marked as solved
0 Replies
224 Views
Good morning. I'm executing XCUitest tests on a real iPhone with iOS 17 and I'm receiving the following error: 2024-04-09 11:11:10.000 E HelloWorldE2EUITests-Runner(FrontBoardServices)[489] <Error>: Snapshot request 0x281f1c390 complete with error: <NSError: 0x281f373f0; domain: FBSSceneSnapshotErrorDomain; code: 4; "an unrelated condition or state was not satisfied"> { NSLocalizedDescription = an error occurred during a scene snapshotting operation; } 2024-04-09 11:11:10.000 E HelloWorldE2E(XCTTargetBootstrap)[490] <Error>: Error loading automation support library: Error Domain=com.apple.dt.xctest.error Code=1 UserInfo={NSLocalizedDescription=<private>} 2024-04-09 11:11:12.000 E HelloWorldE2E(XCTTargetBootstrap)[491] <Error>: Error loading automation support library: Error Domain=com.apple.dt.xctest.error Code=1 UserInfo={NSLocalizedDescription=<private>} 2024-04-09 11:11:13.000 E HelloWorldE2EUITests-Runner(FileProvider)[489] <Error>: [ERROR] Cannot query for providers. Error: NSError: Cocoa 257 "The file couldn\M-b\M^@\M^Yt be opened because you don\M-b\M^@\M^Yt have permission to view it." 2024-04-09 11:11:13.000 E HelloWorldE2EUITests-Runner(FileProvider)[489] <Error>: [ERROR] received an error when listing providers, attempting again: Error Domain=NSCocoaErrorDomain Code=257 "The file couldn\M-b\M^@\M^Yt be opened because you don\M-b\M^@\M^Yt have permission to view it." (count: 3) 2024-04-09 11:11:13.000 E HelloWorldE2EUITests-Runner(FileProvider)[489] <Error>: [ERROR] Cannot query for providers. Error: NSError: Cocoa 257 "The file couldn\M-b\M^@\M^Yt be opened because you don\M-b\M^@\M^Yt have permission to view it." 2024-04-09 11:11:13.000 E HelloWorldE2EUITests-Runner(FileProvider)[489] <Error>: [ERROR] received an error when listing providers, attempting again: Error Domain=NSCocoaErrorDomain Code=257 "The file couldn\M-b\M^@\M^Yt be opened because you don\M-b\M^@\M^Yt have permission to view it." (count: 2) 2024-04-09 11:11:13.000 E HelloWorldE2EUITests-Runner(FileProvider)[489] <Error>: [ERROR] Cannot query for providers. Error: NSError: Cocoa 257 "The file couldn\M-b\M^@\M^Yt be opened because you don\M-b\M^@\M^Yt have permission to view it." 2024-04-09 11:11:13.000 E HelloWorldE2EUITests-Runner(FileProvider)[489] <Error>: [ERROR] received an error when listing providers, attempting again: Error Domain=NSCocoaErrorDomain Code=257 "The file couldn\M-b\M^@\M^Yt be opened because you don\M-b\M^@\M^Yt have permission to view it." (count: 1) 2024-04-09 11:11:13.000 E HelloWorldE2EUITests-Runner(FileProvider)[489] <Error>: [ERROR] Cannot query for providers. Error: NSError: Cocoa 257 "The file couldn\M-b\M^@\M^Yt be opened because you don\M-b\M^@\M^Yt have permission to view it." 2024-04-09 11:11:13.000 E HelloWorldE2EUITests-Runner(FileProvider)[489] <Error>: [ERROR] can't get the list of providers: NSError: Cocoa 257 "The file couldn\M-b\M^@\M^Yt be opened because you don\M-b\M^@\M^Yt have permission to view it." 2024-04-09 11:11:13.000 E HelloWorldE2EUITests-Runner(CoreMediaIO)[489] <Error>: CMIOExtensionDiscoverySession.m:244:-[CMIOExtensionDiscoverySession setUpRegistration]_block_invoke Error received 3 2024-04-09 11:11:13.000 E HelloWorldE2EUITests-Runner(CoreFoundation)[489] <Error>: Not updating lastKnownShmemState in CFPrefsPlistSource<0x28231aac0> (Domain: com.apple.cameracapture.volatile, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: Yes): 0 -> 16 2024-04-09 11:11:15.000 E HelloWorldE2E(AXRuntime)[491] <Error>: Unknown client: HelloWorldE2E 2024-04-09 11:11:26.000 E HelloWorldE2E(XCTTargetBootstrap)[494] <Error>: Error loading automation support library: Error Domain=com.apple.dt.xctest.error Code=1 UserInfo={NSLocalizedDescription=<private>} 2024-04-09 11:11:29.000 E HelloWorldE2E(AXRuntime)[494] <Error>: Unknown client: HelloWorldE2E 2024-04-09 11:11:40.000 E HelloWorldE2E(XCTTargetBootstrap)[495] <Error>: Error loading automation support library: Error Domain=com.apple.dt.xctest.error Code=1 UserInfo={NSLocalizedDescription=<private>} 2024-04-09 11:11:42.000 E HelloWorldE2E(AXRuntime)[495] <Error>: Unknown client: HelloWorldE2E 2024-04-09 11:11:44.000 E HelloWorldE2EUITests-Runner(UIKitCore)[489] <Error>: Background Task 3 ("Called by UIKitCore, from <redacted>"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this. 2024-04-09 11:11:46.000 E HelloWorldE2E(XCTTargetBootstrap)[497] <Error>: Error loading automation support library: Error Domain=com.apple.dt.xctest.error Code=1 UserInfo={NSLocalizedDescription=<private>} 2024-04-09 11:11:48.000 E HelloWorldE2E(XCTTargetBootstrap)[498] <Error>: Error loading automation support library: Error Domain=com.apple.dt.xctest.error Code=1 UserInfo={NSLocalizedDescription=<private>} 2024-04-09 11:11:51.000 E HelloWorldE2E(XCTTargetBootstrap)[500] <Error>: Error loading automation support library: Error Domain=com.apple.dt.xctest.error Code=1 UserInfo={NSLocalizedDescription=<private>} 2024-04-09 11:11:54.000 E HelloWorldE2E(XCTTargetBootstrap)[501] <Error>: Error loading automation support library: Error Domain=com.apple.dt.xctest.error Code=1 UserInfo={NSLocalizedDescription=<private>} 2024-04-09 11:11:56.000 E HelloWorldE2E(XCTTargetBootstrap)[502] <Error>: Error loading automation support library: Error Domain=com.apple.dt.xctest.error Code=1 UserInfo={NSLocalizedDescription=<private>} 2024-04-09 11:11:58.000 E HelloWorldE2E(XCTTargetBootstrap)[503] <Error>: Error loading automation support library: Error Domain=com.apple.dt.xctest.error Code=1 UserInfo={NSLocalizedDescription=<private>} 2024-04-09 11:12:01.000 E HelloWorldE2E(XCTTargetBootstrap)[504] <Error>: Error loading automation support library: Error Domain=com.apple.dt.xctest.error Code=1 UserInfo={NSLocalizedDescription=<private>} 2024-04-09 11:12:03.000 E HelloWorldE2E(AXRuntime)[504] <Error>: Unknown client: HelloWorldE2E 2024-04-09 11:12:29.000 E HelloWorldE2EUITests-Runner(XCTestCore)[489] <Error>: Exiting due to IDE disconnection. I'm not understanding the error because this only happens on iOS 17, the same tests on iOS 16 is working just fine. Also, the log seems to make reference to two things: Error on Snapshot request. Which is strange because I'm not making any snapshot on the tests. Errors with the loading of this: Error loading automation support library: Error Domain=com.apple.dt.xctest.error. I'm confused here because I don't know where to start to begin to look for solve this.
Posted Last updated
.
Post not yet marked as solved
0 Replies
274 Views
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!
Posted
by Filip27.
Last updated
.
Post not yet marked as solved
1 Replies
270 Views
I have had an app on the apps store for about 4 years. The app uses an API to retrieve some data and displays/manipulates it. The app works for the vast majority of users however, for around 0.01% of users, the first time they open the app after downloading it, the API fails and reports that it cannot retrieve data (it exits elegantly but does not crash). They cannot get the app to work and I have to issue a refund. I cannot repeat the error on simulator or on my test iPhone (13). There is no consistency on IOS or phone model reported. I am guessing that there is some form of configuration that cause the app to fail to retrieve the data. I don't even know where to start to identify the problem. Can anyone point me to some documentation or provide advice as to how I can capture, analyse and fix these rare failures. Thanks
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.2k Views
Hi, I'm currently researching if we are able to migrate to Xcode Cloud in our project. I encountered one issue. I run unit tests on Xcode Cloud and I see that they finish in ~150 seconds, but the whole step takes ~530s and there is no information in logs why. I even run the same command on my local computer and it doesn't take that long. Any ideas? Any way to optimize it? Also one more thing: it looks like Xcode Cloud is not running on M1 machines. Do you know guys if there are plans for Xcode Cloud to take advantage of M1/M2?
Posted Last updated
.
Post not yet marked as solved
0 Replies
271 Views
Since couple of weeks ago (probably after I've updated my macbook to Sonoma 14.3.1) my Xcode cannot load unit test. When opening Test Navigator all I see is: Loading Tests... and it stays forever in that state. This is completely new project and this is crazy. Only way I can start testing is if I use CMD+U to run all the tests which is my company's project take a lot of time. Also there's no option to click on test-diamond-shaped button to run individual tests. Also tried checking "Test Plans" but I have infinite progress views: Anyone has any idea how to fix this? I tried to remove Derived Data, to reinstall Xcode (and different versions), did "git clean -fxd" nothing helped. Also some function like: "Rename", "Edit all in scope" stopped working as well.
Posted
by Amel-D.
Last updated
.