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 14 "Fix All Issues" not possible?
Im using Version 14.0 (14A309) In Xcode 13 i used the keybinding Control ⌃ + Option ⌥ + Command ⌘ + F to fix all errors in scope, for example an enum with missing cases. It is not possible in Xcode 14 since the "Fix All Issues" button is disabled all the time. You can navigate to "Fix All Issues" from: Editor -> "Fix All Issues" but its not possible to tap the button.
5
3
2.4k
Sep ’22
Unable to install iOS & watchOS app to iPhone, because of intents change
I've been happily building and deploying my app to my iPhone and Watch S8, and the app was ready to submit to App Store Connect last night. However, when archiving it I got an error saying that my DynamicEventSelectionIntent was in multiple extensions. It was, kind of. When I started working on the complications I copied the Widgets intents into the complications, and left the name the same, but they were not in multiple targets. It looks like the info plist only had one item in the IntentsSupported (because they're the same name), so I decided to rename them so I had a widget one and a complications one. The problem I have now is that I can't deploy to my iPhone and Watch anymore because I'm getting this error: This app contains a WatchKit app with one or more Siri Intents app extensions that declare IntentsSupported that are not declared in any of the companion app's Siri Intents app extensions. WatchKit Siri Intents extensions' IntentsSupported values must be a subset of the companion app's Siri Intents extensions' IntentsSupported values. All I've done is rename one intent, and locate every instance of it in the info plist files, and add the appropriate new one into the right places. Here's what I've got. Main App contains Widget and WidgetIntentHandler, plus Watch App, which contains Complications and ComplicationsIntentHandler. Target: Main app: (I've removed everything that has no bearing on extensions.) Target: Widget: Target: WidgetIntentHandler: Target: Watch App: Target: Complications: Target: ComplicationsIntentHandler: Please, can someone tell me what should and should not be in the various parts, as I've tried for 12 hours now and I cannot get this to deploy to my iPhone anymore :( Thanks.
12
1
2.2k
Oct ’22
VPN causes developer cert in keychain to become untrusted
After not happening to me for a few months, this issue has started hitting me again with currently %100 reproducability. If turn on VPN on my Mac then instantly the developer certificates within the keychain become untrusted. But that's not all, if VPN is then turned off the certificates do not revert to their trusted status but remain untrusted. The consequence of this is that if VPN is turned on and then a build is perform, it fails, and the only way to fix things is to delete the cert(s) from they keychain and re-install them. As a remote worker, having this happen several or even dozens of times a day is incredibly annoying and frustrating. This issue has been occurring for literally years, sometimes it occurs very often, others while its quiet for a while, and has spanned multiple versions of Xcode and Mac OS. So whatever the cause is its endemic. It doesn't just affect myself, but all the members in my development team. I'm currently using Xcode 14.1 RC 2 and Monterey but I've seen this issue occur with many versions of Xcode and Mac. (I'm using Cisco AnyConnect Secure Mobility Client). If the VPN is somehow interfering/affecting the connectivity aspect when an attempt is made by Xcode to validate the certificate, then why does it not rectify itself after turning off VPN? This is so so so so annoying. Can somebody please comment on why this happens and if there's a way to prevent it.
5
1
3.2k
Nov ’22
Updateign provisioning taking forever
Hello, in the past couple of weeks I've been experience some problems with xcode regarding the signing & capabilities. I work in a company that makes customized apps for every of our clients and beacause of that we have about 200 targets in our project. In the past couple of weeks, I have been hanving trouble with the signing & capabilities in xcode. Some times is taking too long to load the poart where i select the team were the app will be upload and when it does it got stuck with the massege updating provisioning . There is anything that could have been done to not take too much time to the target get ready to be publiched? Thanks in advanced for any help.
2
3
1.2k
Nov ’22
How to disable Temporary Tabs in Xcode?
It's maddening. I just opened a file and now it's gone because I had the audacity to open another file. I've learned that I can double click the tab of the first file to make it a permanent tab... but, of course, I'll need to do that every time I ever open any file ever, and if I close that file and come back to it later I'm going to be constantly having to double click tabs just to make Xcode stop replacing my tabs for me. It's nuts. It's driving me insane. Please. Is there any way to just DISABLE the temporary tabs behavior? I don't find it helpful in any way and I find it to be destructive to my development workflows.
10
4
3.5k
Nov ’22
Cannot catch `std::invalid_argument` on clang++ under m1 -fno-rtti
Today I got stuck with a weird behaviour with my c++ project. There is the code which doesn't catch exception from standard library (the same snippet works well on intel mac and under linux machines). Code snippet: #include <exception> #include <stdexcept> #include <iostream> #include <string> int main() { try { std::stod("notanumber"); } catch (const std::invalid_argument&) { std::cerr << "Caught std::invalid_argument" << std::endl; } } Compilation command: clang++ -fno-rtti main.cpp -o main && ./main Clang versions: clang++ --version Homebrew clang version 15.0.3 Target: arm64-apple-darwin21.6.0 Thread model: posix InstalledDir: /opt/homebrew/opt/llvm/bin Also tried: Apple clang version 14.0.0 (clang-1400.0.29.102) Target: arm64-apple-darwin21.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin Output: libc++abi: terminating with uncaught exception of type std::invalid_argument: stod: no conversion [1] 65643 abort ./main Expected output: Caught std::invalid_argument Other info: Chip: Apple M1 OS: 12.6
4
0
1.5k
Nov ’22
'leaks' message
My app has a debugging mode in which it invokes 'leaks' on itself. I am now seeing this message on stderr: Target process is an ancestor and permitting live process for ancestors so not generating a corpse to save resources by default. This sort of makes sense, but I would like a more detailed explanation. Is there some option I should be sending to 'leaks' to operate in a better mode? Should I be invoking it differently?
3
0
675
Feb ’23
_dispatch_client_callout crash
I received the attached crash report. The problem is that the crash report does not contain the abort reason - it appears to be thrown in the GCD library with no additional information. Is it a possible deadlock? 2023-02-15_02-40-23.0077_+0100-94015bd052c4005658221a5e6279f28a75b9e92c.crash Any ideas?
5
0
2.2k
Feb ’23
Confused about expiring certificates
Hi all, I got the email saying my certificate(s) will be expiring in 30 days. I can view my certificates (distribution, distribution managed, and 2x developments) on my account page. The distribution expires in 30 days (4/20/2023) The distribution managed expires in 6 months Development #1 (under my name) expires in 30 days (4/20/2023) Development #2 (also under my name) expires in 2 months (5/26/2023) However, I don't see any way to renew them. I have read other posts that talk about 'edit' or 'generate' buttons, but I don't see that and I presume those posts are just out of date. When I look in my xcode project, I see that I am using 'automatically manage singing'. Xcode also shows that a provisioning profile is expiring in 2 months. I presume that is something different? It has the same expiration date as my development #2 certificate (5/26/2023). It's also unclear what is going to happen when these certificates expire. I read that devices running builds with the expired distribution cert will stop working. Is that just for internal builds downloaded from something like Test Flight? Will live builds, downloaded by actual players from the AppStore, stop working if I don't push a release with a new cert in the next month? I am the one that set this all up and 'maintains' it, but I don't engage with it often enough to remember the bits and bobs. My apologies for all the newbie questions. Thank you for your assistance
2
0
3.3k
Mar ’23
Video not working on 16.4 simulator
I'm testing a video stream (HLS) with AVPlayer. On XCode 14.3 and simulators running iOS 16.4, there is no video image, only black screen. The audio is playing normally, also progress/duration of the video is showing as expected. The problem does not occur on same XCode version with earlier versions of the simulator. Is this a simulator bug? I've also tested it on real device with iOS 16.4 - no problem there.
25
32
14k
Mar ’23
Xcode cloud errors
Hi community: I'm coming across two error types on Xcode cloud during ui tests. encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Test crashed with signal kill before starting test execution. If you believe this error represents a bug, please attach the result bundle at /Volumes/workspace/resultbundlexcresult)) encountered an error (Failed to prepare device 'Clone 7 of iPhone 14 Pro' for impending launch. If you believe this error represents a bug, please attach the result bundle at /Volumes/workspace/ resultbundle.xcresult. (Underlying Error: Unable to boot the Simulator. launch failed to respond. (Underlying Error: Failed to start launch_ sim: could not bind to session, launchd_sim may have crashed or quit responding))) Any ideas on how to solve them? Thanks
6
1
2.3k
May ’23
Xcode 14.3: Restarting after unexpected exit, crash, or test timeout - How to debug?
My tests fail with "Restarting after unexpected exit, crash, or test timeout". This is what I have so far established: Does only happen when building with xcodebuild (14.3) but not when building with Xcode (14.3) Tests that are failing are in a .testTarget within a local swift package and part of a test plan together with tests that are in subprojects there are no crashlogs, so likely these tests are not crashing with Xcode 14.2 there are no problems whatsoever (xcodebuild or Xcode) Any ideas on how to debug this any further? Best Roddi
4
1
1.9k
May ’23
The LLDB RPC server has crashed. You may need to manually terminate your process. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.
The LLDB RPC server has crashed. You may need to manually terminate your process. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.
1
0
707
May ’23
Error message "Thread 10: EXC_BREAKPOINT (code=1, subcode=0x10515fd44)" in Xcode
I have been getting these error messages in debug window in Xcode: 2023-06-06 07:46:15.412684-0500 Courier[8456:442818] [LayoutConstraints] Unsupported layout off the main thread for _UIModernBarButton with nearest ancestor view controller, UINavigationController 2023-06-06 07:46:15.413268-0500 Courier[8456:442818] [Assert] -[UIImageView _invalidateImageLayouts] must be called on the main queue 2023-06-06 07:46:15.413730-0500 Courier[8456:442818] [Assert] -[UIImageView _layoutForImage:inSize:cachePerSize:forBaselineOffset:] must be called on the main queue (lldb) The messages come when my code crashes and gives this error message in a red ribbon in the editor window: Thread 10: EXC_BREAKPOINT (code=1, subcode=0x10515fd44) In the Debug navigator on the left pane of Xcode, it shows the code stopped at: #0 0x000000010515fd44 in _dispatch_assert_queue_fail () This is what shows at the end in the editor window. At the very end is where the error message in the red ribbon shows: 0x10515fd10 <+68>: add x9, x9, #0xf2f ; "BUG IN CLIENT OF LIBDISPATCH: Assertion failed: " 0x10515fd14 <+72>: stp x9, x8, [sp] 0x10515fd18 <+76>: adrp x1, 65 0x10515fd1c <+80>: add x1, x1, #0xefa ; "%sBlock was %sexpected to execute on queue [%s (%p)]" 0x10515fd20 <+84>: sub x0, x29, #0x18 0x10515fd24 <+88>: bl 0x10519cfc8 ; symbol stub for: asprintf 0x10515fd28 <+92>: ldur x19, [x29, #-0x18] 0x10515fd2c <+96>: str x19, [sp] 0x10515fd30 <+100>: adrp x0, 65 0x10515fd34 <+104>: add x0, x0, #0xf65 ; "%s" 0x10515fd38 <+108>: bl 0x1051986b0 ; _dispatch_log 0x10515fd3c <+112>: adrp x8, 98 0x10515fd40 <+116>: str x19, [x8, #0x268] -> 0x10515fd44 <+120>: brk #0x1 I have no idea which code is causing the error, so I don't even know what code to put in my question. I created a symbolic breakpoint with 'LayoutConstraints' in the Symbol field. It is never tripped. I get no purple warnings that says a line of code should not be in the main thread. I have no idea where to go from here. I don't ind anything when I do a search in the internet that is narrowed down to address my error. I am running the code on an iPhone 13 Pro Max device with iOS 16.5. I am using Xcode 14.3 on a Mac Pro running Ventura 13.4
3
2
1.5k
Jun ’23