I have an Xcode 15.4 project with 4 targets (i.e. 2 UI and 2 CLI). Next, I'm looking to set a unique scheme for each target but it keeps changing to one of the previously set schemes. For example, I have the following four targets and I would like to have the associated:
Target 1 - > Scheme 1
Target 2 -> Scheme 2
Target 3 -> Scheme 3
Target 4 -> Scheme 4
When the target is selected, shouldn't the corresponding scheme be updated in the Xcode toolbar? Or is there a setting that I'm missing to enable/disable within Xcode that would resolve this issue?
Finally, I'm seeing similar behavior in Xcode 16 beta 1.
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Post
Replies
Boosts
Views
Activity
When Xcode IDE inserts IBOutlet or autocompletes method signatures, it places the * char next to the var name:
@property (weak) IBOutlet NSButton *aButton;
- (NSString *)someMethod:(NSString *)param1 {
}
But my convention is put the * char right after the type name:
@property (weak) IBOutlet NSButton* aButton;
- (NSString*)someMethod:(NSString*)param1 {
}
Is there anyway to tell Xcode to follow my convention?
Overview
macOS test application is unable to detect elements beyond a certain length during UI testing after an Xcode(14/15) update.
Issue Description
We have a test app for both iOS and macOS, sharing the same code except for different UI implementations. During UI tests, the app opens a webpage in WKWebView. This is a long webpage with multiple sections, approximately 200 for the sake of clarity. The app screen can show 4 elements at a time. Our UI tests navigate to each section and perform various tasks.
Since upgrading from Xcode 13 to 15, we've encountered an issue specifically on macOS (unsure if it's related to Swift or Xcode). Our Mac UI test i.e. XCUIApplication() is unable to find elements beyond a certain length, which appear to be out of the view hierarchy. When we use app.debugDescription, it only returns 180 sections, missing the last 20. The HTML code of the webpage is consistent, with all sections structured similarly.
Troubleshooting Steps
Accessibility Inspector: Using Xcode’s Accessibility Inspector yields the same result, detecting only 180 sections.
Manual Scrolling: We tried manually scrolling to the missing sections. Although we can see these sections on the screen, app.debugDescription still only reports 180 sections, causing the UI test to fail in recognizing the last 20 sections.
Deleting Sections: If we delete the top 20 sections of the webpage, it can then find the 200th element. This suggests we might be hitting some limit or restriction we are not aware of. However, on iOS, the same webpage returns all 200 sections without issue.
Additional Information
This issue is causing a problem only on the Mac app. In our Cocoa Mac application, we are using NSTabView, if that information helps with the investigation. We are wondering if there are any settings or flags we might have missed?
Request for Assistance
Any help would be greatly appreciated, as this issue is currently blocking us and it was working fine in the previous version.
Question
Is there any way we can bring those 20 elements into the hierarchy?
I am attempting to build to my vision pro and I purchased a developer account but it's still "pending". How can I test on my Vision Pro without waiting on approval?
I am working on a MacBook Pro running Monterey 12.7.5
in the past I installed command line tools and developed fine. since then I had a problem with the MacBook re installed the whole OS and basically I want to start developing again.
I am trying to instal command line tools without installing all of Xcode. but when I downloaded some version of it, it said my OS was too old. then I tried all of the versions that start with "12" and it wouldn't install because it said my OS was to new.
what should I do?
thanks
yoav
With 16.0b1, I am seeing a runtime error of:
Symbol not found: _$s7SwiftUI10ScrollViewV14scrollDisabledyACyxGSbF
This happens in both our app and test host apps. We are using Simulator 17.0.1.
Has anyone else seen this issue? I'm still looking for anything that might be amiss, but it looks fine and runs on 15.4 fine.
Edit: I have confirmed that this only happens when running 17.x simulators.
Now that SwiftCharts exist, when will I be able to plot a swift array as a line plot, or a 2D height plot/image directly from the XCode debug command window. (p for print, p for plot also!).
Thanks
Hi there,
I currently hold an Apple Developer account that has two teams associated with it. One is my personal team, for which I pay for the Apple Developer Program. The other is a corporate account for which I am working. Despite seeing both teams in the Apple Developer (web) portal, I am only able to see one of them in the Xcode account settings page.
I have reached out to Apple Developer support over the phone, and have been advised to post this issue here to better access support.
Hi
This issue is present both in previous, current, and beta versions of Xcode
When a project has localization in packages, Xcode FAILS to export localization
The reason is that when trying to export in this configuration, the compiler will try to export using macOS sdk, but if the package support only iOS of course will not find symbols for frameworks and functions that are scoped only for iOS
This behaviour is not changed when the platforms for the package includes ".macOS("99") has I've found as a suggestion online
The only way to perform this operation is to run, from CLI the following command
xcodebuild -exportLocalizations -localizationPath . -sdk iphoneos -project TranslateTest.xcodeproj -exportLanguage en
The problem is that this command will not work when one of the packages contains a macro.
The following error will return in CLI if the macro is used (if the package is only imported no error appears)
error: external macro implementation type 'MyMacroMacros.StringifyMacro' could not be found for macro 'stringify'
I've found online some suggestions from apple folks that says to replace
-sdk iphoneos
with
-destination 'platform=iOS,name=Any iOS Device’
in case your project contains a macro, but this changes nothing in the final result, the export will fail
I'm providing a zip for apple in the radar (cannot upload zip here) that contains 3 example project for the 3 cases:
A project without any packages that can extract its strings with any mode
A project with a package that can only extract its strings only by CLI
A project with multiple packages, one of which has a macro, and it can never extract its string
This problem affects any possibility to have a modularised application with localisations, macros, and packages.
Feedback FB13902424
While compiling with the Xcode Beta1 version, the 'module' keyword used in the previous method as a parameter is now recognized as a reserved keyword, causing compilation errors and preventing our project from continuing to run. Please fix this issue as soon as possible.
Additionally, I would like to vent: It's quite uncomfortable that the MacOS Beta version cannot be downgraded directly. I am now facing the dilemma of being unable to open Xcode 15 and having Xcode 16 fail to compile.
I upgraded to Xcode 16 beta today, and when I ran my project, I found that the build failed. The reason is shown in the picture. I believe it's a bug in Xcode, where it mistakenly identified a method parameter as a keyword, causing the compilation to fail. Is there any temporary workaround to bypass this error?
In an older WWDC video https://developer.apple.com/wwdc21/10205 at 5:00 the presenter shows how he creates a Pull Request from Xcode.
In the dropdown where you can select the branch, there is an option called "Create Pull Request".
In my Xcode (latest Xcode 15.3), I don't have that option.
We're using Bitbucket Cloud. Is this supported for Bitbucket Cloud?
Feedback Submitted FB13898610
Xcode crashes with below. Pressing the "-" to remove a package dependancy.
Solutions most welcome
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process: Xcode [27376]
Application Specific Information:
abort() called
Application Specific Signatures:
NSInvalidArgumentException
Application Specific Backtrace 0:
0 CoreFoundation 0x00007ff815134dc6 __exceptionPreprocess + 242
1 DVTFoundation 0x000000011257fd3e DVTFailureHintExceptionPreprocessor + 448
2 libobjc.A.dylib 0x00007ff814c24e9d objc_exception_throw + 48
3 CoreFoundation 0x00007ff81504f400 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 604
4 CoreFoundation 0x00007ff81504f18a +[NSDictionary dictionaryWithObjects:forKeys:count:] + 49
5 DevToolsCore 0x000000012118ca09 -[PBXTarget removePackageProductDependencies:] + 1053
6 DevToolsCore 0x00000001211b1c65 -[PBXTarget packageReferenceWillBeRemoved:] + 273
7 CoreFoundation 0x00007ff8150b742a -[NSArray makeObjectsPerformSelector:withObject:] + 252
8 DevToolsCore 0x000000012116200c -[PBXProject(PBXTargetedNotifications) packageReferenceWillBeRemoved:] + 267
9 DevToolsCore 0x0000000121157026 -[PBXProject removePackageReference:] + 219
10 Xcode3UI 0x0000000128db10c8 __56-[Xcode3PackageReferenceListViewController removeItems:]_block_invoke + 319
11 Xcode3UI 0x0000000128db0c7b -[Xcode3PackageReferenceListViewController removeItems:] + 1925
12 AppKit 0x00007ff81891e34d -[NSApplication(NSResponder) sendAction:to:from:] + 337
13 IDEKit 0x00000001162a8e5f __37-[IDEApplication sendAction:to:from:]_block_invoke + 315
14 DVTFoundation 0x000000011257f51d DVTInvokeWithFailureHint + 78
15 IDEKit 0x0000000116202bc0 -[IDEApplicationController application:setFailureHintMessage:duringBlock:] + 118
16 IDEKit 0x00000001162a8f2b -[IDEApplication _invokeWithFailureHint:block:] + 105
17 IDEKit 0x00000001162a8cb8 -[IDEApplication sendAction:to:from:] + 333
18 AppKit 0x00007ff81891e1c3 -[NSControl sendAction:to:] + 86
19 AppKit 0x00007ff81891e0f5 __26-[NSCell _sendActionFrom:]_block_invoke + 131
20 AppKit 0x00007ff81891dffe -[NSCell _sendActionFrom:] + 171
21 AppKit 0x00007ff81891df46 -[NSButtonCell _sendActionFrom:] + 96
22 AppKit 0x00007ff81891ae32 NSControlTrackMouse + 1823
23 AppKit 0x00007ff81891a6ef -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 125
24 AppKit 0x00007ff81891a5b6 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 666
25 AppKit 0x00007ff8189199ab -[NSControl mouseDown:] + 666
26 AppKit 0x00007ff818918353 -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 4582
27 AppKit 0x00007ff818891177 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 313
28 AppKit 0x00007ff818890e23 -[NSWindow(NSEventRouting) sendEvent:] + 345
29 IDEKit 0x0000000116269d6a -[IDEWorkspaceWindow sendEvent:] + 158
30 AppKit 0x00007ff819043470 -[NSApplication(NSEventRouting) sendEvent:] + 1456
31 IDEKit 0x00000001162a8a7f -[IDEApplication sendEvent:] + 308
32 AppKit 0x00007ff818bfe8de -[NSApplication _handleEvent:] + 65
33 AppKit 0x00007ff81872209a -[NSApplication run] + 640
34 IDEKit 0x00000001162a888a -[IDEApplication run] + 54
35 AppKit 0x00007ff8186f5ff3 NSApplicationMain + 816
36 dyld 0x00007ff814c59366 start + 1942
Kernel Triage:
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x7ff814fac14a __pthread_kill + 10
1 libsystem_pthread.dylib 0x7ff814fe4ebd pthread_kill + 262
2 libsystem_c.dylib 0x7ff814f0aa79 abort + 126
3 IDEKit 0x116226509 +[IDEAssertionHandler _handleAssertionWithLogString:assertionSignature:assertionReason:extraBacktrace:] + 1178
4 IDEKit 0x1162278c3 -[IDEAssertionHandler handleUncaughtException:] + 749
5 IDEKit 0x116227c00 IDEHandleUncaughtException + 94
6 IDEKit 0x1162a9370 -[IDEApplication reportException:] + 79
7 AppKit 0x7ff818722129 -[NSApplication run] + 783
8 IDEKit 0x1162a888a -[IDEApplication run] + 54
9 AppKit 0x7ff8186f5ff3 NSApplicationMain + 816
10 dyld 0x7ff814c59366 start + 1942
While compiling with the Xcode Beta1 version, the 'module' keyword used in the previous method as a parameter is now recognized as a reserved keyword, causing compilation errors and preventing our project from continuing to run. Please fix this issue as soon as possible.
Additionally, I would like to vent: It's quite uncomfortable that the MacOS Beta version cannot be downgraded directly. I am now facing the dilemma of being unable to open Xcode 15 and having Xcode 16 fail to compile.
2019 Macbook M1 Sonoma 14.5.
Installed Perlbrew and Perl-5.38.2. Tried to install Perl Tk using cpanm.
inline-code
checking for gcc... cc
checking whether the C compiler (cc -fno-common -DPERL_DARWIN -mmacosx-version-min=14.5 -DNO_POSIX_2008_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -fno-common -DPERL_DARWIN -mmacosx-version-min=14.5 -DNO_POSIX_2008_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -mmacosx-version-min=14.5 -fstack-protector-strong -L/usr/local/lib) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
ERROR from evaluation of /Users/terryhimes/.cpanm/work/1718338769.22397/Tk-804.036/JPEG/Makefile.PL: ERROR from evaluation of /Users/terryhimes/.cpanm/work/1718338769.22397/Tk-804.036/JPEG/jpeg/Makefile.PL: Error opening Makefile: No such file or directory at ./Makefile.PL line 41.
inline-code
Translated Report (Full Report Below)
Process: XCBBuildService [19515]
Path: /Applications/Xcode.app/Contents/SharedFrameworks/XCBuild.framework/Versions/A/PlugIns/XCBBuildService.bundle/Contents/MacOS/XCBBuildService
Identifier: com.apple.dt.XCBBuildService
Version: 16.0 (23000.0.209.4)
Build Info: XCBuild-23000000209004000~20 (16A5171c)
Code Type: ARM-64 (Native)
Parent Process: Xcode [1187]
Responsible: Xcode [1187]
User ID: 501
Date/Time: 2024-06-13 18:52:42.9964 -0300
OS Version: macOS 15.0 (24A5264n)
Report Version: 12
Anonymous UUID: E79CA726-937A-A4A4-9B42-9DF9455F3181
Time Awake Since Boot: 1300 seconds
System Integrity Protection: enabled
Crashed Thread: 15
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process: XCBBuildService [19515]
Application Specific Information:
abort() called
Kernel Triage:
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x19c7ece14 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x19c7ff5b0 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x19c7f59b8 mach_msg_overwrite + 480
3 libsystem_kernel.dylib 0x19c7ed15c mach_msg + 24
4 CoreFoundation 0x19c916b40 __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x19c9153f8 __CFRunLoopRun + 1228
6 CoreFoundation 0x19c9148bc CFRunLoopRunSpecific + 608
7 CoreFoundation 0x19c98f6a0 CFRunLoopRun + 64
8 libswift_Concurrency.dylib 0x273f30e50 swift_task_asyncMainDrainQueueImpl() + 40
9 libswift_Concurrency.dylib 0x273f30e10 swift_task_asyncMainDrainQueue + 92
10 XCBBuildService 0x1021eb924 main + 84
11 dyld 0x19c4ad298 start + 2876
Thread 1:
0 libsystem_kernel.dylib 0x19c7ed990 read + 8
1 XCBServiceCore 0x102604e88 closure #3 in ServiceHostConnection.resume() + 552
2 XCBServiceCore 0x1026063c1 partial apply for specialized thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) + 1
3 XCBServiceCore 0x10260692d partial apply for closure #1 in closure #1 in OS_dispatch_queue.async(group:qos:flags:execute:) + 1
4 XCBServiceCore 0x10260692d partial apply for closure #1 in closure #1 in OS_dispatch_queue.async(group:qos:flags:execute:) + 1
5 XCBServiceCore 0x1026061d1 specialized thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) + 1
6 XCBServiceCore 0x1026063c1 partial apply for specialized thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) + 1
7 libswift_Concurrency.dylib 0x273f31921 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1
Thread 2:: llb_buildsystem_build
0 libsystem_kernel.dylib 0x19c7f05ac __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x19c82e894 pthread_cond_wait + 1204
2 libc++.1.dylib 0x19c764578 std::__1::condition_variable::wait(std::__1::unique_lockstd::__1::mutex&) + 28
3 llbuild 0x1032f3308 (anonymous namespace)::BuildEngineImpl::executeTasks(llbuild::core::KeyType const&) + 4552
4 llbuild 0x1032f038c llbuild::core::BuildEngine::build(llbuild::core::KeyType const&) + 580
5 llbuild 0x103309ac4 (anonymous namespace)::BuildSystemImpl::build(llbuild::buildsystem::BuildKey) + 208
6 llbuild 0x103309ca0 llbuild::buildsystem::BuildSystem::build(llvm::StringRef) + 260
7 llbuild 0x1032fc3f0 llbuild::buildsystem::BuildSystemFrontend::build(llvm::StringRef) + 56
8 llbuild 0x1032833a8 0x103268000 + 111528
9 XCBBuildSystem 0x10275b640 partial apply for closure #13 in BuildOperation.build() + 28
10 libswift_Concurrency.dylib 0x273efc564 TaskLocal.withValue(:operation:file:line:) + 368
11 XCBUtil 0x10225d92c closure #1 in closure #1 in static Task<>.detachNewThread(name:_:) + 324
12 XCBUtil 0x102230064 thunk for @escaping @callee_guaranteed () -> () + 28
13 Foundation 0x19e3a1de0 NSThread__block_start + 76
14 libsystem_pthread.dylib 0x19c82e2e4 _pthread_start + 136
15 libsystem_pthread.dylib 0x19c8290fc thread_start + 8
I am attempting to create a launch screen story board and export it as a package. I built a story board by using the following video tutorial
https://www.youtube.com/watch?v=CIMbJ1WXMS8
When I finish I select the storyboard file in the project navigator view in Xcode and use menu file>export. On the popup menu I select my build folder for the location and I select File format as Interface Builder Story board package.
I am using a Sonoma 14.5, I have tried using xcode 15.0 , 15.2 and 15.4
For some reason this is causing Xcode to crash. It was working in 15.2 and then it started crashing over and over. I can run it on my iPad and it works but then I export it and Xcode crashes and does not export anything.
Any insights would be greatly appreciated.
I am building an app with cordova-ios (v7.1.0) through XCode.
At the end of the build, i have the following errors :
[... Lot of duplicate symbol errors...]
duplicate symbol '_kCULMainXmlTag' in:
/Users/antoineabbou/Library/Developer/Xcode/DerivedData/Appname-***-dvetpwtvzosuihaisuqrtdqvndri/Build/Intermediates.noindex/Appname-***.build/Debug-iphonesimulator/Appname-***.build/Objects-normal/x86_64/CULConfigXmlParser-84817d24615b6eea8da61f9b08150c6b.o
ld: 34 duplicate symbols
clang: error: linker command failed with exit code 1 (use -v to see invocation)
/Users/antoineabbou/Projects/briefme-pwa/brief-eco/cordova/platforms/ios/Appname-***.xcodeproj: warning: The Copy Bundle Resources build phase contains this target's entitlements file '/Users/antoineabbou/Projects/briefme-pwa/brief-eco/cordova/platforms/ios/Appname-***/Resources/Appname-***.entitlements'. (in target 'Appname-***' from project 'Appname-***')
** BUILD FAILED **
The following build commands failed:
Ld /Users/antoineabbou/Projects/briefme-pwa/brief-eco/cordova/platforms/ios/build/Debug-iphonesimulator/Appname-***.app/Appname-*** normal (in target 'Appname-***' from project 'Appname-***')
I already tried to add -ld_classic, -ld64 or -Wl in other linker flags but it doesn't work.
I tried to remove all my DerivedData but it still have the same issue.
I tried to reinstall XCode, to clone my repo from zero to have a fresh clean install but nothing does the job.
Any help would be great.
Thanks !
I installed Xcode 16 beta on Sonoma 14.5 and tried to run my app on the simulator, but it's practically impossible to use. It's extremely slow and unresponsive.
After doing some research, I noticed that launching any application causes the simulator to flood the system with logs. This triggers the diagnosticd process, which increases memory and CPU usage, worsening over time. The memory usage peaked at 10GB before I decided to close the simulator.
Has anyone else experienced this issue? Is there any solution for this?
Hello,
For some reason since yesterday whenever I run an build and run an app on my Mac I get this issue:
Logging Error: Failed to initialize logging system. Log messages may be missing. If this issue persists, try setting IDEPreferLogStreaming=YES in the active scheme actions environment variables.
I tried to create an iOS app and this is the issue I get in the console when running it on simulator.
This issue also appears on old projects I have.
Setting IDEPreferLogStreaming=YES in environment variables does fix the issue and the error no longer appears but why is it appearing in the first place and how can I get rid of it?
Here is a screenshot:
Thanks in advance for your help.