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

Posts under Testing tag

106 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Testflight and AppStore installation fails
I'm working on this Mac Safari extension https://apps.apple.com/app/id6464076425 The installation of the app via Testflight stops without any success (only for me) As well as the installation via AppStore. This happens only to me. I tried it on another computer, and it installed successfully. Here are some videos: This makes the development and release process impossible until I solve this problem. I tried all the methods I could find online, such as: Deleting the currently installed app Restarting Safari Restarting my Mac Is there anything else I can do to fix this problem?
0
0
17
1h
Trouble Verifying XCode Sideloaded Apps
I am working on a home automation app that runs fine through the XCode simulator, that I would love to get up and running on my personal device. When I load it from my computer on my device I am prompted to "trust" myself as a developer, which I have done. I am also prompted with a new message to 'verify' the app. I can't successfully do this. I am given a message that tells me to check my connection (I am connected to both cellular and Wifi - same as my Mac). What are some possible solutions, without paying for a full developer license?
0
0
169
1w
Could not install <appname> error in TestFlight
Hello, I have encountered this error in all the applications I have listened to so far on my individual developer account and I cannot test it. I heard that different developer friends of mine are experiencing this problem, especially on individual accounts. All test users I added to my account also have this problem. They all have different phones and operating system versions. I tried a lot of solutions on different computers, Xcode versions, etc. But I couldn't find a solution. Could you please help with this?
1
1
132
1w
Sandbox tester account not able to add test cards for testing
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
0
0
150
2w
Does running a single test in a Target containing unit tests start by running the actual app?
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
1
0
161
2w
apn-environment in Testfligh stuck on Production
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.
1
0
182
3w
Uneble to verify app
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.
2
1
197
1d
Capture the popup window in the Mac desktop by Apple Script
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.
1
0
219
4w
An Apple Script to fetch the
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
0
0
177
4w
FileProvider Testing Setup
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 :)
3
0
281
2w
How to correctly use Accessibility Identifiers for Rows of Elements
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.
2
0
262
17h
How to open Passcode field in Swift XCTest UI with iOS 17.4
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?
1
0
260
17h
Test application asks permission for "find and connect to devices on your local network"
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.
0
0
227
Apr ’24
Error loading automation support library: Error Domain=com.apple.dt.xctest.error
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.
0
0
255
Apr ’24
Step-by-step instructions on how to send an app to external testers with TestFlight in 2024?
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!
0
0
304
Apr ’24