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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Created

Simulator runtime stuck "Deleting"
I have numerous simulator runtimes marked as "Deleting": $ xcrun simctl runtime list == Disk Images == -- iOS -- iOS 18.0 (22A3351) - 036938A4-AAF7-4671-8880-8E381770E397 (Deleting) iOS 18.0 (22A5326g) - 756A6FE1-A9C7-4A3D-A8FD-01FD7B5F84BC (Deleting) iOS 18.0 (22A5307f) - 5DB182D5-FAA1-477D-922F-CFA728C5A6FA (Deleting) iOS 18.0 (22A5346a) - C844925F-1BCA-46FD-B0B9-21587AB3EDE5 (Deleting) iOS 18.0 (22A5307f) - CC3EB15F-4EAA-4591-AE5C-2762AC17C426 (Unusable - Other Failure: Duplicate of 5E3173BD-25F7-4446-9593-B5E6330B65CE) -- tvOS -- tvOS 18.0 (22J5290l) - A7A2E335-D433-456D-AC61-D5061317A911 (Ready) -- watchOS -- watchOS 11.0 (22R5284o) - 87DB6C3E-A51E-4394-AD35-F6BDCBDEFDC9 (Ready) How to I finish deleting these runtimes? I can't re-install, because: $ simctl runtime add iOS_18_Release_Candidate_Simulator_Runtime.dmg The iOS Simulator runtime 22A3351 is not installed, installing... D: C76A5156-5225-4683-806A-FC604074F2C7 iOS (18.0 - 22A3351) (Unusable - Other Failure: Error Domain=SimDiskImageErrorDomain Code=5 "Duplicate of 036938A4-AAF7-4671-8880-8E381770E397" UserInfo={NSLocalizedDescription=Duplicate of 036938A4-AAF7-4671-8880-8E381770E397, unusableErrorDetail=}) and it's the "Deleting" runtimes aren't usable (causing things like ibtool/actool to stop working), presumably because they're "Deleting." A reboot does not fix anything.
1
0
632
Sep ’24
Installation on this device is prohibited by ManagedConfiguration
When I try to install my app via USB cable on my child's iPhone 13 device I see following error in Xcode: Installation on this device is prohibited by ManagedConfiguration If I go to VPN & Device Management, I don't see anything. This is my Child's iphone so it is not like it is enrolled in some kind of school or work MDM. Developer mode is ON and I added device ID to Certificates, Identifiers & Profiles > Devices. Domain: IXRemoteErrorDomain Code: 9 Failure Reason: Unhandled error domain IXRemoteErrorDomain, code 9 User Info: { FunctionName = "-[IXSRemoteInstaller initWithRemoteInstallOptions:xpcAssetStream:assetSize:error:]"; SourceFileLine = 149; }``` Is it cellular network provider that has locked something? How to be sure about this?
1
0
822
Sep ’24
Renaming SwiftData model causing an error
I'm still working on version 1.0.0 of my app so don't yet need to migrate swiftdata versions. I renamed my data model(s) but I get this error when running the app after changing the name of the model from SectionsSD to HelpSection error: the replacement path doesn't exist: "/var/folders/fk/m2x_2qzj44508m9zzcll2j_w0000gn/T/swift-generated-sources/@__swiftmacro_11OpExShellV112FilteredListV11helpSection5QueryfMa_.swift" Despite cleaning the build, deleting the derived data and deleting the app and data on the simulator (and resetting it) I still get the replacement path error whenever I run the app in the simulator. When I run this code against the model I get the error: @Query var helpSection: [HelpSection] let searchString: String let isExpanded: Bool var filteredSections: [HelpSection] { helpSection.filter { section in section.toArticles?.contains { $0.search.contains(searchString) } == true } .sorted { $0.rank < $1.rank } } deleting derived data, cleaning builds and restarts do not resolve the issue.
2
2
1.4k
Sep ’24
Xcode does not see devices although finder does see them
I was using a version of Xcode and macOS that wasn't fully updated. When I tried to deploy my app to my phone I got the following error message "IOS Version Incompatible with Xcode version". At that time Xcode recognized my device. I updated my mac and updated Xcode. Then everything was fully up to date but now Xcode cannot see my device. I have tried with multiple different devices and it does not see any of them although finder recognizes all of them. I have tried the following so far: Every single suggestion from the tack overflow post: "Xcode does not see my iOS device but iTunes does" Ensured developer mode is turn on on my iPhone Restarted my iPhone and mac Deleted and reinstall xcode Tried a brand new empty Xcode project Reinstalled command line developer tools Restarted usbmuxd Deleted derived data Removed all vpns tried different usb cables (I am pretty sure the cable shouldn't be the problem though since this cable was working when Xcode and my iOS version wasn't compatible) Reset trust settings on my iPhon Tried manually adding my device to device and simulators but it says no devices found I opened up console on my mac and saw the following output "error 20:08:46.847760-0700 managedappdistributiond Simulator is not supported" I do not understand what is going wrong for me right now. I cannot think of nor find any other solutions right now.
1
0
559
Sep ’24
Upload Symbols Failed on Xcode 16
I am using GoogleMobileAds package dependencies and now when I want to archive and export an app I get this two warnings : Upload Symbols Failed The archive did not include a dSYM for the GoogleMobileAds.framework with the UUIDs [13B55A37-D103-36E1-8D7B-FA4EAB2C8146]. Ensure that the archive's dSYM folder includes a DWARF file for GoogleMobileAds.framework with the expected UUIDs. Upload Symbols Failed The archive did not include a dSYM for the UserMessagingPlatform.framework with the UUIDs [A3941120-02A1-30B5-8C28-BFC0F9496E16]. Ensure that the archive's dSYM folder includes a DWARF file for UserMessagingPlatform.framework with the expected UUIDs. I have updated the packages to 11.9.0 (lasted) and Xcode 16 to 16 RC (lasted also) and I would like to know how to fix this... With Xcode 15 I have no problem !! I can export with no warnings ! But now with Xcode 16 no... Thanks for helping !
62
54
77k
Sep ’24
Xcode 16 / Reality Composer Pro 2 segmentation fault issue
After installing MacOS Sequoia, Xcode 16 & RealityComposer Pro 2 my Apple Vision Pro projects (worked perfectly with Xcode 15) started to give me Tool terminated by signal 'Segmentation fault: 11' error while compiling RealityKitContent assets. This happens only when I try to build project with .usdz models exported from Blender, but when I try with sample models from apple website it works nice with no errors. Is there any solution?
2
0
600
Sep ’24
Xcode 16 Crash when opening existing Project
HI, I've updated to Xcode 16 (via App Store Update). When opening my project, Xcode crashes during the "Resolving Package Graph" phase. When opening other projects without dependencies, there is no crash. The same project opens in Xcode 15 without a problem. What can I do to solve this? I'm using a M1 Mac mini. BR, Holger ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: Xcode [31068] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 16.0 (23051) Build Info: IDEApplication-23051000000000000~2 (16A242d) App Item ID: 497799835 App External ID: 869020508 Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2024-09-17 14:54:37.6473 +0200 OS Version: macOS 14.5 (23F5059e) Report Version: 12 Anonymous UUID: AF4F3464-F5C0-CFBD-4CDF-6D21A8B8CEDC Sleep/Wake UUID: 0688C7F5-AE00-4295-ADA6-7224A11963EA Time Awake Since Boot: 18000 seconds Time Since Wake: 211 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6 Terminating Process: Xcode [31068] Application Specific Information: abort() called Application Specific Signatures: NSInvalidArgumentException Application Specific Backtrace 0: 0 CoreFoundation 0x000000018180b31c __exceptionPreprocess + 176 1 DVTFoundation 0x0000000104a945cc DVTFailureHintExceptionPreprocessor + 388 2 libobjc.A.dylib 0x00000001812f2788 objc_exception_throw + 60 3 CoreFoundation 0x00000001818fea0c -[__NSCFString characterAtIndex:].cold.1 + 0 4 CoreFoundation 0x00000001817f0f44 -[NSMutableArray insertObjects:atIndexes:] + 1020 5 IDEFoundation 0x000000010cfe6c84 __50-[IDEGroup insertGroupSubitems:atIndexes:context:]_block_invoke + 1084 6 DVTFoundation 0x0000000104ba3798 -[DVTModelObjectGraph performBlockCoalescingModelChanges:] + 60 7 IDEFoundation 0x000000010cfe67a8 -[IDEGroup insertGroupSubitems:atIndexes:context:] + 248 8 DVTFoundation 0x0000000104b6267c -[NSMutableArray(DVTFoundationClassAdditions) dvt_sortedInsertOfObjects:withComparator:] + 184 9 IDESwiftPackageCore 0x0000000306ac8620 $s19IDESwiftPackageCore23IDESPMWorkspaceDelegateC32registerDependencyFileReferences33_033DB97E8C2A552F3158921835EE9F98LL_27modelGraphSynchronizerTokenySayAA0abgH9ReferenceO010dependencyU0_AC16RegistrationModeAELLO012registrationX0tG_AC05ModelrsT0AELLVtFTf4ndn_n + 760 10 IDESwiftPackageCore 0x0000000306acb728 $s19IDESwiftPackageCore23IDESPMWorkspaceDelegateC27dependencyPackagesDidUpdate33_033DB97E8C2A552F3158921835EE9F98LL8packages14graphHasErrors25revalidatedFilePathCaches27modelGraphSynchronizerTokenySay7SwiftPM10SPMPackageCG_Sb13DVTFoundation11AffirmativeOAC05ModelZ17SynchronizerTokenAELLVtFTf4nnndn_n + 356 11 IDESwiftPackageCore 0x0000000306ac3640 $s19IDESwiftPackageCore23IDESPMWorkspaceDelegateC27packageGraphDidFinishAction_8duration6resulty7SwiftPM12SPMWorkspaceC0bgJ0O_SdAG0oebgJ16ResolutionResultOtYaFyAC05ModelG17SynchronizerToken33_033DB97E8C2A552F3158921835EE9F98LLVXEfU_ + 484 12 IDESwiftPackageCore 0x0000000306ac70dc $s19IDESwiftPackageCore23IDESPMWorkspaceDelegateC38disableWorkspaceContentSynchronization33_033DB97E8C2A552F3158921835EE9F98LL6duringyyAC27ModelGraphSynchronizerTokenAELLVXE_tFyyXEfU_TA + 20 13 DVTFoundation 0x0000000104d75b50 $sSo19DVTModelObjectGraphC13DVTFoundationE34performBlockCoalescingModelChangesyxxyXElFyyXEfU_ + 104 14 DVTFoundation 0x0000000104d3ce00 $sSDySSSo8NSObjectCGIgo_ACIego_TR + 20 15 DVTFoundation 0x0000000104d75868 $sIeg_IyB_TR + 20 16 DVTFoundation 0x0000000104ba3878 __58-[DVTModelObjectGraph performBlockCoalescingModelChanges:]_block_invoke + 104 17 DVTFoundation 0x0000000104b9d324 -[DVTModelGraphTransactionScope performTransaction:] + 60 18 DVTFoundation 0x0000000104ba37f0 -[DVTModelObjectGraph performBlockCoalescingModelChanges:] + 148 19 DVTFoundation 0x0000000104d76308 $sSo19DVTModelObjectGraphC13DVTFoundationE34performBlockCoalescingModelChangesyxxyXElF + 344 20 IDESwiftPackageCore 0x0000000306ab97f0 $s19IDESwiftPackageCore23IDESPMWorkspaceDelegateC38disableWorkspaceContentSynchronization33_033DB97E8C2A552F3158921835EE9F98LL6duringyyAC27ModelGraphSynchronizerTokenAELLVXE_tF + 444 21 IDESwiftPackageCore 0x0000000306ac265c $s19IDESwiftPackageCore23IDESPMWorkspaceDelegateC27packageGraphDidFinishAction_8duration6resulty7SwiftPM12SPMWorkspaceC0bgJ0O_SdAG0oebgJ16ResolutionResultOtYaFTY4_ + 164 22 IDESwiftPackageCore 0x0000000306a98191 $sIeAgH_ytIeAgHr_TRTATQ0_ + 1 23 SwiftPM 0x000000031c735571 $s7SwiftPM12SPMWorkspaceC26packageGraphActionFinished33_918CA8CFEB8D3E06D2EEA2771EA5EA00LLyyAC07PackageE16ResolutionResultAELLVYaFTQ1_ + 1 24 SwiftPM 0x000000031c734e8d $s7SwiftPM12SPMWorkspaceC46processPackageGraphActionsInBackgroundIfNeeded33_918CA8CFEB8D3E06D2EEA2771EA5EA00LL010canProcessefG0yAC11AffirmativeO_tFyyYaYbcfU1_yyYacfU0_TQ1_ + 1 25 SwiftPM 0x000000031c782dfd $s7SwiftPM33SPMWorkspaceOrchestrationDelegateP27packageGraphDidFinishAction_8duration6resultyAA0C0C07PackagegJ0O_SdAA0cemgJ16ResolutionResultOtYaFTjTQ0_ + 1 26 SwiftPM 0x000000031c7f7c79 $sxIeAgHr_xs5Error_pIegHrzo_s8SendableRzs5NeverORs_r0_lTRyt_Tg5TQ0_ + 1 27 SwiftPM 0x000000031c77f571 $sxIeAgHr_xs5Error_pIegHrzo_s8SendableRzs5NeverORs_r0_lTRyt_Tg5TATQ0_ + 1 28 libswift_Concurrency.dylib 0x00000002491de0f9 _ZL23completeTaskWithClosurePN5swift12AsyncContextEPNS_10SwiftErrorE + 1
4
2
1.6k
Sep ’24
fed up with xcode and its recurring bugs
Xcode doesn't download the “manual” provisioning profiles for my iOS apps, and when I do so from the site there's no way to install them properly. One day Apple will have to fix this, it's really the annoying thing every time we renew our certificates or update macOS and Xcode!
4
0
288
Sep ’24
Black text on white button on iOS 18 Accented Home Screen Widget
Hi. I am making my widgets ready for iOS 18 accented Home Screen widgets. I am having issues setting the color of text to black. This is required as I have a white button with black text and black icon. I have tried manually, without using my Color, to set the text to .black or .white. It will always be white. When applying the accent, I can use the .widgetAccentedRenderingMode(.fullColor) to turn the icon black, but I cannot do this for the text. Button(intent: --intent--) { HStack(alignment: .center) { Text("Play") .font(.system(size: 12, weight: .bold)) .foregroundStyle(Color("buttonAccentColor")) // Problem here, this is forced to be white, I want it to be black Image("resume") .renderingMode(.template) .resizable() .widgetAccentedRenderingMode(.fullColor) // This works .aspectRatio(contentMode: .fit) .frame(width: 16, height: 16) .foregroundStyle(Color("buttonAccentColor")) } .padding(8) .padding(.horizontal, 8) } .buttonStyle(.plain) .background(Color("neutral100")) .clipShape(Capsule())
1
3
491
Sep ’24
Symbol Not Found Error in VNFaceLandmarkRegion2D with MacCatalyst on macOS 14.6.1 (Xcode 16)
We have updated our cross-platform applications to support iOS 18 and are in the final stages of releasing versions built with MacCatalyst. After merging the MacCatalyst changes with those for iOS 18, we are now required to build the app using Xcode 16. However, since transitioning to Xcode 16, the app builds successfully but crashes immediately on startup with the following error: dyld[45279]: Symbol not found: _$sSo22VNFaceLandmarkRegion2DC6VisionE16normalizedPointsSaySo7CGPointVGvg Referenced from: <211097A0-6612-3A9A-80B5-AE12915EBA2A> /Users/***/Library/Developer/Xcode/DerivedData/DM_iOS_Apps-gzpzdsacfldxxwclyngreqkbhtey/Build/Products/Debug-maccatalyst/MyApp.app/Contents/Frameworks/Filters_MyApp.framework/Versions/A/Filters_MyApp Expected in: <50DB755E-C83C-3FC7-A0BB-9C4DF9FEA374> /System/Library/Frameworks/Vision.framework/Versions/A/Vision This crash occurs only when building the app with Xcode 16 for MacCatalyst on macOS 14.6.1. On iOS and macOS 15, it functions as expected, and it also worked prior to the iOS 18 changes, which are independent of the Vision framework code, when building with Xcode 15. Here are the environment details where the error occurs: Xcode Version: Xcode 16.0 (16A242d) macOS Version: macOS Sonoma 14.6.1 And the setup where it works: Xcode Version: Xcode 16.0 (16A242d) macOS Version: macOS Sequoia 15.0 Additionally, attempting to implement a workaround using pointsInImage(imageSize:) resulted in a similar issue, where the symbol for this method is also missing. Is this a known issue? Are there any workarounds or fixes available? We have already submitted this issue as feedback (FB15164375), along with a demo project to illustrate the problem.
2
0
782
Sep ’24
'ExtensionFoundation/EXMacros.h' file not found
I have a project which will not build on with XCode 16. I get a bunch of build errors like the following: :1:9: note: in file included from :1: #import "Headers/ExtensionFoundation.h" ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/ExtensionFoundation.framework/Headers/ExtensionFoundation.h:9:9: error: 'ExtensionFoundation/EXMacros.h' file not found #import <ExtensionFoundation/EXMacros.h> ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/ExtensionFoundation.framework/Headers/ExtensionFoundation.h:9:9: note: did not find header 'EXMacros.h' in framework 'ExtensionFoundation' (loaded from '/System/Library/PrivateFrameworks') #import <ExtensionFoundation/EXMacros.h> ^ :0: error: could not build Objective-C module 'ExtensionFoundation' I'm stumped. Can anyone help? I'm running Sequoia 15.0.
2
0
363
Sep ’24
Failed to launch app in reasonable time Xcode 16
I've updated my computer to Sequoia 15, Xcode 16 and now no matter what I do, I am unable to work with Swift UI previews. I get this error each time I try to run the preview: Failed to launch app in reasonable time I have done: Uninstall/Re-install Xcode Deleted derived data Deleted the simulator data Used DevCleaner to remove all data related to Xcode Searched all websites about this issue. ( Non shown a good solution ) Write this question on here. If anyone has found a solution, please let me know how you fixed it.
15
20
6.1k
Sep ’24
Xcode build time frustration
We have a Xcode project consisting of: A mix of Swift and Objective-C code app code ~ 1600 source files. Roughly around 35 {XC}Frameworks. Some of them are binary and some of them are getting built as a dependency to our app, etc. Binary libraries. Most of the frameworks built together with app code are Objective-C or Swift-based, which have their own amount of sources files and framework dependencies. The binary frameworks mostly contain cross-platform C++ code. Our (the poor developers) frustration is that almost all time when we do a insignificant change (or even just tap Cmd-R without any changes) in Swift-file or Objective-C file (.m) and then build again then big sh*t show starts again... For example: Frameworks may get rebuilt even though they are not touched. Tons of app-level files get built again even though no interface changes, etc. was made. Module verifier keeps verifying modules not touched at all, which takes really long time. Xcode 16 didn't seems to improve the situation - on the contrary. Example of an untouched framework that for unknown reason goes trough this every time we build: I know it is hard to come with ideas to solve this for an unknown larger project. But do other people with similar-size projects also experience this or is re-building not an issue for you? Cheers!
6
5
5.6k
Sep ’24
Adding ObjC Files in Xcode Packages Requires a Clean Build
We’ve been encountering build failures when switching Git branches in Xcode (15 & 16), where the project fails to build due to missing symbols. Typically, running an Xcode clean resolves the issue, but this is disruptive—especially on large projects where a full rebuild after cleaning can be time-consuming. We’ve managed to reproduce this issue in a minimal setup: Create a new Xcode project. Include a local Swift Package in the project. The main project depends on the package. Add a new Objective-C class to the package. Use that new class in the main project. Build (FAILS). Clean the project. Build (SUCCEEDS). This issue tends to arise when switching Git branches that introduce new files, such as Objective-C files that don’t exist on the main branch. If a new file is introduced in a feature branch, switching between main and feature requires a clean before the project will build successfully again. We plan to file a feedback report, but in the meantime, we’re wondering if anyone has found effective workarounds for this problem when switching branches. The only reasonable work-around we have found is to create an umbrella header manually and include the new header. It would be nice to not have to resort to maintaining umbrella headers in packages but this is ok.
0
0
365
Sep ’24
Xcode 15 crash
Xcode 15 crashes immediately upon opening, and I am unable to work. This issue occurs on both macOS 13 and macOS 14. Xcode 14 also experiences intermittent freezing, but at least it is still somewhat usable. I hope you can help me resolve this issue.
1
0
272
Sep ’24
Unable to Vertify App/ Preview only on iPhone
Choose the real iPhone device on my Xcode and build for running. Xcode warn me to vertify the Developer App certification in VPN & Device Management. When I get through it as vertify. The setting page still ask me to vertify the app. I press the "Vertify App" Button and press "Vertify" but it can't work. And it also cannot preview when I choose my device in the previewer. But both work well on my iPad Air. I can pass the vertify app and also can preview through Xcode. I searched the problem in forum.i found someone who has the same problem. https://developer.apple.com/forums/thread/744579 I try to change my network environment, reboot the device, reboot the develop laptop, but still cannot work. I'm using Xcode Version 16.0 (16A242d) iPhone 14 Pro with iOS 18.0 (22A3354) iPad Air 3 with iPad OS 17.6.1
0
0
337
Sep ’24
TvOS18 Simulator is crashing with collectionview dequeue
After updating Xcode to version-16 and TVOS Simulator to version-18, It started crashing at collectionview dequeue cell. Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Expected dequeued view to be returned to the collection view in preparation for display. When the collection view's data source is asked to provide a view for a given index path, ensure that a single view is dequeued and returned to the collection view. Avoid dequeuing views without a request from the collection view. Only happening with tvOS18 simulator, it is working fine with tvos17 simulator and Real Device with TvOS18.
5
3
1.6k
Sep ’24
Xcode 16.0 Simulator not showing autofill/password sheet
I am currently experiencing issues with the simulator in Xcode 16.0 when running Simulator Devices. When tapping any password field, the sheet presenting autofill/password suggestions does not appear properly. It is stuck at the bottom of the screen. I am facing this issue both in my own app and in the Safari app on the simulator, as shown in the screenshots. Is anyone else experiencing this issue?
2
0
408
Sep ’24