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

Posts under Xcode tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Resolving a "Simulator runtime is not available" error
Some Macs recently received a macOS system update which disabled the simulator runtimes used by Xcode 15, including the simulators for iOS, tvOS, watchOS, and visionOS. If your Mac received this update, you will receive the following error message and will be unable to use the simulator: The com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime is not available. Domain: com.apple.CoreSimulator.SimError Code: 401 Failure Reason: runtime profile not found using "System" match policy Recovery Suggestion: Download the com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime from the Xcode To resume using the simulator, please reboot your Mac. After rebooting, check Xcode Preferences → Platforms to ensure that the simulator runtime you would like to use is still installed. If it is missing, use the Get button to download it again. The Xcode 15.3 Release Notes are also updated with this information.
0
0
8.1k
May ’24
Xcode 26 Beta 4 crashes on closing of project
Does anyone have this issue of Xcode 26 Beta 4 crashing on closing of their project? Currently running on macOS 26 Beta 4 on a MacBook Air M2 with 16GB of ram. Each time i close a project, Xcode 26 Beta 4 will crash. The window pops up to send a report. Opening Xcode 26 Beta 4 will reopen the previous project. If you have multiple projects opened, all these projects will always reopen.
0
0
43
4h
Icon Composer: Any way to add icons to the app bundle for older macOS versions?
Several app developers are struggling with the inability to provide a separate app icons that looks nice on older macOS versions while at the same time provide Icon Composer icons that look great on macOS Tahoe 26. An ability to provide separate icons is super important to those who have app icons that follow the curvature of the default icon borders (as the corner rounding radius is different for Sequia and Tahoe). Take a look at this for example: https://github.com/ghostty-org/ghostty/issues/7564#issuecomment-3042061547 Question: Is there a definitive/recommended way to address this issue? How can a developer add a glass icon variant that looks good on Tahoe and provide a bitmap icon for older macOS versions? Some background info: Prior to Xcode 26 beta 4, one could add an App Icon to Assets to be used as app icon for legacy macOS versions (Sequia and older) and use a new Icon Composer icon (placed in the project root) for macOS Tahoe 26. Enabling "Include all app icon assets" under target settings ensured that older macOS versions would use the old app icons while Tahoe the new Icon Composer glass one. Since Xcode beta 4 this technique no longer works. Xcode instead insists on populating Assets.car with Icon Composer generated variants, disregarding the App Icon provided in Assets. Although the App Icon in Assets makes its way to a .incs file in the app bundle's Contents/Resources folder, but that is not used by macOS anymore and is there for some compatibility purposes. The Assets.car file (which matters) only contains the variants generated by Icon Composer and does not contain the png icons provided in the Assets.
0
2
96
21h
App Store Connect Upload Fails with Icon Alpha Channel Error in Xcode 26 Beta 4
After updating to Xcode 26 Beta 4, I can no longer upload my app to App Store Connect due to a WatchKit icon validation error. The error states: Invalid Icon. The watch application 'YourApp.app/Watch/YourWatchApp.app' contains an icon file 'Icon Image-AppIcon-watch-1024x1024 @1x.png' with an alpha channel. Icons should not have an alpha channel. • This file name doesn’t exist in the asset catalog or project source. • All icon assets used in the Watch App’s AppIcon set, including the required 1024x1024 icon, were checked with sips -g hasAlpha and confirmed to not contain an alpha channel. • Project was cleaned, derived data cleared, and archive recreated multiple times. • This issue only began after updating to Xcode 26 Beta 4. In the previous versions, everything was ok. Is anyone else experiencing this after upgrading Xcode to Beta 4? Any idea/workaround on how to solve this would be appreciated.
6
1
109
10h
Huge UI difference between Simulator and Real Device
Hi everyone, I’m testing our SwiftUI app on both Xcode simulator and a real iPhone. On the simulator, everything looks clean and aligned. But when I run it on an actual iPhone (same build, iOS 18), the layout looks broken—fonts overlap, spacing is off, and elements are misaligned. Both screenshots are from the exact same screen and time. First is simulator, second is iPhone. Any idea why this difference happens? Is there something I should check in terms of rendering or layout settings? Thanks in advance!
0
0
164
1d
Cannot find 'atomic_flag' in scope in Xcode 26
Hi, In Xcode 16.4, the atomic_flag() method can be used, but in Xcode 26.0, it is not available. An error message saying Cannot find 'atomic_flag' in scope is displayed. This can be reproduced simply by trying to use atomic_flag() in a newly created empty project. Thank you. Xcode: Version 26.0 beta 4 (17A5285i), macOS: 15.5(24F74) import SwiftUI struct ContentView: View { var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") } .padding() .task { _ = atomic_flag() } } }
0
0
55
1d
Using Previews causes a system crash on Xcode 26 Beta 4 and MacOS 26 Beta 4
Hey, I've updated to both Xcode 26 Beta 4 and MacOS 26 Beta 4. Both run super stable so far. However, every time I use Xcode Previews for a few minutes, the entire system freezes for a few seconds and then crashes and reboots. I'm trying to generate a system diagnosis (which it offers me after the reboot), but it seems to be stuck generating. It's hard to say what exactly causes the crash, unfortunately. But it happened multiple times after starting to use Xcode Previews. Anyone else has that problem? I've also filed a feedback for this: FB19013059 Cheers Dennis
3
3
92
23h
The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels
Trying to publish my .NET MAUI app via the transporter after migrating it from Xamarin (using the App Store Connect feature directly within visual studio 2022 has never worked for me) and getting this error. Validation failed (409) Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.0. To support older versions of iOS, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. I have setup my maui app to use the asset catalog with the .pngs setup as bundled resources and I have also tried using the .svg method, both resulting in this error. When I zip and unzip my .ipa file I can see the asset catalog as part of the payload (C:\Archives\AIM_MAUI\Payload\AIM_MAUI.app\AppIcon.appiconset) Here is the contents of the Contents.json file { "images" : [ { "filename" : "icon_40.png", "idiom" : "iphone", "scale" : "2x", "size" : "20x20" }, { "filename" : "icon_60.png", "idiom" : "iphone", "scale" : "3x", "size" : "20x20" }, { "filename" : "icon_58.png", "idiom" : "iphone", "scale" : "2x", "size" : "29x29" }, { "filename" : "icon_87.png", "idiom" : "iphone", "scale" : "3x", "size" : "29x29" }, { "filename" : "icon_80.png", "idiom" : "iphone", "scale" : "2x", "size" : "40x40" }, { "filename" : "icon_120.png", "idiom" : "iphone", "scale" : "3x", "size" : "40x40" }, { "filename" : "icon_120.png", "idiom" : "iphone", "scale" : "2x", "size" : "60x60" }, { "filename" : "icon_180.png", "idiom" : "iphone", "scale" : "3x", "size" : "60x60" }, { "filename" : "icon_20.png", "idiom" : "ipad", "scale" : "1x", "size" : "20x20" }, { "filename" : "icon_40.png", "idiom" : "ipad", "scale" : "2x", "size" : "20x20" }, { "filename" : "icon_29.png", "idiom" : "ipad", "scale" : "1x", "size" : "29x29" }, { "filename" : "icon_58.png", "idiom" : "ipad", "scale" : "2x", "size" : "29x29" }, { "filename" : "icon_40.png", "idiom" : "ipad", "scale" : "1x", "size" : "40x40" }, { "filename" : "icon_80.png", "idiom" : "ipad", "scale" : "2x", "size" : "40x40" }, { "filename" : "icon_76.png", "idiom" : "ipad", "scale" : "1x", "size" : "76x76" }, { "filename" : "icon_152.png", "idiom" : "ipad", "scale" : "2x", "size" : "76x76" }, { "filename" : "icon_167.png", "idiom" : "ipad", "scale" : "2x", "size" : "83.5x83.5" }, { "filename" : "icon_1024.png", "idiom" : "ios-marketing", "scale" : "1x", "size" : "1024x1024" } ], "info" : { "author" : "xcode", "version" : 1 } } I have tried manually using the actool tool from Xcode 16.4 to create the Assets.car file that is seeming to be missing and leading to this issue but even that can't compile the icons (or even a simple sample appicon.appiconset from Xcode with a singular .png added) and I am beginning to think there's an issue with the actool itself. I have tried reinstalling Xcode and every time the actool is just a partial download or a stub of the tool and not the real tool (actool size on my Mac is only 170kb and per my research it should be at least a couple mb) Is there any workaround?
1
0
162
3d
App Crashes in Xcode 26 Beta 3
Hi, I'm trying to install run the app in Xcode 26 Beta 3 and getting the below error. *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Error during decoding of 1723: Error Domain=NSCocoaErrorDomain Code=4864 "Class 'BSAuditToken' has a superclass that supports secure coding, but 'BSAuditToken' overrides -initWithCoder: and does not override +supportsSecureCoding. The class must implement +supportsSecureCoding and return YES to verify that its implementation of -initWithCoder: is secure coding compliant." UserInfo={NSDebugDescription=Class 'BSAuditToken' has a superclass that supports secure coding, but 'BSAuditToken' overrides -initWithCoder: and does not override +supportsSecureCoding. The class must implement +supportsSecureCoding and return YES to verify that its implementation of -initWithCoder: is secure coding compliant.}' terminating due to uncaught exception of type NSException CoreSimulator 1043 - Device: iPhone 16 Pro (F158F199-A41E-4967-87C6-58A42C9C1954) - Runtime: iOS 26.0 (23A5287g) - DeviceType: iPhone 16 Pro Appreciate the help in advance
2
0
186
3d
Xcode compile stucks(stops) when add new source files or add functions to previous files
Hello, we are working on a iOS game project, as progress, the project grows larger and larger. Because we are using other game dependencies and libraries, here larger and larger refers to the whole project, and our source files integrated and compiled by Xcode are not many. Now, it seems we hit a bottleneck, when I add new files or functions to the previous files to implement a new feature, Xcode compile stucks(stops), it's Indexing | Initializing datastore forever, cannot produce a final build. macOS 15.1, Xcode 16.2 Can you provide any solutions to solve this problem? Also submitted Feedback ID #FB18432749
1
0
557
3d
High CPU Usage in SwiftUI UIHostingController on iOS 26 Beta
Experiencing 100% CPU usage in SwiftUI app using UIHostingController, only on iOS 26 beta and Xcode beta. Issue involves excessive view updates in AttributeGraph propagation. Stack trace (main thread): thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP frame #0: 0x00000001c38b9aa4 AttributeGraph`AG::Graph::propagate_dirty(AG::AttributeID) + 416 frame #1: 0x00000001d9a743ec SwiftUICore`SwiftUI.ObservationGraphMutation.apply() -> () + 656 frame #2: 0x00000001d97c0d4c SwiftUICore`function signature specialization <Arg[2] = [Closure Propagated : closure #1 () -> () in SwiftUI.(AsyncTransaction in _F9F204BD2F8DB167A76F17F3FB1B3335).apply() -> (), Argument Types : [SwiftUI.AsyncTransaction]> of generic specialization <()> of closure #1 () throws -> τ_0_0 in SwiftUI.withTransaction<τ_0_0>(SwiftUI.Transaction, () throws -> τ_0_0) throws -> τ_0_0 + 336 frame #3: 0x00000001d9a6ac80 SwiftUICore`merged function signature specialization <Arg[3] = Owned To Guaranteed> of function signature specialization <Arg[1] = [Closure Propagated : implicit closure #2 () -> () in implicit closure #1 @Sendable (SwiftUI.(AsyncTransaction in _F9F204BD2F8DB167A76F17F3FB1B3335)) -> () -> () in SwiftUI.GraphHost.flushTransactions() -> (), Argument Types : [SwiftUI.AsyncTransaction]> of SwiftUI.GraphHost.runTransaction(_: Swift.Optional<SwiftUI.Transaction>, do: () -> (), id: Swift.Optional<Swift.UInt32>) -> () + 196 frame #4: 0x00000001d9a52ab0 SwiftUICore`SwiftUI.GraphHost.flushTransactions() -> () + 176 frame #5: 0x00000001d8461aac SwiftUI`closure #1 (SwiftUI.GraphHost) -> () in SwiftUI._UIHostingView._renderForTest(interval: Swift.Double) -> () + 20 frame #6: 0x00000001d9bf3b38 SwiftUICore`partial apply forwarder for closure #1 (SwiftUI.ViewGraph) -> τ_1_0 in SwiftUI.ViewGraphRootValueUpdater.updateGraph<τ_0_0>(body: (SwiftUI.GraphHost) -> τ_1_0) -> τ_1_0 + 20 frame #7: 0x00000001d9e16dc4 SwiftUICore`SwiftUI.ViewGraphRootValueUpdater._updateViewGraph<τ_0_0>(body: (SwiftUI.ViewGraph) -> τ_1_0) -> Swift.Optional<τ_1_0> + 200 frame #8: 0x00000001d9e1546c SwiftUICore`SwiftUI.ViewGraphRootValueUpdater.updateGraph<τ_0_0>(body: (SwiftUI.GraphHost) -> τ_1_0) -> τ_1_0 + 136 frame #9: 0x00000001d8461a7c SwiftUI`closure #1 () -> () in closure #1 () -> () in closure #1 () -> () in SwiftUI._UIHostingView.beginTransaction() -> () + 144 frame #10: 0x00000001d846aed0 SwiftUI`partial apply forwarder for closure #1 () -> () in closure #1 () -> () in closure #1 () -> () in SwiftUI._UIHostingView.beginTransaction() -> () + 20 frame #11: 0x00000001d984f814 SwiftUICore`closure #1 () throws -> τ_0_0 in static SwiftUI.Update.ensure<τ_0_0>(() throws -> τ_0_0) throws -> τ_0_0 + 48 frame #12: 0x00000001d984e114 SwiftUICore`static SwiftUI.Update.ensure<τ_0_0>(() throws -> τ_0_0) throws -> τ_0_0 + 96 frame #13: 0x00000001d846aeac SwiftUI`partial apply forwarder for closure #1 () -> () in closure #1 () -> () in SwiftUI._UIHostingView.beginTransaction() -> () + 64 frame #14: 0x00000001851eab1c UIKitCore`___lldb_unnamed_symbol311742 + 20 * frame #15: 0x00000001852b56a8 UIKitCore`___lldb_unnamed_symbol315200 + 44 frame #16: 0x0000000185175120 UIKitCore`___lldb_unnamed_symbol308851 + 20 frame #17: 0x00000001d984e920 SwiftUICore`static SwiftUI.Update.dispatchImmediately<τ_0_0>(reason: Swift.Optional<SwiftUI.CustomEventTrace.ActionEventType.Reason>, _: () -> τ_0_0) -> τ_0_0 + 300 frame #18: 0x00000001d95a7428 SwiftUICore`static SwiftUI.ViewGraphHostUpdate.dispatchImmediately<τ_0_0>(() -> τ_0_0) -> τ_0_0 + 40 frame #19: 0x00000001852b59dc UIKitCore`___lldb_unnamed_symbol315204 + 192 frame #20: 0x00000001852b54a4 UIKitCore`___lldb_unnamed_symbol315199 + 64 frame #21: 0x0000000185745dd4 UIKitCore`_UIUpdateSequenceRunNext + 120 frame #22: 0x0000000186144fac UIKitCore`schedulerStepScheduledMainSectionContinue + 56 frame #23: 0x00000002505ad150 UpdateCycle`UC::DriverCore::continueProcessing() + 36 frame #24: 0x0000000180445b20 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 frame #25: 0x0000000180445a68 CoreFoundation`__CFRunLoopDoSource0 + 168 frame #26: 0x00000001804451f4 CoreFoundation`__CFRunLoopDoSources0 + 220 frame #27: 0x00000001804443a8 CoreFoundation`__CFRunLoopRun + 756 frame #28: 0x000000018043f458 CoreFoundation`_CFRunLoopRunSpecificWithOptions + 496 frame #29: 0x00000001928d19bc GraphicsServices`GSEventRunModal + 116 frame #30: 0x0000000186224480 UIKitCore`-[UIApplication _run] + 772 frame #31: 0x0000000186228650 UIKitCore`UIApplicationMain + 124 frame #32: 0x000000010bb1b504 MyApp.debug.dylib`main at main.swift:13:1 frame #33: 0x00000001043813d0 dyld_sim`start_sim + 20 frame #34: 0x000000010468ab98 dyld`start + 6076 Used let _ = Self.printChanges() in my SwiftUI View and got infinite changes of \_UICornerProvider.<computed 0x000000018527ffd8 (Optional<UICoordinateSpace>)> changed. Reproduces only on beta; works on stable iOS. Likely beta-specific bug in SwiftUI rendering.
0
0
140
3d
Xcode 26.0 beta 3: Clicking current branch in Source Control navigator doesn't show commit history
[Also submitted as FB18858239] In Xcode 26.0 beta 3 (17A5276g), clicking the current branch (e.g. "main") in the Source Control navigator no longer displays the commit history. Instead, the editor area remains stuck on the previously viewed file. REPRO STEPS Create a new iOS Swift UI app. Name it "Test" and check the Create Git repository on my Mac checkbox. In the Navigator select Source Control navigator. In Source Control, select Repositories. Expand "Test" then "Branches" the select "main (current)" CURRENT RESULTS The main view remains on the ContentView.swift file. EXPECTED RESULTS The main view changes to show the commit history. SCREENSHOTS Xcode 26.0 beta 3 Xcode 16.4
2
0
175
1d
Unable to pair xcode with vision pro
So I have an apple developer account, a mac running Sequoia, and a Vision Pro, all I want to do is run my build on the headset, but I can't connect the headset to Xcode on the mac. I've tried the steps I've seen online with no luck, as I can't see the device I cannot complete step 3: Connect to same wifi network On Vision Pro -&gt; Settings &gt; General &gt; Remote Devices On Mac -&gt; Xcode -&gt; Devices &amp; Simulators -&gt; Select the Vision Pro &amp; enter the code On Mac -&gt; Run a build targeted at your vision pro device which should now be a run destination (Developer mode setting wasn't visible till I did this), you will get an error saying developer mode is not enabled On Vision Pro -&gt; Privacy &amp; Security &gt; Developer Mode I have tried multiple networks, hotspots, disabled my firewall, disabled settings like airdrop &amp; airplay, made sure both devices are up to date, even tried a developer beta OS on the vision pro. I can connect to the mac to share the screen on the vision pro but am unable to simply connect to xcode to run a build.
4
0
104
6d
Publish IPA
Hello everyone, I build and run the app in iPhone in developer mode but now i am trying to install and run the app in another iPhone in which i did not turned on the developer mode. it installed but not opening without the Developer mode. Is there any another way to install and run the app with Developer mode for one time. If not then tell me the process how i can do publishing in testFlight or appStore. Thanks
1
0
46
1w
What is a reasonable way for a script that runs otool to handle the need to agree to a new license?
I run otool from a script (actually from a program) and find it annoying that otool fails if I need to agree to a new version of the Xcode and SDKs license. Is there a way to test ahead of time whether this will happen, or detect when this problem occurs, so that I can display a dialog to tell me what I need to do? This happened after upgrading from macOS Tahoe beta 1 to beta 3.
1
0
110
6d
Xcode 26 beta 3 Extremely Sluggish Run on Device
After updating from Xcode 16 to the new Xcode 26 beta 3, running my iOS app becomes slow to the point of unusable. It builds and installs fine, but when running with the console, it lags about 20-50x compared to building and running with Xcode 16. I wanted to try our Xcode 26 to preview my new app icon made in icon composer but now I don't think it's worth the hassle. When running via simulator, the same performance issues. Anybody also struggling with slow on-device testing speed? I am on Sequoia 15.5.
1
1
197
1w