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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

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
59
4w
Icon Composer warning "Failed to parse icontool JSON output."
When the Icon Composer file is imported into the project folder, and after building, there is a warning that says: Failed to parse icontool JSON output. Parts of the warnings show this: Entity: line 1: parser error : Start tag expected, '<' not found \211PNG ^ Entity: line 1: parser error : Start tag expected, '<' not found \211PNG ^ Entity: line 1: parser error : Start tag expected, '<' not found \211PNG ^ /* com.apple.actool.notices */ warning: Failed to parse icontool JSON output. Underlying Errors: Description: The data couldn’t be read because it isn’t in the correct format. Failure Reason: The data is not in the correct format. Debug Description: Garbage at end around line 6, column 0. /* com.apple.actool.compilation-results */ I have created the icon with png files in each layer group in icon composer. However the project is able to compile, and running shows the correct icon. What is the issue with this?
3
5
125
Jun ’25
Playground with a Logger - Error: Couldn't look up symbols: __dso_handle
Xcode 16.4, MacOS Sequoia 15.5 If I try to use a logger in an Xcode Playground e.g. import os import UIKit var logger = Logger(subsystem: "Loggertest", category: "") logger.info("Hello, world!") I get the following error error: Couldn't look up symbols: ___dso_handle ___dso_handle Hint: The expression tried to call a function that is not present in the target, perhaps because it was optimized out by the compiler. Its the logger.info ... that is causing the error. I have raised FB18214090 but there are no other reports. I would be grateful if some of you could verify if the Playground runs or errors on your system. A workaround, still using Logger, would be a great help. Thanks, Chris
0
0
30
Jun ’25
iOS beta 26 simulators will not in "Apple could not verify"
Apple could not verify “iPad_Air_M2_26.0_23A5260n_Restore.ipsw” is free of malware that may harm your Mac or compromise your privacy. xCode 26 fails to download simulators. I downloaded from the apple developer site. When I double click I get the above message. I went to the System Settings > GateKeeper, and selected Open Anyway. This poped up a window with a button, Open in xCode-bata. Clicking the button does not appear to do anything. I can not use xcode without simulators.
0
0
49
Jun ’25
Headlinea-regular
I am developing an iPhone and watch app with xcode. I bought a new Mac and when I tried to build it with xcode, I got the message "/Users/watanabekensuke/TennisData/TennisDataMax/TennisDataMax Watch App/headlinea-regular.ttf lstat(/Users/watanabekensuke/TennisData/TennisDataMax/TennisDataMax Watch App/headlinea-regular.ttf): No such file or directory (2)" and I couldn't build it. Can someone help me?
2
0
29
Jun ’25
Xcode Static Analysis Not Warning About Localization Issue - User Facing Strings when Format String is Used
If I do this: NSString *name = @"Jim"; NSMenuItem *menuItem = [[NSMenuItem alloc]init]; // Analyze does show localization warning when format string is used. menuItem.title = [NSString stringWithFormat:@"Hello %@",name]; I expect to get the following warning: User-facing text should use localized string macro But I don't. However if I do this: menuItem.title = @"What"; I do get the warning about localization as expected and as desired when I run Analyze. Is this considered a bug? Thanks!
1
0
50
Jun ’25
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
How do I stop a Playground in Xcode 26 from constantly executing as I type
I am experimenting with Foundation Models using the new #Playground macro. It is pretty useful. One thing I am finding though, is that the playground constantly executing is distracting, when I restructure my code and know that the intermediate results are broken and I don’t care about them. I would like to disable the Playground, make some bigger code changes, and then enable Plaground again. How do I enable and disable the Playground from constantly running?
0
0
31
Jun ’25
Is a modulemap file required when importing a static library objective-c framework? If not when is a modulemap required?
I am a bit confused. My understanding previously was that a modulemap was required in order to have a bridging header be generated. Now it has come to my attention that a modulemap is both a build input and something you can put in the Modules folder of the built product if you so choose. I have tried reading the clang modulemap documentation, but am really struggling to connect most of what it says to the problem at hand. In a project I am working on, the generation of the modulemap file is quite problematic. The framework imports C++ libraries and itself writes Objective-C++ wrappers for them. Currently, the modulemap file is both set as the Module Map File in "Build Settings" and presumably used when the Swift project later imports it. In this project the modulemap is a list of the objective-c++ header files then export * I am trying to understand what I would lose if I do one or both of two things: What happens if I dont set this module map file in the build settings for the objective-c++ framework? What happens if I dont have a modulemap involved whatsoever in this objective-c++ framework and then it is imported into Swift? And does any of this change if its compiled as a static vs dynamic library? What if I embed it vs not embed it? Because the build in the real project is so complicated its hard to isolate what is going on. So I built a smaller sample app. There is CFramework which has an objective-c++ class. There is SwiftProject which imports that framework and is purely Swift. It imports the module and uses it. I did not write a modulemap file, and the Swift project builds just fine. In the timeline it: Prepares packages Computes target dependency graph Builds static cache for iPhoneSimulator18.2sdk As near as I can tell even though the objective-c++ framework is not built with a modulemap in its build settings and there is not a modulemap included in the framework everything works. So then the modulemap file is useless? Perhaps it speeds things up but what step would theoretically be skippable?
0
0
38
Jun ’25
Authentication in UI tests
Hello! I am writing UI tests for an app with OAuth authentication and want to avoid the login screen. I want each developer to store the password and username locally on their machines. The bash script will get the token. I need to access that token from my test target somehow. The idea was to write them to a temporary file that git ignores and access this file from the bundle. But I can't add the file from the build script to the target and make it accessible from the code.
0
0
46
Jun ’25
Can't download Predictive Code Completion Model
The Foundation Models Framework stopped working after Xcode failed to download the "Predictive Code Completion Model". What happened was on macOS Tahoe 26.0: Downloaded and installed Xcode 26 Beta (17A5241e) Worked with Foundation Models framework. Everything worked fine. ✅ Opened Xcode 16.4 This triggers the downloading of Predictive Code Completion Model which then fails. Go back into Xcode 26 Beta, Foundation Models framework no longer works. ❌ Error: "Failed to find asset: com.apple.gm.safety_deny.input.code_intelligence.base.generic - no asset" What I've tried or checked: Reinstalling Xcode 26 Beta Uninstalling both Xcodes and only installing Xcode 26 Beta Checked available space on drive (over 300 GB free) Restarted Mac Restarted Xcode 26 Changed wifi networks Turned on VPN Deleted the Library > Developer > Xcode folder and reinstalled Xcode 26 Feedback Report FB18208139: Can't download Predictive Code Completion Model - Xcode 26 Screenshots
18
19
1.3k
Jun ’25
IconComposer alternative app icons not working
I migrated all our alternative app icons to IconComposer icon files in my Xcode 26 project, but calling setAlternativeIconName fails with an error. Also, supportsAlternativeIcons returns false. This seems like a regression from Xcode 16. Do I need to add the CFBundleAlternateIcons? It's not needed as of Xcode 13 though.
1
1
41
Jun ’25