Xcode tells me Previewing in executable targets now requires a new build layout for unoptimized builds. Either set ENABLE_DEBUG_DYLIB to YES for this target, or break out your preview code into a separate framework with its own scheme. How do enable that in Package.swift. swiftSettings don't work (.define and unsafeFlags with -D ...). Creating a library product that the executable then depends on doesn't help either. I have two targets, one is an executable target. The #Preview macro is in the non-executable target.
Search results for
build disappears
50,283 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Thanks for the post. It seems like you're experiencing issues with Xcode 26.2 on macOS Sequoia. So the preview stops rendering anything in a simple Hello World app? Would you like to post the app here for developers to test and see how it behaves? If so, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project. Verify that both your macOS and Xcode versions are fully updated. Since you're on Sequoia 15.7.3 and Xcode 26.2, check for any available updates for macOS that might address. I would recommend to move to macOS Tahoe. Sometimes, clearing derived data can resolve issues related to indexing and builds. You can do this by navigating to and deleting the contents. If the canvas is causing Xcode to hang, try disabling it temporarily. Open your project settings, navigate to the section, and uncheck “Live Views”. As a more drastic measure, consider completely uninstalling Xco
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
I am using Xcode (Version 26.2 (17C52)) -> Archive -> Distribute App (or Validate App) to upload my iOS app into App Store Connect. However I am always getting this error: I tried exporting the app as an IPA and uploading with Transporter, but I see the same error. I couldn't find any other useful logs or error messages. REPRODUCTION STEPS: Archive complete iOS app using Xcode 26.2 Upload to App Store Connect (upload succeeds) Apple's automated SPI analysis runs Validation fails with corrupted binary error TECHNICAL DETAILS: Target: iOS 15+ Xcode: 26.2 Architecture: arm64 More info: I have created the app in App Store Connect and this is my first time uploading. The app can build and run on my physical phone and emulator without any problem. Would be great to get some help! Thanks!
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
I have to say, I and everyone else in my team are very happy to see you analyse the dump of logs there. We had tried to read them many a times, but we did not manage to extract the insight you have. Thank you so much for the help. We will get rid of Go and it's weird stacks, but as per the docs (https://pkg.go.dev/os/signal#hdr-Non_Go_programs_that_call_Go_code) we might be installing some signal handlers, inadvertently. However, the original signal handlers should still be invoked, as pre the docs. For reference, we build the go library with buildmode c-archive. Even still, as per the docs, any time a signal is delivered, it should be handled the original signal handler, unless it was invoked on a Go routine. I would not be surprised if using Go in an iOS app was unsafe at any speed. So, something in your process is doing a synchronous blocking read on a pipe and that’s blocked indefinitely. And we can’t figure out what it is because the spindump isn’t showing the user-space component of the backtra
Topic:
App & System Services
SubTopic:
Networking
Tags:
Hello I am using 26.2 (25C56) on my m4 air. when I am working on a Flutter project suddenly my app crashed and after when I tried to build the application again this error occurs. How to fix it. ? Launching lib/main.dart on iPhone 16e in debug mode... Xcode build done. 2.4s Failed to build iOS app Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier: { id:45967BD9-44E0-4D5D-8C43-C5437F48836A }Available destinations for the Runner scheme: { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00008132-001E5102020B801C, name:My Mac } { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device } Could not build the application for the simulator. Error launching application on iPhone 16e.
the timeline editor feels often unfinished. Setting the time cursor to a different time is often not reflected in the preview. You either have to click a clip or wait. sometimes the cursor even disappears, eg. when switching tabs to shadergraph Not being able to select and move multiple clips is missing. There is also no snapping to clips or time cursor as found in other tools. And then there is the timeline compile bug https://developer.apple.com/forums/thread/810868 The timeline as it is, is a good start but it definitely needs some more love to be on par with other commercial tools like Unity or After Effects.
Topic:
Spatial Computing
SubTopic:
Reality Composer Pro
Hello, I've a question about performance when trying to render lots of items coming from SwiftData via a @Query on a SwiftUI List. Here's my setup: // Item.swift: @Model final class Item: Identifiable { var timestamp: Date var isOptionA: Bool init() { self.timestamp = Date() self.isOptionA = Bool.random() } } // Menu.swift enum Menu: String, CaseIterable, Hashable, Identifiable { var id: String { rawValue } case optionA case optionB case all var predicate: Predicate { switch self { case .optionA: return #Predicate { $0.isOptionA } case .optionB: return #Predicate { !$0.isOptionA } case .all: return #Predicate { _ in true } } } } // SlowData.swift @main struct SlowDataApp: App { var sharedModelContainer: ModelContainer = { let schema = Schema([Item.self]) let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false) return try! ModelContainer(for: schema, configurations: [modelConfiguration]) }() var body: some Scene { WindowGroup { ContentView() } .modelContainer(sharedModelContaine
[quote='869942022, compiler_flags, /thread/792453?answerId=869942022#869942022, /profile/compiler_flags'] including on products that have menu bars. [/quote] OK. That’s something I should look at because: This isn’t expected behaviour. And it’s not the behaviour that most developers see. But you’re obviously seeing it consistently. And I’ve seen reports similar to this from other developers, so there’s clearly something missing somewhere. [quote='869942022, compiler_flags, /thread/792453?answerId=869942022#869942022, /profile/compiler_flags'] I use netcat to create an opening listening port on one and then copied the compiled version of NetworkIssueTest.app … [/quote] OK. I’d like to try this here in my office. I specifically want to try it with the exact binary that you compiled, but it’d be great if I had the source code to build that as well. Probably the best way to get that to me is to file a bug. That way you can attach all the necessary bits. And, honestly, your latest test should work, so it’
Topic:
App & System Services
SubTopic:
Networking
Tags:
We have submitted a feedback for this issue: FB21230723 We're building a note-taking app for iOS and macOS that uses both UITextView and NSTextView. When performing text input that involves a marked range (such as Japanese input) in a UITextView or NSTextView with a UITextViewDelegate or NSTextViewDelegate set, the text view's marked range (markedTextRange / markedRange()) has not yet been updated at the moment when shouldChangeTextIn is invoked. UITextViewDelegate.textView(_:shouldChangeTextIn:replacementText:) NSTextViewDelegate.textView(_:shouldChangeTextIn:replacementString:) The current behavior is this when entering text in Japanese: (same for NSTextView) func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { print(textView.markedTextRange != nil) // prints out false DispatchQueue.main.async { print(textView.markedTextRange != nil) // prints out true } } However, we need the value of markedTextRange right away in order to determine wh
It’s better to reply as a reply, rather than in the comments; see Quinn’s Top Ten DevForums Tips for this and other titbits. Thanks for those answers. My advice here is that you change tack. Rather than try to set this at runtime based on an environment variable, have your installer install an app with the right icon. That doesn’t mean that you need N installers for your N icons. There are a couple of ways that you can customise the icon on the fly. The first is to have a post-install script that applies a custom icon to your app. This has one key advantage: It’s easy to implement (-: Specifically, setting a custom icon doesn’t affect the app’s code signature. However, I’m not sure it’s actually the right option for you, because of the issues you raised in your other thread, Changing the menu bar display name. There’s no way to set a custom app name like this. Honestly, I can’t think of a good way to set the app name at all. macOS expects apps to be static artefacts. While you can change some of this stuff at
Topic:
UI Frameworks
SubTopic:
General
Tags:
Introduction: I’m encountering a consistent crash in production on iOS 26.2 (build 23C55). The crash occurs deep within libicucore when calling [NSDateFormatter dateFromString:]. Crash Summary: Exception Type: SIGSEGV (SEGV_ACCERR) Fault Address: 0xffffffff Thread: Crashed on Main Thread (Thread 0) Library: libicucore.A.dylib Code Snippet: The crash is triggered by the following method. It converts a string to an NSDate using a specific format and locale: // 获取日期date - (NSDate *)getDateWithTime:(NSString *)time formatter:(NSString *)formatterStr { NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:formatterStr]; formatter.timeZone = [NSTimeZone timeZoneWithName:@Asia/Shanghai]; formatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@en_US_POSIX]; return [formatter dateFromString:time]; } Backtrace: Here is the relevant part of the crash report: Incident Identifier: E24485B6-C53E-4115-A6CF-A7E4A952AD50 CrashReporter Key: 21FAC1CF-F56B-409A-98AA-351D3D2EB06C Ha
Topic:
App & System Services
SubTopic:
General
Tags:
Foundation
iOS
Objective-C
Internationalization
[quote='872014022, lilan, /thread/773414?answerId=872014022#872014022, /profile/lilan'] Do you mean that I need to add that line on my entitlements? [/quote] I presume you’re referring to the get-task-allow entitlement. If so, then no, that’s not what I mean. That entitlement is managed by Xcode. It automatically adds it when you sign for development and omits it out when you sign for distribution. Let’s ignore development signing for the moment, because shipping apps are necessarily distribution signed. In that case, you have the three options outlined by TN3134: On supervised devices, the device manager can install a configuration profile that enables your content filter system wide. On managed devices, the device manager can use MDM to install a configuration profile that enables your content filter for specific managed apps, also installed by MDM. If you’re building a Screen Time app, your app can programmatically enable its content filter. This is subject to very specific criteria, outlined in t
Topic:
App & System Services
SubTopic:
Networking
Tags:
@bryan1anderson I don't think you can. If your dataset is large enough (like my example), you'll always get hangs. It looks to me like Query/Predicate is the issue here, they seem to run everything on the Swift side rather than being transformed into SQL queries that run directly on the underlying SQL database. On the example that I posted and that @DTS Engineer confirmed, the SQL part runs really fast, but the overall fetch is slow. I'd love for Apple to give this more attention, because if having a big dataset is a deal breaker, nobody -unless you're 100% sure your data will always be very small- should use Swift Data. Imagine if you build a very complex app using Swift Data and your dataset keeps growing, you'll hit a point where you need to re-write the model layer using Core Data, kinda insane if you ask me.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
I'm experiencing a contradictory validation issue with DeviceActivityReportExtension that creates an impossible situation: The Problem: Without NSExtensionPrincipalClass in Info.plist → App Store Connect rejects upload with: Missing Info.plist values. No values for NSExtensionMainStoryboard or NSExtensionPrincipalClass found With NSExtensionPrincipalClass → Local install fails with: defines either an NSExtensionMainStoryboard or NSExtensionPrincipalClass key, which is not allowed for the extension point com.apple.deviceactivityui.report-extension Setup: Extension point: com.apple.deviceactivityui.report-extension Using SwiftUI with @main attribute and DeviceActivityReportExtension protocol Xcode 16.2, iOS 17.6 deployment target Code structure: @main struct SpoolReport: DeviceActivityReportExtension { var body: some DeviceActivityReportScene { // Report scenes here } } The extension builds and runs perfectly without NSExtensionPrincipalClass, but cannot be uploaded to App Store Connect. Adding the key
Update / Resolution In my case, the flashing preview was not a capture pipeline issue, but a SwiftUI view lifecycle issue. The camera preview was conditionally shown using: authorized && session.isRunning && cameraReady During lock/unlock or camera switches, SwiftUI re-evaluates this condition multiple times. AVCaptureSession.isRunning can briefly fluctuate during interruption recovery, causing SwiftUI to: remove the preview view show a placeholder immediately reinsert the preview This rapid view swapping appeared as a “blank flash”. The preview layer itself was fine. Fix I removed session.isRunning from the SwiftUI visibility condition. The logic is now: authorized && cameraReady cameraReady is set once after initial setup and never toggles during interruptions. The preview view stays mounted at all times. Why this works AVCaptureVideoPreviewLayer already handles short “no frames” periods gracefully. By keeping the preview layer mounted and avoiding view teardown, the flashing disappears
Topic:
Media Technologies
SubTopic:
Photos & Camera
Tags: