Search results for

xcode github

91,991 results found

Post

Replies

Boosts

Views

Activity

SwiftUI app crash with __swift_instantiateConcreteTypeFromMangledName
Hello, I am experiencing a crash in a SwiftUI app. It happens when I place multiple views inside a ScrollView. The crash occurs only on a physical device (it does not reproduce in the Simulator). It happens during runtime, seemingly while SwiftUI is updating or laying out the view hierarchy. I have not been able to determine the exact cause. I am attaching a text file with the entire backtrace from LLDB. swiftui_crash_backtrace Is this a known SwiftUI issue? Any recommendations on how to further investigate or work around it? Any help or suggestions would be appreciated. Xcode 16.3 / iOS 18.6.2 Thank you!
1
0
102
2w
Keyboard dismissal not animated
Hello, I’ve encountered what seems to be a bug with the keyboard dismissal animation on iOS 26.0 Beta (25A5349a), Xcode Version 26.0 beta 5 (17A5295f). When dismissing the keyboard from a SwiftUI TextField using @FocusState, the keyboard does not animate downward as expected. Instead, it instantly disappears, which feels jarring and inconsistent with system behavior. I am attaching a short video demonstrating the issue. Below is the minimal reproducible code sample: // // ContentView.swift // TestingKeyboardDismissal // // Created by Sasha Morozov on 27/08/25. // import SwiftUI struct ContentView: View { @State private var text: String = @FocusState private var isFocused: Bool var body: some View { ZStack { Color.clear.ignoresSafeArea() VStack(spacing: 20) { TextField(Enter text here..., text: $text) .textFieldStyle(.roundedBorder) .focused($isFocused) .padding(.horizontal) HStack { Button(Focus) { isFocused = true } .buttonStyle(.borderedProminent) Button(Unfocus) { isFocused = false } .buttonStyle
2
0
119
2w
Storekit configuration broken in Xcode 16.4 the file has been changed
Hi everyone, After updating to Xcode 16.4, my StoreKit configuration stopped working. Whenever I run the app with a .storekit file set as the active scheme, I immediately get this alert: “The file has been changed. Do you want to save your changes or revert to the file on disk?” No matter if I choose Save Anyway or Revert, StoreKit testing does not work - the purchases are not simulated, and the scheme is basically broken. This issue didn’t exist in Xcode 15.4 - the same StoreKit configuration file works fine there. What I tried so far: Clearing Derived Data - no effect Making sure no scripts/tools modify the .storekit file - still happens Restarting Xcode and macOS - no change Environment: Xcode 16.4 Happens in both Simulator and on device Reproducible 100% Has anyone else seen this in 16.4? Any known workarounds until Apple fixes it? Thanks!
3
0
85
2w
Clarification on the purpose of return value in textFieldShouldReturn
I’m trying to understand the exact role of the return value in the UITextFieldDelegate method textFieldShouldReturn(_:). From my experiments in Xcode, I observed: Returning true vs false does not seem to cause any visible difference (e.g., the keyboard does not automatically dismiss either way). I know that in shouldChangeCharactersIn returning true allows the system to insert the character, and returning false prevents it. That’s clear. For textFieldShouldReturn, my current understanding is that returning true means “let the OS handle the Return press,” and returning false means “I’ll handle it myself.” My confusion: what is it that the OS actually does when it “handles” the Return press? Does UIKit do anything beyond calling this delegate method? If the system is supposed to dismiss the keyboard when returning true, why doesn’t it happen automatically? I’d appreciate clarification on the expected use of this return value — specifically, what default behavior the system performs (if any) when we ret
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
76
2w
[tvOS] ScrollView with Text does not scroll
I'm trying to do something so seemingly basic, yet I can't get it to work and I'm flummoxed. In a basic, vanilla SwiftUI app for tvOS, embed a single Text element with a very long string (hundreds of lines) in it: struct ContentView: View { var body: some View { ScrollView(.vertical) { Text(veryLargeString) .focusable() } } } Then fire up the app on tvOS, and it will not scroll. No matter what I do. Pressing arrow keys, swiping fast with my thumb, and nothing. It will not move. Ironically, in the Xcode SwiftUI Preview window—it does scroll, so that's always a fun tease. What I do know is that the focus engine is throwing a few errors, so it's leading me to believe the issue is with how I have the focusable element attached. I'm using a combination of -UIFocusLoggingEnabled YES as well as listening for UIFocusSystem.movementDidFailNotification. Unfortunately since this is SwiftUI, the notification failure and debugging logs aren't really all that actionable. Help appreciated!
3
0
1.3k
Mar ’25
Reply to Storekit configuration broken in Xcode 16.4 the file has been changed
I am experiencing a similar issue using an Xcode 16.4 with a simulator running IOS 18.6 I receive a series of this message when trying to load products from the StoreKit configuration file: Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue) If I enable Zombie Objects in the debugger, I also get these messages: Class _NSZombie_SKProductInternal is implemented in both ?? (0x1347517a0) and ?? (0x1347517d0). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed. I've tested the file on a handful of older simulators and everything works fine; neither error is reported on an IOS 18.0 simulator. I've also verified that things are working as expected with TestFlight so I'm less concerned about going to Production. Still, it would be nice be have a much higher level of confidence that there is not a serious bug somewhere before I roll out my next Production release.
Topic: App & System Services SubTopic: StoreKit Tags:
2w
Reply to Metal 4 & Acceleration Structures
Short answer is how you would use it in Obj-C, where scratchBuffer is a MTLBuffer e.g. [commandEncoder buildAccelerationStructure:accelerationStructure descriptor:desc scratchBuffer:MTL4BufferRange(scratchBuffer.gpuAddress, scratchBuffer.length)]; Can you provide more of your setup code or an Xcode project? I'm uncertain of what to think of the error message. What kind of Apple Silicon Mac are you using for development?
Topic: Graphics & Games SubTopic: Metal Tags:
2w
Xcode and runtime mismatch error
I keep getting iOS 18.5 must be installed: dialoge box and when i try downloding 18.5 it fail Download failed. Domain: DVTDownloadableErrorDomain Code: 41 User Info: { DVTErrorCreationDateKey = 2025-08-24 20:40:42 +0000; } Download failed. Domain: DVTDownloadableErrorDomain Code: 41 Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({ RequestedBuild = 22G86; }) Domain: DVTDownloadsUtilitiesErrorDomain Code: -1 Download failed due to a bad URL. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime) Domain: com.apple.MobileAssetError.Download Code: 49 User Info: { checkConfiguration = 1; } System Information macOS Version 15.5 (Build 24F74) Xcode 16.4 (23792) (Build 16F6) Timestamp: 2025-08-24T21:40:42+01:00
3
0
153
2w
Reply to Xcode and runtime mismatch error
When the new Xcode can't download simulators, it's usually a permissions issue. Solution: Set the new Xcode as default: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer Download iOS platform with sudo: sudo xcodebuild -downloadPlatform iOS If your Xcode isn't installed in the default path, update the path in step 1 to your actual installation location. This resolves the write permission issue for new simulators.
2w
Can't install Universal Simulator with Xcode-beta 5
When I try to install the iOS 26.0 Universal Simulator component with Xcode-beta 5 I get the following error: Download failed. Domain: DVTDownloadableErrorDomain Code: 41 User Info: { DVTErrorCreationDateKey = 2025-08-11 14:39:06 +0000; } -- Download failed. Domain: DVTDownloadableErrorDomain Code: 41 -- System Information macOS Version 15.6 (Build 24G84) Xcode 26.0 (24198.5) (Build 17A5295f) Timestamp: 2025-08-11T17:39:06+03:00
6
0
198
2w
Reply to Can't install Universal Simulator with Xcode-beta 5
When the new Xcode can't download simulators, it's usually a permissions issue. Solution: Set the new Xcode as default: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer Download iOS platform with sudo: sudo xcodebuild -downloadPlatform iOS If your Xcode isn't installed in the default path, update the path in step 1 to your actual installation location. This resolves the write permission issue for new simulators.
2w
Reply to Printing of NSTextView
The trick here is to make an off-screen copy of your NSTextView and copy your contents into it. Here's an example of how to do that: @IBAction func megaPrint(_ sender:Any?) { let printView = megaTextView! // NSTextView from your on-screen view hierarchy // make a new NSTextView copying the contents from your on-screen view // make sure to set the frame let printedView = NSTextView(frame: NSRect(origin:NSPoint(x:0, y:0), size:NSSize(width:480, height:200))) printedView.isVerticallyResizable = true printedView.isHorizontallyResizable = false printedView.textStorage!.append(printView.textStorage!.copy() as! NSAttributedString) // Create a new print operation and tell it to show the print and progress panels // and set some options for positioning the text in pages let printOperation = NSPrintOperation.init(view: printedView) printOperation.showsPrintPanel = true; printOperation.showsProgressPanel = true; printOperation.printInfo.isVerticallyCentered = false printOperation.printInfo.isHorizontallyCentere
Topic: UI Frameworks SubTopic: AppKit Tags:
2w
AppIntent, StartWorkoutIntent, and Siri
I'm a bit confused as to what we're supposed to be doing to support starting a workout using Siri in iOS/watchOS 26. On one hand, I see a big push to move towards App Intents and shortcuts rather than SiriKit. On the other hand, I see that some of the things I would expect to work with App Intents well... don't work. BUT - I'm also not sure it isn't just developer error on my part. Here are some assertions that I'm hoping someone more skilled and knowledgable can correct me on: Currently the StartWorkoutIntent only serves the Action button on the Watch Ultra. It cannot be used to register Shortcuts, nor does Siri respond to it. I can use objects inherited from AppIntent to create shortcuts, but this requires an additional permission to run a shortcut if a user starts a workout with Siri. AppIntent shortcuts requires the user to say Start a workout in - if the user leaves out the in part, Siri will not prompt the user to select my app. If I want to allow the user to simply say Start a Workout and have Siri p
1
0
90
2w
Fail to archive XCode
I’m trying to archive my app in Xcode but keep running into issues. When I attempt to archive, I see two errors: “Communication with Apple failed. Your team has no device from which to generate a provisioning profile. Connect a device to use or manually add a device ID in the certificate.” “No profiles were found” — Xcode can’t locate a matching iOS development provisioning profile. I’ve already added the device ID manually, set up my bundle identifier in Apple Connect (which was detected), and signed in with my Apple ID in Xcode. What steps should I take to resolve this? If there’s a thread, article, or anything that explains the fix, I will appreciate if you can share it as well. Also, is it common that I created the project, but my role shows as Admin instead of Account Holder? I tried to find a way to change my role from Admin to Account Holder, but I couldn’t find any resources. Thank you in advance for your help!
2
0
164
2w