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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

Apple Developer App won't install on macOS Catalina
TL;DR Can earlier versions of the Apple Developer App be available to download from developer.apple.com? I'm trying to install the Apple Developer App on a laptop running Catalina. The App Store says it can't be installed because the Developer App requires BigSur ("version 11.1 or later"). Yet my other laptop has an earlier version of this app installed on Catalina, which still works. (It does give me the same error when I act on its request to "upgrade to the latest version," but at least the installed version works). As developers we often need to work under older versions of macOS to support our software that still runs on older versions of macOS and iOS. It would be helpful to have this tool on those older macOS installs. Just as older versions of Xcode are available for download to registered developers, can these development tools be similarly available? (I should note that these laptops also have Big Sur installed on separate startup volumes, but I find I'm still spending more time in Catalina to support our existing iOS apps.) Thanks.
1
2
1.6k
Oct ’21
Why does Xcode always recompile all files the second time after a full build but not after that?
This issue has bugged me for some time. Whenever I do a full build whether it's for debugging or profiling, Xcode always insists on recompiling all files the second time I build (regardless of whether there are changes or not), but then behaves normally after that and only recompiles changed files when I build. FWIW, I use a precompiled header. My project also contains other Xcode projects that consists of static libraries and frameworks that are built as dependencies. Those other Xcode projects are not rebuilt after the first build, just the source files included in my project. This has been an ongoing problem for years and continues with Xcode 13.1. I'm sure it's something within my Xcode project that I've been maintaining since at least Xcode 3 (I don't remember which version of Xcode I started with) because new projects don't exhibit this behavior. Again, building doesn't unnecessarily recompile all files, only the second time I build.
1
0
953
Oct ’21
Xcode 13: Active breakpoint turns to an outline when app is run.
I'm working on several apps that were developed on Xcode 12.5. Using Xcode 13.1, I set a breakpoint, which correctly appears as the blue marker in the left-hand column of the editor. When I run the apps (in a simulator), the breakpoint turns to an outline of a breakpoint marker, with a dotted blue outline and a white interior. The apps do not stop at the breakpoint. Breakpoints work as expected on an app started in Xcode 13.1. I've dug through the docs but find nothing that describes what the outline breakpoint means or how to make it work. I've done all the standard stuff: cleaned the build folder, deleted derived data. What does the outline breakpoint marker mean, and how do I get breakpoints working in Xcode 13.1 when debugging code developed originally on Xcode 12.5? Thanks in advance for any help. John
19
3
17k
Oct ’21
Xcode SPM when switching between branches
I have this problem with Xcode and SPM where every time I open up my Xcode project or switch branches, Xcode would spend a lot of time resolving the dependencies. I don't remember that that was a thing with Cocoapods. Is there a way to prevent it from doing this? It slows down my machine and make it completely unusable for 5-15 mins so switch branches is always a pain. EDIT: I would like to add that I have the Package.resolved file ignored under Git.
11
16
6.3k
Nov ’21
Command CodeSign failed with a nonzero exit code
After Upgrading to Xcode 13 my Builds are failing with Command CodeSign failed with a nonzero exit code. My app is in version 3.4.4. While trying to build version 3.4.5 for Mac we have started to get this error: Command CodeSign failed with a nonzero exit code Have tried everything people have said in this and other forums: Clean build folder; Restart Xcode Add --deep to Other Code Signing Flags Revalidate all Certificates Manual and Auto Signing The unsigned executable works fine. I am Evan able to Sign it manually and distribute locally. For Store Submission we need this step to succeed. Will appreciate help from Apple Technical Support This started happening with Xcode 13.
5
0
23k
Nov ’21
Attach process failed when trying to run intents extension via Xcode
Issue Summary Hi all, I'm working on an Intents Extension for my app, however when I try to run an intent, Xcode pops up the following error: Could not attach to pid: "965" attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.) An image of the error: This only happens when I try debugging the Intent Extension. Running the main app target or another extension target (e.g. notifications) doesn't produce this error. Build Setup Here are the details of my build setup: Mac Mini M1 Xcode 13 Building to iPhone 11 Pro Max, iOS 15.0.2. I've also tried building to my iPad Pro 12.9 w/ iOS 15.1 and hit the same issue. Things I've tried: Make sure "Debug executable" is unchecked in the scheme I've tried changing the Launch setting to "Automatic" and "Wait for the executable to be launched" I've made sure to run sudo DevToolsSecurity -enable on my mac Rebooted iPhone devices + mac mini Uninstalled / reinstalled the app Deleted derived data Removing / reinstalling the development certs in my keychain --> this actually seemed to work initially, but then the problem came back and now it doesn't work anymore. Console Logs I've looked at the console logs while this error occurs to see if it can shed light on the issue. Here are the ones that seemed notable to me. These logs seem to show that Siri is trying to save / write to a file that it does not have access too. Seems very suspicious error 11:42:38.341470-0800 kernel System Policy: assistantd(31) deny(1) file-read-metadata /private/var/mobile/Library/com.apple.siri.inference error 11:42:38.342204-0800 assistantd failed to save contact runtime data. error=Error Domain=NSCocoaErrorDomain Code=512 "The file “com.apple.siri.inference” couldn’t be saved in the folder “Library”." UserInfo={NSFilePath=/var/mobile/Library/com.apple.siri.inference, NSUnderlyingError=0x100fb03a0 {Error Domain=NSPOSIXErrorDomain Code=5 "Input/output error"}} error 11:42:38.342403-0800 assistantd InferenceError<errorId=crSaveToRunTimeDBFailed file=/Library/Caches/com.apple.xbs/Sources/SiriInference/SiriInference-3100.49.3.1.2/SiriInference/SiriInference/ContactResolver/ContactResolver.swift function=logRunTimeData(runTimeData:config:) line=378 msg=> error 11:42:38.465702-0800 kernel 1 duplicate report for System Policy: assistantd(31) deny(1) file-read-metadata /private/var/mobile/Library/com.apple.siri.inference Looking for "debugserver" entries, like the error suggests, shows these logs: default 11:42:44.814362-0800 debugserver error: [LaunchAttach] MachTask::TaskPortForProcessID task_for_pid(965) failed: ::task_for_pid ( target_tport = 0x0203, pid = 965, &task ) => err = 0x00000005 ((os/kern) failure) default 11:42:44.814476-0800 debugserver 10 +0.011525 sec [03c6/0103]: error: ::task_for_pid ( target_tport = 0x0203, pid = 965, &task ) => err = 0x00000005 ((os/kern) failure) err = ::task_for_pid ( target_tport = 0x0203, pid = 965, &task ) => err = 0x00000005 ((os/kern) failure) (0x00000005) default 11:42:44.825704-0800 debugserver error: MachTask::StartExceptionThread (): task invalid, exception thread start failed. default 11:42:44.825918-0800 debugserver error: [LaunchAttach] END (966) MachProcess::AttachForDebug failed to start exception thread attaching to pid 965: unable to start the exception thread default 11:42:44.826025-0800 debugserver error: Attach failed default 11:42:44.828923-0800 debugserver error: Attach failed: "Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.". I've also attached the full details of the error below via a text file if it helps. Any help with this issue would be great, and I'm happy to provide more information if needed. Thanks in advance! Xcode Attach Full Error Details
6
2
9.1k
Nov ’21
Xcode 13 on Apple silicon not running app with error A build only device cannot be used to run this target.
On xcode 13, I have macos project that runs fine on intel machine. On apple silicon (M1 Plus) I get the error "A build only device cannot be used to run this target.", when I try to run from Xcode. This seems to be an ios error. All Google suggested fixes involve picking a new device which is an ios fix. Right? Bulids fine and Archive app runs fine. I get the error for both intel and Arm64 architectures. I tried building for Target deployment target device families and Deployment as: macos 12.0 sdk any suggestions?
6
0
3.5k
Nov ’21
How to create an xccovreport from an xcresult bundle.
We are having an issue when trying to view the the coveage report in our "merged result bundle" Running xccov view --report --only-targets merged.xcresult results in: 09:52:54 Error: Error Domain=XCCovErrorDomain Code=0 "Failed to load coverage archive in scheme action '(null)' in result bundle" UserInfo={NSLocalizedDescription=Failed to load coverage archive in scheme action '(null)' in result bundle, NSUnderlyingError=0x7f8ff8714f30 {Error Domain=NSCocoaErrorDomain Code=260 "The file “Metadata.plist” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/tmp/action.xccovarchive/Metadata.plist, NSUnderlyingError=0x7f8ff8714930 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}} Checking the man page for xccov I was inspired by the idea of extracting the coverage report from the result bundle to try to understand or work around our error. The man xccov page states that If xccov is passed a result bundle directly, it will extract the report or archive implicitly, as part of the action being requested. Alternatively, the raw report/archive files can be extracted from the result bundle using xcresulttool(1) and subsequently passed to xccov. Checking man xcresulttool and trying out some stuff randomly I was not able to learn how a person might: Given an xcresult bundle use xcresulttool to create/extract an xccovreport bundle.
7
4
3.3k
Dec ’21
Xcode Cloud not working with local packages
Hi, I'm trying out Xcode Cloud but can't get it to build in my scenario. The use case is the following: My project has multiple swift packages that depend on each other. "App" has a local package dependency called "SPMKit". "SPMKit" has a local package dependency called "SPMKit2". The issue I run into is if "SPMKit2" has any dependencies, it doesn't resolve in Xcode Cloud. Are local dependencies like this not supported in Xcode Cloud? All the packages are in the same directory as my app. I'd like to not have to put each package in it's own git..
6
2
2.4k
Dec ’21
Xcode 13.2 - Internal error : Missing Package Description Module
Hi guys, just updated Xcode to 13.2 via Mac App Store. I installed the additional components, and my project won't compile anymore : Xcode just tells me "Internal error: missingPackageDescriptionModule - Resolving Package Graph Failed" when attempting to build. None of the Swift packages used within my app seems to build, because "Package resolution errors must be fixed before building". Already attempted to clean derived data, reset Swift package caches and update package versions to no avail. Guess I'll try re-installing Xcode but... does anyone else have the same issue ? Using an M1 Mac and just updated to Monterey 12.1 if that's relevant. Thank you !
122
0
58k
Dec ’21
Impact of Disable Generate Debug Symbols
Hello there, i would like to ask a question related xcode build confinguration. So i have create a Common.framework that i used in other project, because of the .framework file is quite large then i want to generate Common.framework but with Generate Debug Symbols is NO, and the result Common.framework size is reduced The question is there any negative impact that will happen to my app that use Common.framework?
2
0
2.6k
Dec ’21
Executable Not Found ,Xcode
Executable Not Found Domain: DVTMachOErrorDomain Code: 5 Recovery Suggestion: *** is not a valid path to an executable file. Please rebuild the project to ensure that all required executables are created. Check your project settings to ensure that a valid executable will be built. User Info: {     DVTErrorCreationDateKey = "2021-12-29 04:46:38 +0000"; } I don’t know what’s going on. Suddenly, my project can’t run. The above information is displayed. I have reinstalled Xcode and reinstalled the mac system, but it still doesn’t work. Can someone help me?
11
0
20k
Dec ’21
New Apple Developer Team not showing up in developer.apple
I have been working for a while now. Never encountered this issue. After accepting the invite from the organization. The organizations does not appear at developer apple account. But can see the organization at app store connect. Yes i have checked the account permissions. I have the admin role and developer role etc is checked everything is correct. This is not just me happening with my colleague as well.
17
8
19k
Jan ’22
Debugging Big Sur kernel on inter-based macbook from Monterey on m1
HI devs, help me please, i want to debug Big Sur kernel on inter-based macbook from Monterey on m1, i have installed KDK_11.6.4_20G417.kdk in Monterey system on m1 macmini, then launch lldb, have created target and got this message : WARNING! Python version 3 is not supported for xnu lldbmacros. (lldb) target create /Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel warning: 'kernel' contains a debug script. To run this script in this debug session:   command script import "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/kernel.py" To run all discovered debug scripts in this session:   settings set target.load-script-from-symbol-file true Current executable set to '/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel' (x86_64). (lldb) settings set target.load-script-from-symbol-file true ############################## WARNING! Python version 3 is not supported for xnu lldbmacros. Please restart your debugging session with the following workaround defaults write com.apple.dt.lldb DefaultPythonVersion 2 ############################## Loading kernel debugging from /Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/kernel.py LLDB version lldb-1300.0.42.3 Swift version 5.5.2-dev settings set target.process.python-os-plugin-path "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/lldbmacros/core/operating_system.py" settings set target.trap-handler-names hndl_allintrs hndl_alltraps trap_from_kernel hndl_double_fault hndl_machine_check _fleh_prefabt _ExceptionVectorsBase _ExceptionVectorsTable _fleh_undef _fleh_dataabt _fleh_irq _fleh_decirq _fleh_fiq_generic _fleh_dec command script import "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/lldbmacros/xnu.py" error: module importing failed: Traceback (most recent call last):  File "<string>", line 1, in <module>  File "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/lldbmacros/xnu.py", line 123   print "Execution interrupted by user"      ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Execution interrupted by user")? settings set target.process.optimization-warnings false How can i solve this problem? lldb linked with python 3, but kdk uses python 2, also command line tools version 12.5.1 which uses python 2 i can not install on monterey too.
4
0
2.5k
Feb ’22
EXC_BAD_ACCESS error (Unity for iOS)
Hi, I have an issue with an update I am trying to test on XCode simulator. I usually do all the work on my PC and build the game on my Mac. It is working in the Editor and on the Android version. I haven't changed much with this update but it just won't work this time. When the simulator starts, the screen stays black for a few seconds and this message pops up. Being a total noob with XCode, I have absolutely no idea what is happening except that something probably can't be accessed. Could anyone help out or give me a few pointers? That would be incredibly helpful. Here is the XCode screen when that happens Thanks a lot.
4
1
1.3k
Feb ’22
Option "Show device mask in screenshots and videos" in iOS simulator not working as expected
Hi, I've activated the option "Show device mask in screenshots and videos" in iOS Simulator's preferences. When I take a screenshot of the simulator, using the "Save Screen" button, the "preview" of the screenshot (the one that appears as a small image on MacOS, next to the simulator) shows the frame, but when I save the image, e.g. in the Desktop folder, the frame doesn't appear in the saved image. Am I missing something, or this feature has a bug?
3
0
3.2k
Mar ’22