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

Unknown CHHapticError.Code (1852797029 == 'nope') in iOS 18+ on iPhone 11 Pro
Hello, I'm getting this error when launching a SpriteKit Swift game in iOS 18+ on an iPhone 11 Pro, whose shell is partly damaged in the back: CHHapticEngine.mm:1206 -[CHHapticEngine doStartWithCompletionHandler:]_block_invoke: ERROR: Player start failed: The operation couldn’t be completed. (com.apple.CoreHaptics error 1852797029.) Haptics do not work on this device, due to the damaged shell, so some error — which obviously occurs when calling start(completionHandler:) — is definitely expected; what is not expected is the main thread sometimes blocking for up to 5 seconds — although the method is not called from the main thread... the error itself is always displayed from some other secondary (system) thread. During this time, the main thread does not access the haptics engine at all; on average, it blocks once every four or five launches. In each launch (blocking or not), the 'nope' error is displayed ~5 seconds after trying to start the engine. After going nuts with all kinds of breakpoints and instrumentation, I'm at a loss as to why the main thread would sometimes block... Ideas, anyone? Thank you, D.
1
0
38
4d
How to fix iOS 26 Beta / iOS 18 SDK compile conflicts?
A method in my app now requires the override keyword when compiling with Xcode 26 beta / iOS 26 SDK, but if I add it, the current official Xcode 16.4 (iOS 18 SDK) throws a compile error. It's about 'toggleSidebar(_:)' in UIViewController. The problem is: Apple expects our apps to be ready for iOS 26 launch this fall, so I need to be actively developing and testing in the Xcode 26 beta now. At the same time, I still need to submit updates to the App Store using the current official Xcode 16.4 until iOS 26 officially launches. I'm using a single .xcodeproj file and can't keep manually adding/removing -DIOS_SDK_26_OR_LATER in Build Settings multiple times a day. How to fix it and why isn't there a straightforward #if sdk(>=26.0) type of check for compile-time in Swift? It's really frustrating to manage this override conflict.
0
0
59
1w
The async/await API crashes in Xcode 16.3 and later
We use several UIKit and AVFoundation APIs in our project, including: setAlternateIconName(_:completionHandler:) getAllTasks(completionHandler:) loadMediaSelectionGroup(for:completionHandler:) Moreover, we use the Swift Concurrency versions for these APIs: @MainActor func setAlternateIconName(_ alternateIconName: String?) async throws var allTasks: [URLSessionTask] { get async } func loadMediaSelectionGroup(for mediaCharacteristic: AVMediaCharacteristic) async throws -> AVMediaSelectionGroup? Everything worked well with these APIs in Xcode 16.2 and earlier, but starting from Xcode 16.3 (and in 16.4), they cause crashes. We've rewritten the APIs to use completion blocks instead of async/await, and this approach works. Stack traces: setAlternateIconName(_:completionHandler:) var allTasks: [URLSessionTask] { get async } loadMediaSelectionGroup(for:completionHandler:) Also, I attached some screenshots from Xcode 16.4.
5
0
152
2h
Can `UIApplication.shared.setAlternateIconName` use .icon file?
I’m updating my app’s alternate icons using UIApplication.shared.setAlternateIconName, and I noticed that in iOS 26, Xcode now supports the new .icon file format for App Icons. Is it possible to reference .icon files directly for alternate icons? Or does setAlternateIconName still only support traditional .png assets inside the AppIcon set? I couldn’t find any documentation confirming this either way, and I want to ensure compatibility with the new format while supporting alternate icons. Any clarification or Apple documentation link would be greatly appreciated!
0
0
61
1w
Xcode can't upload visionOS app CFBundleIcons.CFBundlePrimaryIcon Validation Failed
I'm developing a visionOS app and was able to upload new builds without any problems to the App Store. A couple pf days ago I wanted to ship another update, but now I can't submit it to the App Store anymore, because the validation failed, something related to the App Icon seems to be the issue, the logs mention CFBundleIcons.CFBundlePrimaryIcon. I have setup the App Icons here: The validation error I first got was this, mentioning a plist entry (that has not been necessary in the past) is missing. I've then added that plist entry, as described in the reference doc for CFBundleIcons.CFBundlePrimaryIcon. My info.plist now includes this, following the mentioned docs: However, now I get a type missmatch error when validating — however the types are as described in the docs: What am I missing? Why even is this plist entry required now? Or is this a Bug? Help please
1
0
48
1w
Xcode Memory Usage
Last week I bought an M4 Pro Mac mini with 24GB RAM to use as my “beta testing” machine. I don’t want to use my main machine for beta OS testing, so figured this config would be perfect for that. However, there have been several times when running Xcode 26 on macOS Tahoe, along with a simulator or two, that memory pressure has gone up into the “yellow” and keeps increasing. I am surprised that 24GB doesn‘t seem like enough RAM. I don’t have giant projects or use anything else on this machine. It’s pretty simple stuff. Maybe this is to be expected with betas: memory leaks, non-optimized code, etc. I’m considering returning the machine while I can. What do others find is a good amount of RAM for fairly modest development needs?
1
0
46
1w
"illegal character encoding in string literal" warnings in Xcode
Good day! I have a long-term project ported all the way up from old Think C through many versions of Xcode. Its source files are encoded in "Western (Mac OS Roman)". Some of my error messages have characters outside the straight ASCII character set (i.e. "å"). The editor correctly displays these, but I get plenty of Illegal Character warnings and the messages do not display properly. I imagine there's a way to have seperate files of localized text for internationalized applications, but I am the only end-user of this application, and it used to just plain work in earlier Xcode versions. Furthermore, there must be developers throughout Europe who use such characters in string literals, just typing in their native languages, straight off their keyboards. I was thinking that there must be a Clang setting or something, but have been unable to find it, and an internet search turns up no solution except to cumbersomely escape each individual character. I can't imagine that a French programmer does that every time they want to type "è", "é", or "à"! Any help? (Disclaimer: I'm an English speaker and only use such characters whimsically, but want to keep them for legacy's sake.) Thanks.... p.s. using Xcode 15.3, and under Settings->Text Editing->Editing, "Western (Mac OS Roman)" is already selected as the default text encoding with "Convert existing files on save" checked.
3
0
107
1w
XCode 26 beta 2 build error with AVAsset loading
I have this build error with Xcode 26 beta 2: var asset:AVURLAsset? func loadAsset() { let assetURL = URL.documentsDirectory .appendingPathComponent("sample.mov") asset = AVURLAsset(url: assetURL, options: [AVURLAssetPreferPreciseDurationAndTimingKey: true]) /*Error: Type of expression is ambiguous without a type annotation */ if let result = try? await asset?.load(.tracks, .isPlayable, .isComposable) { } } Is there an issue with try? in the new Swift compiler? Error: Type of expression is ambiguous without a type annotation
0
0
50
1w
Not able to make archive build in Xcode of Unity app
We are working on a Unity iOS app for the App Store. We are working with different SDKs and plugins(Firebase, Facebook, CleverTap, AVpro, DTT, etc ). We can make an Xcode export build from Unity for the iOS platform. But in Xcode, we are getting errors while building an archive for our app. `chmod: /Users/MacName/Library/Developer/Xcode/DerivedData/Unity-iPhone-gfqpbnsrmtehefgrsrsapwpcyrzk/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/artifacts/arm64/buildstate/Il2CppOutputProject/IL2CPP/build/deploy_arm64/il2cpp: No such file or directory chmod: /Users/MacName/Library/Developer/Xcode/DerivedData/Unity-iPhone-gfqpbnsrmtehefgrsrsapwpcyrzk/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/artifacts/arm64/buildstate/Il2CppOutputProject/IL2CPP/build/deploy_arm64/il2cpp-compile: No such file or directory chmod: /Users/MacName/Library/Developer/Xcode/DerivedData/Unity-iPhone-gfqpbnsrmtehefgrsrsapwpcyrzk/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/artifacts/arm64/buildstate/Il2CppOutputProject/IL2CPP/build/deploy_arm64/bee_backend/mac-arm64/bee_backend: No such file or directory /Users/MacName/Library/Developer/Xcode/DerivedData/Unity-iPhone-gfqpbnsrmtehefgrsrsapwpcyrzk/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/GameAssembly.build/Script-C62A2A42F32E085EF849CF0B.sh: line 27: /Users/MacName/Library/Developer/Xcode/DerivedData/Unity-iPhone-gfqpbnsrmtehefgrsrsapwpcyrzk/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/artifacts/arm64/buildstate/Il2CppOutputProject/IL2CPP/build/deploy_arm64/il2cpp: No such file or directory Command PhaseScriptExecution failed with a nonzero exit code Please help anyone to resolve this issue. Unity version - 2023.2.20f1 Xcode version - 16.4
1
0
47
1w
Compiling Swift Package with Dependency on Build Tool Plugin Fails in Xcode 26
Hi, in our Xcode project we have a Tooling package, which defines build tool plugins for generating compile time safe constants for our localization strings as well as assets using swiftgen. This is working very well in Xcode 16, but fails in Xcode 26 beta 1 and beta 2 as well. The failure is specifically: unsupported configuration: the aggregate target 'Localization' has package dependencies, but targets that build for different platforms depend on it. I've reduced this to a minimal sample project, which you can find here.. To reproduce: Open the Repro workspace, that is attached in Xcode. Try to build TestyPackage. You'll see the error. I've filed this bug during WWDC week, but no feedback yet and no solution in Xcode 26 beta 2. Here's the feedback number, in case you have this too and want to file a duplicate: FB17934050. Does anyone else have this issue and perhaps a solution?
2
3
111
1d
❗️SpeechAnalyzer.framework Not Found in Xcode 26 Beta 2 (17A5241o)
Hi everyone, I’m running into an issue trying to use the new SpeechAnalyzer framework announced at WWDC 2025. ❯ My Setup: • macOS: Sequoia 15.5 (Build 26.0 / macOS Tahoe Beta 26.0) • Xcode: 26.0 beta 2 (17A5241o) • Deployment Target: macOS 26.0 • Toolchain: Clang 17.0.0 (Apple) ❯ Problem: Despite following all setup requirements: • Setting macOS 26 as the deployment target • Using the latest Xcode 26 beta 2 • Running the correct developer toolchain (xcode-select is pointing to Xcode-beta) I still get the error: No such module 'SpeechAnalyzer' Additionally: • The SpeechAnalyzer.framework does not appear under /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ • It is also not listed in the Link Binary with Libraries pane. ❯ What I’ve Tried: • Clean builds • Deleted DerivedData • Verified SDK installation paths • Reinstalled Xcode 26 beta 2 • find search for SpeechAnalyzer.framework returned nothing ❯ Request: Has anyone successfully used SpeechAnalyzer in Xcode 26 beta 2 on macOS Sequoia/Tahoe? Is there a separate SDK or seed profile required to access this framework? Would appreciate any guidance from Apple engineers or other beta testers. Thanks! — Lalit Lakhara
0
0
32
1w
Xcode 26 String Catalog generate comment grayed out
Why is "generate comment" button grayed out? I'm running macOS Tahoe Beta 2, Xcode 26 Beta 2 Apple intelligence on both system preferences as well as Xcode are enabled Created fresh Xcode project to test it (happens on my older project too) Xcode Preferences -> Editing -> Automatically generate string catalog comments (tried with ON/OFF) Tried to CMD+B to re-index project Not sure what else to try.
2
0
117
1w
Apple Watch no longer connects reliably in Xcode
Hi all, I'm developing a standalone SwiftUI watchOS app (no iOS host or extension), targeting watchOS 11.5, and running into persistent connection issues with Xcode. Xcode rarely detects my Apple Watch (Series 7, watchOS 11.5) Sometimes it appears nested under the iPhone; most of the time, it doesn’t Errors include: "OS version is lower than the deployment target" (both are 11.5) "Unable to install... device not supported" "Connection error 4000", "Tunnel timeout error 1001" "Ensure Wi-Fi is enabled on both machines" (Wi-Fi is on and on the same network) Once in a while, the app does install, but mostly I’m blocked. What I’ve Tried Verified pairing and trust Cleaned builds, nuked Derived Data and caches Reset iPhone privacy settings Removed and re-added my Apple ID Used xcrun xctrace list devices (watch inconsistently appears) Despite this, the app only installs about 5% of the time. Testing (or even running) on real hardware is nearly impossible, and has become incredibly frustrating for me. Any help or insights would be much appreciated.
0
0
11
1w
AI Model in Xcode isn't working
Hello Apple Developer Community. I only wanted to ask you guys, what I can do, if the ChatGPT Model isn't working in Xcode 16 (because of the Code Assistance). Because when I try to use it, it says, that I need to connect a Model, which I already did with the ChatGPT Integration. Can somebody help me with this? Thanks :) Device Info: MacBook M3 - Midnight - 16GB RAM (These are Pictures of the Errors)
1
0
131
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!
8
1
222
1w