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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

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
18k
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.
12
17
6.9k
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
25k
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.6k
Nov ’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.5k
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
60k
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.7k
Dec ’21
Xcode Cloud Dependency Resolution - out-of-date resolved file
When I try to build my iOS app using Xcode Cloud, it encounters an error when trying to resolve packages: an out-of-date resolved file was detected at [path to package.resolved], which is not allowed when automatic dependency resolution is disabled; please make sure to update the file to reflect the changes in dependencies Looking at my package.resolved file, it all seems to be in order. What can I do to fix it?
10
4
6.3k
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.6k
Feb ’22
Import Local Swift Package in Xcode 13.3
Hello! I am struggling with the most basic things :-( I created a Swift Package with the wizard and left it basically untouched, only added a func: public struct TestPackage {     public init() {     }     public static func hello()     {         print("Hello, World!")     } } It just build fine. Now I created a second project, this time a SpriteKit iOS app. In the file list on the left, right-clicked on "Packages" -> "Add Packages ..." -> "Add Local" and selected the root directory of TestPackage (containing the Package.swift) The Package now correctly appears in the "Packages" folder. Opening a random Swift file in said SpriteKit iOS app, I expect to be able to import TestPackage But it tells me "No such module TestPackage". Searching the internet, I somewhere read that I have to add the package also to the "Frameworks, Libraries and Embedded Content" section in the project's target settings, but I can't. Hitting the "+" button there does not give me my library in the list of suggested libraries. Via "Add Other" -> "Add package dependency" -> "Add Local ..." I can again select the root directory of my library, but other than showing up twice in the left-side folder view (and not in said Frameworks, Libraries and Embedded content", I have no luck in importing it to my code. What am I doing wrong?
9
1
10k
Apr ’22
signal SIGABRT when loading a .sks (Swift 5.5)
I'm trying to make my GameOverScene load when I supposedly "die" but all i get in the editor is signal SIGABRT. Here is some code for it. if self.livesArray.count == 0 { let gameOver = SKScene(fileNamed: "GameOverScene") as! GameOverScene //This line causes SIGABRT gameOver.score = self.score self.view?.presentScene(gameOver)} Please can someone help me? Also i dont know where to find the debugger :P
1
0
586
Apr ’22
Symbolicating Crash Reports for Mac Catalyst App
I'm trying to debug a couple of crash reports for a Mac Catalyst app and seem to be unable to symbolicate my crash reports. In the Xcode Organizer, I see unsymbolicated lines for my app, despite having the original archive for the build in question. A search for the relevant dSYM (using the process from https://developer.apple.com/documentation/xcode/adding-identifiable-symbol-names-to-a-crash-report#Locate-a-dSYM-Using-Spotlight) yields no results. Unlike iOS builds, the "Download dSYMs" button isn't present in the organizer, nor is the option to download dSYMs from App Store Connect. I assume this is because macOS apps don't use bitcode. The app's Debug Information Format is set to DWARF with dSYM File. Has anyone else run into this issue? Any ideas about how I can symbolicate the crash logs?
5
1
1.7k
Apr ’22
FxPlug open file dialog using a push button
I am trying to develop a plug in for motion in Objective-c using the FxPlug template and so far I have been having issues with getting "NSOpenPanel" to be called from a push button in order to get a file dialog window, similar to the "File" generator present in Motion. [paramAPI addPushButtonWithName: @"MIDI file" parameterID: 1 selector: @selector(MIDI_func) parameterFlags: kFxParameterFlag_DEFAULT] I have tried to call NSOpenPanel through "dispatch_async" so that it would run on the main thread and thus not crash but when I press the button it appears not to work - (void)MIDI_func {     NSLog(@"Button pressed");     dispatch_async(dispatch_get_main_queue(), ^{         NSOpenPanel* openDlg = [NSOpenPanel openPanel];         [openDlg setCanChooseFiles:YES];         [openDlg setAllowsMultipleSelection:NO];         [openDlg setCanChooseDirectories:NO];         if ([openDlg runModal] == NSModalResponseOK) {             NSArray* urls = [openDlg URLs];             for(NSInteger i = 0; i < [urls count]; i++ ) {                 NSString* url = [urls objectAtIndex:i];                 NSLog(@"Url: %@", url);             }         }     }); } How can I achieve this or is there a function in the FxPlug SDK that will let me open a file dialog from the host application?
3
1
1.7k
May ’22
Debugging Resources
General: DevForums tags: Debugging, LLDB, Graphical Debugger Xcode > Debugging documentation Diagnosing memory, thread, and crash issues early documentation Diagnosing issues using crash reports and device logs documentation Choosing a Network Debugging Tool documentation Testing a release build documentation Isolating Code Signing Problems from Build Problems DevForums post What is an exception? DevForums post Language Exception from RCTFatal DevForums post Standard Memory Debugging Tools DevForums post Using a Sysdiagnose Log to Debug a Hard-to-Reproduce Problem DevForums post Posting a Crash Report DevForums post Creating a test project DevForums post Implementing Your Own Crash Reporter DevForums post Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com"
0
0
3.1k
Jun ’22
Xcode Cloud is unable to connect to the repository
Hello, I am trying out Xcode Cloud for the first time. I could connect to Github in the initial setup and had a few failed builds (package resolution error), which I resolved fairly quickly. Now whenever I am trying to build, I get the following error: Xcode Cloud is unable to connect to the repository “<respository-name>”. Reconnect the repository to resume builds. I am unable to remove the connection from settings as well because it's stuck in a loading state. Is there a way to fix this?
14
4
9.1k
Jun ’22