Build, test, and submit your app using Xcode, Apple's integrated development environment.

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Unable to run an UITest to test a Button
I am trying to run a UI test for my app: func testFeed() throws { let tablesQuery = app.tables let cell = tablesQuery.children(matching: .cell).element(boundBy: 0) cell.swipeUp() sleep(2) let cellToLike = tablesQuery.children(matching: .cell).element(boundBy: 1) cellToLike.buttons["LikeButtonOff"].tap() cellToLike.buttons["LikeButtonOn"].tap() sleep(2) cellToLike.tap() sleep(2) let image = app.scrollViews.images.element(boundBy: 0) // Zoom in image.pinch(withScale: 3, velocity: 1) // zoom in // Zoom out image.pinch(withScale: 0.5, velocity: -1) let navBackButtonWhiteButton = app.buttons["NavBackButtonWhite"] navBackButtonWhiteButton.tap() } but on the line cellToLike.buttons["LikeButtonOff"].tap() I get the following error: Failed to failed to compute hit point for Button, {{354.0, 644.7}, {44.0, 44.0}}, identifier: 'LikeButton', label: 'LikeButtonOn': Activation point invalid and no suggested hit points based on element frame I tried checking the isHittable property of my button and it equals "false" for some reason. When I test the app myself I don't get any errors and I can interact with like button. What can be the issue? Im using Xcode 15.2
1
0
71
1w
Under Xcode 26 beta 3, how to support new glass icons for iOS 26 and old icons for iOS 18?
I know there are several existing threads on this topic but things keep changing. The release notes for Xcode 26 beta 3 have the following statements for a couple of resolved issues: Asset Catalog Fixed: Unable to set Icon Composer icon as alternate iOS icon (153305178) (FB18025356) Icon Composer Fixed: Icon Composer icons back deploy to older versions of iOS, macOS, and watchOS with inconsistent rendering. (152258860) I had a working solution under beta 1 and beta 2 for both of these. But under beta 3, I am now seeing the new glass icons for my app when running on a simulated iOS 18 device. This is happening for both the main app icon and any alternates. This contradicts the statement that beta 3 fixes this issue. There is no documentation (that I can find) describing how you are supposed to support old icons for iOS 18 and new glass icons for iOS 26. There is no documentation for how to support alternate glass icons for iOS 26. What I'm doing at the moment (that worked before beta 3) was to have the normal iOS 18 app icons in the Asset catalog and to have the new glass icons added to the project. The filenames for the glass .icon files have the same name as the app icons in the Assets catalog. This worked under beta 1 and beta 2. And despite the Xcode 26 beta 3 release notes stating that Icon Composer icons no longer back deploy to iOS 18, I'm seeing the opposite. Beta 3 now does the opposite of that statement. Does anyone have a working solution that supports old iOS 18 app icons and new iOS 26 glass icons using Xcode 26 beta 3? Note, all of my testing is with simulated iOS devices and I'm running Xcode 26 beta 3 under macOS 15.5. Maybe that's an issue?
1
2
171
1w
Apple Watch may need to be unlocked to recover from previously reported preparation errors
I'm trying to run(debug) an Xcode watch app project on my watch. My phone is connected to my computer via USB cable, my watch is paired to my phone. When I open Xcode and then open "Devices and simulators", I can see my phone properly connected. But these errors show up for my watch........ Apple Watch may need to be unlocked to recover from previously reported preparation errors Ensure the device is unlocked and associated with the same local area network as this Mac. A connection to this device could not be established. Timed out while attempting to establish tunnel using negotiated network parameters. I have booted computer, phone and watch. I have turned wifi off and on, on all 3 devices. I have turned developer mode on the watch off and then back on again. Anyone have any ideas how to fix this?
1
0
67
1w
Signing Issues with VisionOS app
I am having an issue with signing and provisioning a Vision OS app. I have an iOS app and a VisionOS app. Everything works fine on the iOS but having issues with the VisionOS. First, I am having issues with xcodebuild -exportArchive. When I run it on an archive of my VisionOS app I get ** EXPORT FAILED ** error: exportArchive No Accounts error: exportArchive No profiles for 'X' were found Where X is my bundle ID. Meanwhile the iOS app succeeds. This is on a CI machine but I confirmed the distribution provision profile for the vision OS app is installed on the machine. Even if I change the value of the -exportOptionsPlist to the one I used for the iOS project I get this error. Is the issue in the archive itself? The archives are generated from building in Unity and archiving the xcodeproject with xcodebuild archive Second, as a workaround I archived a debug ipa on my machine and uploaded this ipa to my CI machine which has the credentials to sign for distribution. I use this script as an example as how to resign the IPA: https://gist.github.com/lodalo/754a35b48d382ae99b25 I remove the CodeSignatures and codesign both .app and UnityFramework.framework. Using this resigned IPA I get this error when I try to upload to app store connect (via Transporter app and altool) errors: Validation failed (409) Missing or invalid signature. The bundle 'X' at bundle path 'Payload/Y.app' is not signed using an Apple submission certificate. To verify the signing I used codesign -dvvv --entitlements - On both the iOS and VisionOS app and they have the same values under all the Authority fields. Different profiles, of course. So the certificate I used is eligible to upload the iOS app successfully but doesn't work on the VisionOS ipa? Any help on solving any of these issues would be great so I can upload the vision OS app. Thank you!
0
0
77
1w
Xcode Beta 3 new build warning about Bridging Header pch.
Hey all when building my app on xcode 26 beta 3 im getting a new warning about a [APPNAME]-primary-bridging-header.pch no file or directory found, this warning is new to beta 3 for me, obviously if i turn precompile headers off in build settings the warning goes away so there is a work around, but figured ide let the xcode engineers know ! (maybe its just me, but i wouldnt think so) Again this is just a warning and not stopping the build but wanted to see if this is a new warning anyone else is getting. Thanks ! FB18710327 Ps - ive tried the usuals .. clean build, delete derived data get same warning :)
1
1
93
1w
Xcode 26 Bug: URLs with percent encoding query parameters won't compile
Just repro'd in the latest Xcode 26 Beta 3. Building an iOS app using xcstrings for localization. We have a URL that uses percent encoding for a query param. For example: Upon compiling in the latest Xcode 26 beta this fails with: Unable to create a Swift type from the format specifier “%20S”. This was not the case in prior Xcode versions.
1
0
83
1w
Xcode 26 Beta-2 - missing context actions
If I control-click (or right-click) on a view, there is no longer an option to extract to subview. I also looked under the refactor option that comes up and it's not there either. Was this intentional? If so, is there an easy method to extract to a subview like in earlier versions of Xcode? Also, if I control click on a view and the context menu comes up, there used to be different embed options (ZStack, HStack, etc) now there's only embed. Not a big issue because you can just change Container to whatever.
1
1
44
1w
iOS 18 Simulator Crash on Xcode 26: Symbol not found: _NSUserActivityTypeBrowsingWeb
Hi, When launching my app on the iOS 18 simulator using Xcode 26 beta, the app crashes immediately with a missing symbol error: dyld[23801]: Symbol not found: _NSUserActivityTypeBrowsingWeb Referenced from: <DDBF5C50-BD0E-34C7-B202-888033A93840> /Users/username/Library/Developer/CoreSimulator/Devices/058F6615-9288-4164-8736-53CBC962FFD4/data/Containers/Bundle/Application/95B984C9-3197-423C-860C-E714BA34ACCB/MyApp.app/MyApp.debug.dylib Expected in: <443671DB-41AE-3963-8403-E4A484837405> /Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreServices.framework/CoreServices Symbol not found: _NSUserActivityTypeBrowsingWeb Referenced from: <DDBF5C50-BD0E-34C7-B202-888033A93840> /Users/username/Library/Developer/CoreSimulator/Devices/058F6615-9288-4164-8736-53CBC962FFD4/data/Containers/Bundle/Application/95B984C9-3197-423C-860C-E714BA34ACCB/MyApp.app/MyApp.debug.dylib Expected in: <443671DB-41AE-3963-8403-E4A484837405> /Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreServices.framework/CoreServices dyld config: DYLD_SHARED_CACHE_DIR=/Library/Developer/CoreSimulator/Caches/dyld/24F74/com.apple.CoreSimulator.SimRuntime.iOS-18-0.22A3351/ DYLD_ROOT_PATH=/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/username/Library/Developer/Xcode/DerivedData/MyApp-dqwvveywparbascmmycuqktsiopv/Build/Products/Debug-iphonesimulator:/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libLogRedirect.dylib:/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/usr/lib/libRPAC.dylib:/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libViewDebuggerSupport.dylib:/System/Library/PrivateFrameworks/GPUToolsCapture.framework/GPUToolsCapture DYLD_FRAMEWORK_PATH=/Users/username/Library/Developer/Xcode/DerivedData/MyApp-dqwvveywparbascmmycuqktsiopv/Build/Products/Debug-iphonesimulator DYLD_FALLBACK_FRAMEWORK_PATH=/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks DYLD_FALLBACK_LIBRARY_PATH=/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/ Notes: I have only tested on the iOS 18 simulator so far. I have not yet tested on earlier iOS versions or physical devices. The app runs fine on iOS 26 simulator using Xcode 26, so the crash seems specific to the iOS 18 simulator. This looks like a system symbol that may not be linked properly in the iOS 18 simruntime. Is this a known issue with the iOS 18 SDK or simulator runtime in Xcode 26 beta? Thanks!
10
2
396
1w
Intermittent "internal error" with multiple XIBs in Xcode 26.0 beta 2 (17A5241o)
On several different XIBs I get a compiler error like Internal error. Please file a bug at feedbackassistant.apple.com and attach "/var/folders/1v/ 516am8h11fzbmdy9sh r1znh0000an/T/|B-adent-diagnostics 2025-06-30 15-02-36 468000" W These XIBs were unmodified, the only different was the Xcode version they were compiled against. Any suggestions for a fix, workaround, or troubleshooting? I tried restarting Xcode, restarting macOS, cleaning the build, and deleting derived data.
2
2
110
1w
Xcode keeps touching readonly xcschemes on launch
We use Perforce for version control, which means that all files not checked out are readonly. Lately Xcode has started displaying a fixed sequence of these dialogs on every launch: This means it is trying to modify some readonly file within the xcodeproj. Out of our 60 subprojects this always comes up for the exact same 6. I have so far uncovered the following: It is really trying to modify the shared xcschemes and not the pbxproj. (If I set those to writable the dialog does not appear.) Actually the files are not changed if I click "Unlock", but the com.apple.provenance xattr flag is removed from them. These xcschemes are of version 1.7 while all others are 1.3. If I change them to 1.3 Xcode still wants to modify them at launch and sets them back to 1.7. This is very annoying. What is it about these xcschemes that upsets Xcode, and how can I stop these dialogs from appearing? (One workaround is to keep them checked out dumped to a changelist that I never submit, but that is error prone when I do need to make changes to those, and also is not really possible when jumping between old states of the repo to find the change that broke something.)
0
0
97
1w
Team Id Changed / Old Team Id Automatically Signs
Good afternoon, I have the latest version of Xcode. I am trying to debug why I am not able to Sign in with Apple Sign In on my app. After days of trying everything I just noticed today that the TeamID Xcode is using to automatically sign the app is not my current Team Id. I had a years hiatus and my code login expired. When I recreated my account I got a new Team Id and that is what is on all my certificates, profiles, etc. Old team id: Z82SJZ64R6 Current team id: 22649D52Q5. I take off automatically signing and select my Mac app bistro and iOS app distro and the app fully builds then Xcode crashes with an error that mentions security - Error code 5. Is there a way for me to change the old team id in Xcode? I've already tried logging out and back in through settings.
2
0
55
1w
IconComposer alternative app icons not working
I migrated all our alternative app icons to IconComposer icon files in my Xcode 26 project, but calling setAlternativeIconName fails with an error. Also, supportsAlternativeIcons returns false. This seems like a regression from Xcode 16. Do I need to add the CFBundleAlternateIcons? It's not needed as of Xcode 13 though.
1
1
41
1w
iOS Crash Log Shows High Offsets & ??? Modules in Local Debug Build (Binary Images Missing Main Binary)
Hi all, I'm encountering a strange crash issue during local iOS debugging on a real device, and I'm hoping someone can help explain it. The crash log contains unusually high offsets that are completely outside of any module address ranges listed in Binary Images. For example: 6 ??? 0x129ac0ee8 -[...:] + 1052 But the Binary Images section shows: 0x102358000 - 0x102363fff ChinaMobile arm64 ... 0x11bb2c000 - 0x11bdeffff ChinaMobile.debug.dylib arm64 ... ... There are two binaries for my app listed here, but neither matches that high crash address (0x129ac0ee8). Additionally, sometimes the Binary Images section doesn't even include my app's binary at all, which makes the crash logs even harder to analyze. This crash definitely happens inside my main app’s business code, yet the crash offset doesn’t match any listed binary range. Also, the crash logs contain many ??? module names and missing symbols, even though I'm running a Debug build locally, and I know how to symbolize logs manually. My Questions: Why does the crash log show such high offsets, far beyond any Binary Images' range? Why does it have so many ??? entries and missing symbols, even in a local debug build? Could this be related to Xcode version, build settings, or some project misconfiguration? Any suggestions or insights would be greatly appreciated!
0
0
56
1w
Xcode26: download stuck on 'fetching'
I just downloaded Xcode26, and am trying to download the new simulator to be able to run and test my app. But the downloads folder just shows that it's stuck on "Fetching download information ..." even 15 minutes after it started. I tried restarting Xcode but didn't help. Internet connection is good. Any tips to get it working?
6
3
237
1w
Thread running at User-interactive quality-of-service class waiting on a lower QoS thread running at Default quality-of-service class
Can anyone explain why I would be getting this warning ? [Internal] Thread running at User-interactive quality-of-service class waiting on a lower QoS thread running at Default quality-of-service class. Investigate ways to avoid priority inversions. The code (NB: This method is called on the main thread) - (void)parseAudioTracks:(NSArray<AVAssetTrack *> *)audioTracks { NSMutableArray<AVAudioMixInputParameters *> *inputParameters = [NSMutableArray arrayWithCapacity:audioTracks.count]; NSMutableArray *tracksNames = [NSMutableArray array]; NSMutableArray *tracksChannels = [NSMutableArray array]; NSUInteger lastChannel = 0; for ( NSUInteger i = 0 ; i < audioTracks.count; i++ ) { AVAssetTrack *track = audioTracks[i]; for ( AVMetadataItem *item in track.metadata ) <-- WARNING HERE ...```
2
0
67
1w
Xcode 26, _UIAccessibilityTraitToggleButton crash , under iOS 26
hi , There is a crash when we run on an **iOS 16 real device ** if we set a .toggleButton trait for accessibilty . it has version check as apple doc refers (IOS 17 +) but it crashes so there is someinconsistency between availbility in ios 18 + , somehow other xcodes made it available from 17 for now we commented our code , but would like dto report this to be fixed cheers
0
0
31
1w