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

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
55
3w
"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
125
3w
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
67
3w
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
58
3w
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
118
2w
❗️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
41
3w
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
162
3w
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
32
3w
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
150
3w
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!
10
2
394
1w
Multiplatform Target: Distill failed on tvOS builds
Building my multiplatform target, works great for iOS, visionOS, MacOS. tvOS builds fine, if I do not include any of the items in the .xcassets file. I have attempted to add a second .xcassets file for just tvOS, but Xcode will not detect the second .xcassets if created manually, and will just "spin" when adding via the add file menu option. If I add tvOS to the target membership for any of the .xcassets items (Xcode applies that target membership for ALL items in the .xcassets) we then we get the distill failed error. The issue will sporadically be solved by removing the visionOS app icon from the .xcassets file and building that way, but it is not a perfect solution, as it does not work every time. If there is a more targeted "membership options" that doesn't apply .xcassets wide, that would probably be the simplest solution.
1
0
46
3w
Circular Reference Error in Xcode 26
I have my project running perfectly fine on Xcode 16. However, in Xcode 26 it doesn't build due to an error that I do not understand. I have three files that pertain to this error: // FriendListResponse.swift import Foundation struct FriendListResponse: Decodable { var friendships: [Friendship] var collections: [FriendCollection] } // Friendship.swift import Foundation struct Friendship: Decodable { var createdAt: String var friendId: Int var friendUserId: Int // user ID of the friend var friendUsername: String var id: Int var tagNames: [String] } // FriendCollection.swift struct FriendCollection: Decodable { var id: Int var permalink: String var tagNames: [String] var title: String } On the first file, FriendListResponse.swift, I am the simple error message "circular reference." I do not understand how these self-contained structs could create a circular reference. Although I have other data types in my project, none of them are even referenced in these files except for Friendship and FriendCollection. The FriendListResponse is a struct that is created from JSON values that are fetched from an API. This is the function that fetches the JSON: public static func listFriends(username: String) async throws -> [Friendship] { let data = try await sendGETRequest( url: "people/\(username)/friends/list.json" ) print(String(data: data, encoding: .utf8)!) let decoder = JSONDecoder() decoder.keyDecodingStrategy = .convertFromSnakeCase let wrapper = try decoder.decode(FriendListResponse.self, from: data) return wrapper.friendships } // Note: the function sendGETRequest is just // a function that I have created that takes a set // of parameters and returns a data object // using the HTTP GET protocol. I don't think // that it is related to this issue. However, if you // think that it is, I can share the code for that. This error has also happened in a few other cases within contained networks of my data structure. I do not know why this error is only appearing once I launch Xcode 26 beta with my project files. I would think that this error also would appear in Xcode 16.4. Any help would be greatly appreciated in my process to compile my project on Xcode 26!
7
0
179
2w
Can't install iOS 26.0 beta through xcodes or xcodebuild
I need to automate updating to latest iOS betas as part of my ci script, but I can't get it to install iOS 26.0 beta for the life of me, using xcodes or xcodebuild. I can see the version listed using xcodes runtimes --include-betas, and I tried sudo xcodes runtimes install "iOS 26.0-beta1", but I would get the error Downloading Runtime iOS 26.0-beta1: 0% Error: ProcessExecutionError()\ I also tried xcodebuild -downloadPlatform iOS -buildVersion 23A5260l, where I found the specific build id on apples dev images website. But I would get the error iOS 23A5260l is not available for download. Specific version download failed, trying downloadPlatform ios latest... And similar error for trying xcodebuild -downloadPlatform iOS -buildVersion 26.0 or other version ids I found online. But this command would work for any other versions and betas listed on the website. I was able to install iOS 26.0 through xcodebuild -downloadPlatform iOS, which automatically installed it for me, but this is unideal for my situation, as I want to control which betas to install instead of just the latest one (like iOS 18.6 beta that just came out). Is anyone else also struggling with these errors? xcodes version 1.6.2 Xcode version 26.0 Beta (installed and selected through xcode)
0
1
64
3w
Xcode File Error
Hi Apple Developer Community. I have a problem with opening my Xcode File in Xcode 16. It says, that a specific File is missing and I don't know how to resolve this. Can someone help me? Thanks for the help :)
5
0
57
3w
How can you communicate that a .xcframework is a dependency OF the swift package inside Swift package definition?
I am sort of trying to do the opposite of what others are doing. I have a target called CopyFramework that creates a CopyFramework.framework within my main xcproj file. I set up this target because a specific framework (we can call it Tools.xcframework) is distributed as a binary. That framework file lives within the code. Tools.xcframework is structured like so Tools.xcframework (Coding/testBuild/DynamicToolFrameworks/Tools.xcframework) info.plist ios-arm64/ Tools.xcframework/ Tools (executable file) Tools.bundle Headers/ Info.plist Modules/ Tools.swiftmodule/ arm64-apple-ios.abi.json arm64-apple-ios.private.swiftinterface arm64-apple-ios.swiftdoc arm64-apple-ios.swiftinterface module.modulemap module.private.modulemap PrivateHeaders/ ios-arm64_x86_64-simulator/ When the CopyFramework target is run xcode does a few steps which copy the correct version of this framework to derived data. Process Tools.xcframework (iOS) Coding/testBuild/DynamicToolFrameworks/Tools.xcframework /Library/Developer/Xcode/DerivedData/testBuild-sha/Build/Products/Debug-iphoneos/Tools.framework ios cd /Users/calebkierum/Coding/testBuild builtin-process-xcframework --xcframework Coding/testBuild/DynamicToolFrameworks/Tools.xcframework --platform ios --target-path Library/Developer/Xcode/DerivedData/testBuild-sha/Build/Products/Debug-iphoneos Meaning essentially that the Tools.xcframework for the proper platform is taken from Tools.xcframework/ios-arm64 and copied to Library/Developer/Xcode/DerivedData/testBuild-sha/Build/Products/Debug-iphoneos/Tools.xcframework I am writing a Swift Package that needs to be able to reference the correct Tools.xcframework. I have set it up like so: let package = Package( name: "CoreObjC", platforms: [.iOS(.v17), .macCatalyst(.v17)], products: [ .library(name: "CoreObjC", targets: ["CoreObjC"]), ], dependencies: [ // Does something to here ??? //.package(path: "../testBuild") ], targets: [ .target( name: "CoreObjC", dependencies: [ // Here I would like to be referencing the CopyFramework.framework target within my buildTest.xcproj file .product(name: "CopyFramework", package: /*??? its not in a swift package its a part of an xcproj file*/) ], path: "CoreObjC", publicHeadersPath: "Headers", linkerSettings: [ .linkedFramework("Tools", .when(platforms: [.iOS])), .linkedLibrary("c++") ] ), ], cxxLanguageStandard: CXXLanguageStandard.gnucxx14 ) Now obviously this does not work. I do not know how to communicate to the Package.swift file that the binary dependency is a framework target within my xcproj file. If I do run the target CopyFramework followed by building CoreObjC it works though (so long as you comment out the bits trying to reference CopyFramework). Running the CopyFramework target processes the Tools.xcframework and copies the proper xcframework sub folder to Derived data and the Swift Package build system seems to be able to see it. Is there a way I can get rid of this manual step? Make it so that when I build the CoreObjC target (swift package) that either CopyFramework is run or some other process is run to get the proper xcframework out of Coding/testBuild/DynamicToolFrameworks/Tools.xcframework and into DerivedData? Is it even theoretically possible to have a Swift Package reference a target in a normal xcproj file?
0
0
50
Jun ’25