I am using DuckDB as an external dependency in my project. The package is basically a Swift wrapper around C++ code.
If I run my app in Debug mode, then the performance of the library is an order of magnitude slower than when I run it in Release mode. In Release mode it is really fast, but compilation times are too slow.
I am a complete beginner to Xcode's build system and was wondering if there was any way to have the best of both worlds? For example, by compiling my SwiftUI code without optimizations but having it linked to a static and optimized version of the library.
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Post
Replies
Boosts
Views
Activity
As predictive code completion is natively included in Xcode, are we allowed to use it for the Swift Student Challenge?
I'm trying to retrieve the overall memory peak of a process. I've looked into retrieving it through task_vm_info struct defined in task_info.h
By logging the members of the struct, it seems neither resident_size_peak, internal_peak or ledger_phys_footprint_peak is matching what the peak memory value that's being detected by xcode instrument. Can anyone point me to the correct way to retrieve that peak value? Is it the summation of some of the fields in task_vm_info` or is there a more complicated algorithm involved in deriving that value?
I have an app on the App Store for many years enabling users to post text into clouds in augmented reality. Yet last week abruptly upon installing the app on the iPhone the screen started going totally dark and a list of little comprehensible logs came up of the kind:
ARSCNCompositor <0x300ad0e00>: ARSCNCompositor (0, 0) initialization failed. Matting is not set up properly.
many times, then
RWorldTrackingTechnique <0x106235180>: Unable to update pose [PredictorFailure] for timestamp 870.392108
ARWorldTrackingTechnique <0x106235180>: Unable to predict pose [1] for timestamp 870.392108
again several times and then:
ARWorldTrackingTechnique <0x106235180>: SLAM error callback: Error Domain=Slam Error Code=7 "Non fatal error occurred due to significant drop in a IMU data" UserInfo={NSDescription=Non fatal error occurred due to significant drop in a IMU data, NSLocalizedFailureReason=SlamEngineNodeGroup Failure: IMU issue: gyro data stream verification failed [Significant data drop]. Failed on timestamp: 870.413247, Last known timestamp: 865.350198, Delta: 5.063049, System timestamp: 870.415781, Delta between system and frame: 0.002534. }
and then again the pose issues several times.
I hoped the new beta version would have solved the issue, but it was not the case. Unfortunately I do not know if that depends on the beta version or some other issue, given the app may be not installed on the Mac simulator.
I have downloaded Xcode 16.1 and after the first run it downloaded 18.1 simulator and then watchOS 11.1 Simulator. Then I suppose it detected my watch 7 with OS 8.1 and wanted to download symbols for it but then it failed with 403 error. Any way to do it some other way?
Hi all.
I have encountered an issue in which I failed to build the app on Xcode. It says "Provisioning profile doesn't match the entitlements file's values for the com.apple.developer.team-identifier and application-identifier entitlements". But I have checked these two values, they are exactly the same as expected.
we run into this error please help
--> Provisioning profile failed qualification
Profile doesn't support Tap to Pay on Iphone
---> Provisioning profile failed qualification
Profile doesn't include the com.apple.developer.proximity-reader.payment.acceptance entitlement
I'm trying to run an xctest bundle, built for catalyst, with xcrun.
i.e.
xcrun xctest path_to_my_test.xctest
It fails, complaining that:
The bundle "MyBundle" couldn't be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.....but incompatible platform (have 'MacCatalyst', need 'macOS')
So it seems like because I'm not executing it in a sim it wants the bundle to be a macOS bundle. But I would have thought it would be possible to run a Mac Catalyst target directly on a macOS host the same as a native macOS test target. Is this not possible?
I'm getting consistent errors in Xcode 16.1 while trying to implement type-safe CIFilter instances as documented on the page at https://developer.apple.com/documentation/coreimage/cifilter.
After pasting in the example code on that page for a "FalseColor" filter into a simple test project's ContentView, I get an error explaining that: "Type 'CIFilter' has no member 'falseColor'".
Same thing with pasting in the example code at https://developer.apple.com/documentation/coreimage/cifilter/3228278-boxblur, and other examples.
I have imported CoreImage, so that shouldn't be the issue.
Am I doing something wrong, or is this functionality just broken?
I have had success creating filters with the string-based API, but access to a type-safe API would obviously be preferable, so any suggestions are greatly appreciated.
I am using Mac Mini M2 with Sequoia 15.1 OS with Virtual Machine (Virtualization.Framework) with same OS.
(almost same as here: https://developer.apple.com/forums/thread/767673)
When adding my account in Xcode there is error with:
Decoding Error.
There was a failure decoding response: (HTTP 401, 60 bytes) The data couldn’t be read because it isn’t in the correct format.
Please fix that
I can't see information like teams and so on
I'm trying to create the app icon for my visionOS app. The Assets catalog already contains AppIcon for iOS and I've added another AppIcon for visionOS.
If I only add the Back layer of the visionOS icon, compiling succeeds despite there being an error
The visionOS App Icon "AppIcon" must have at least 2 layers with applicable content. Although it has 3 layers, only 1 has applicable content.
As soon as I add one of the other two layers, say the Front layer, compiling fails, but this time Xcode only shows a generic compiler error
Command CompileAssetCatalogVariant emitted errors but did not return a nonzero exit code to indicate failure
If I click that message, a long build log opens containing among other things:
2024-10-31 11:28:15.258 AssetCatalogSimulatorAgent[66919:1456355] -[TDTextureRawRenditionSpec _createImageRefWithURL:andDocument:format:] Texture image asset file:///~/Documents/apps/myApp/xcode/iOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/icon_layer3.heic not in one of supported formats
...
libc++abi: terminating due to uncaught exception of type NSException
Command CompileAssetCatalogVariant failed with a nonzero exit code
What is the problem?
I filed FB15642844.
If I define some values in an .xcconfig then I can use those to supply a value to an element within Info.plist, but if I try to do the same for a .plist with any other name then it doesn't work.
Is this some sort of hard-coded constraint?
(I can't move the elements out of the custom .plist into Info.plist as its being read by a 3rd party framework)
My app experiencing a rare crash that I am unable to reproduce and am struggling to make progress with:
Thread 0 name:
Thread 0 Crashed:
0 libobjc.A.dylib 0x00000001926c3c20 objc_msgSend + 32 (:-1)
1 Foundation 0x00000001997357b4 __NSThreadPerformPerform + 264 (NSThread.m:1084)
2 CoreFoundation 0x000000019a82b834 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1957)
3 CoreFoundation 0x000000019a82b7c8 __CFRunLoopDoSource0 + 176 (CFRunLoop.c:2001)
4 CoreFoundation 0x000000019a8292f8 __CFRunLoopDoSources0 + 340 (CFRunLoop.c:2046)
5 CoreFoundation 0x000000019a828484 __CFRunLoopRun + 828 (CFRunLoop.c:2955)
6 CoreFoundation 0x000000019a827cd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
7 GraphicsServices 0x00000001df2751a8 GSEventRunModal + 164 (GSEvent.c:2196)
8 UIKitCore 0x000000019ce61ae8 -[UIApplication _run] + 888 (UIApplication.m:3713)
9 UIKitCore 0x000000019cf15d98 UIApplicationMain + 340 (UIApplication.m:5303)
10 <redacted> 0x000000010287af04 main + 64 (AppDelegate.swift:15)
11 dyld 0x00000001bdfff154 start + 2356 (dyldMain.cpp:1298)
I have done a fair amount of digging, looking at other similar crashes and at this:
https://developer.apple.com/forums/thread/92102
but being unable to reproduce is quite limiting.
I found this very similar issue with useful info on finding which function was being called:
https://forums.developer.apple.com/forums/thread/67763
But in my case, the x1 (and x2) register values seem to point to an area outside of the ranges in the "Binary Images" section..
I've attached an example of a full crash report (with the app name redacted):
2024-10-30_20-44-26.7576_+0000-98e2ef3ee4472b9eb237b0780e8fa0162e1aa7f4.crash
Any help would be greatly appreciated.
The operation couldn’t be completed. (ModelCatalog.CatalogErrors.AssetErrors error 1.)
Domain: ModelCatalog.CatalogErrors.AssetErrors
Code: 1
User Info: {
DVTErrorCreationDateKey = "2024-06-11 11:01:58 +0000";
}
Failed to find asset: com.apple.gm.safety_deny.input.code_intelligence.base - no asset
Domain: ModelCatalog.CatalogErrors.AssetErrors
Code: 1
System Information
macOS Version 15.0 (Build 24A5264n)
Xcode 16.0 (23037.4) (Build 16A5171c)
Timestamp: 2024-06-11T14:01:58+03:00
Xcode Version: 16
MacOS Version: 15.0
My app has 2 packages:
Firebase iOS SDK (https://github.com/firebase/firebase-ios-sdk.git)
Google Mobile Ads (https://github.com/googleads/swift-package-manager-google-mobile-ads.git)
My app fails to run on the Xcode Preview window. The app works successfully on a simulator when built. But, not in the Xcode Preview.
I have tried:
Cleaning and rebuilding.
Changing the target device.
Resetting Package Cache
There are no solutions mentioned/provided online. I have a previews-diagnostics zip file ready. Who can I share it with?
Hi,
After updating to Sequoia and the newest Xcode, I ran some Mac apps from Xcode. No code was changed, but suddenly, I'm getting:
Can't find or decode reasons
Failed to get or decode unavailable reasons
Can't find or decode disabled use cases
NSBundle file:///System/Library/PrivateFrameworks/MetalTools.framework/ principal class is nil because all fallbacks have failed
One problem (I think) is that - Mac/System/Library/PrivateFrameworks/MetalTools.framework/MetalTools is an alias with no original that can be found.
However, the MetalTools does exist in, for example, /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/System/Library/PrivateFrameworks (and Mac ones).
The app is very simple/
Any suggestions? I have an Intel Mac.
Thank you!
-Ashley
// Füge OrderRow hinzu
struct OrderRow: View {
let order: Order
var body: some View {
VStack(alignment: .leading, spacing: 8) {
HStack {
Text("Tisch \(order.tableNumber)")
.font(.headline)
Spacer()
Text(order.status.rawValue)
.font(.caption)
.padding(.horizontal, 8)
.padding(.vertical, 4)
.background(order.status.color.opacity(0.2))
.foregroundColor(order.status.color)
.cornerRadius(8)
}
Text(order.timestamp, style: .time)
.font(.caption)
.foregroundColor(.gray)
ForEach(order.items) { item in
Text("\(item.quantity)x \(item.item.name)")
.font(.subheadline)
}
HStack {
Spacer()
Text(String(format: "%.2f €", order.totalAmount))
.bold()
}
}
.padding()
.background(Color.white)
.cornerRadius(12)
.shadow(radius: 2)
}
}
struct MenuItemRow: View {
let item: MenuItem
var body: some View {
HStack {
Text(item.name)
.font(.headline)
Spacer()
Text(String(format: "%.2f €", item.price))
.font(.subheadline)
}
.padding()
}
}
struct MenuItemsView: View {
@Binding var selectedItems: [OrderItem]
@Environment(.dismiss) private var dismiss
func filteredItems(for category: MenuCategory) -> [MenuItem] {
return sampleMenuItems.filter { $0.category == category }
}
func addItemToOrder(_ item: MenuItem) {
if let index = selectedItems.firstIndex(where: { $0.item.id == item.id }) {
selectedItems[index].quantity += 1
} else {
selectedItems.append(OrderItem(item: item, quantity: 1))
}
}
var body: some View {
NavigationView {
List {
ForEach(MenuCategory) { category in
Section(header: Text(category.rawValue)) {
let filteredItems = sampleMenuItems.filter
ForEach(filteredItems) { item in
}
MenuItemRow(item: sampleMenuItems.filter) {
addItemToOrder
}
}
}
}
}
.navigationTitle("Menü")
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
Button("Fertig") {
dismiss()
}
}
}
}
}
}
// Sample Menü-Items
let sampleMenuItems: [MenuItem] = [
MenuItem(name: "Cola", description: "0,33l", price: 3.50, category: .drinks, image: "cola"),
MenuItem(name: "Sprite", description: "0,33l", price: 3.50, category: .drinks, image: "sprite"),
MenuItem(name: "Bier", description: "0,5l", price: 4.00, category: .drinks, image: "beer"),
MenuItem(name: "Nachos", description: "mit Käsesauce", price: 5.50, category: .snacks, image: "nachos"),
MenuItem(name: "Pommes", description: "mit Ketchup", price: 4.50, category: .food, image: "fries"),
MenuItem(name: "********", description: "alkoholfrei", price: 6.50, category: .specials, image: "********")
]
struct NewEventView: View {
var body: some View {
Text("New Event")
}
}
struct EventManagementView: View {
var body: some View {
Text("Event Management")
}
}
struct OrderRow: View {
var order: String
var body: some View {
Text("Order: (order)")
}
}
#Preview {
ContentView()
}
Stickerpack runs and builds successfully on iPhone 16 simulator, but on a real iPhone (14 connected trough a cable and with developer options enabled) it builds successfully, but when opening the pack in iMessage, there is nothing shown in the sticker browser and Xcode shows the following error:
Could not attach to pid : “662”
“com.[name].[name].StickerPackExtension” failed to launch or exited before the debugger could attach to it. Please verify that “com.[name].[name].StickerPackExtension” has a valid code signature that permits it to be launched on “iPhone([name])”. Refer to crash logs and system logs to for more diagnostic information.
MORE DETAILS:
Could not attach to pid : “662”
Domain: IDEDebugSessionErrorDomain
Code: 7
Failure Reason: “com.[name].[name].StickerPackExtension” failed to launch or exited before the debugger could attach to it. Please verify that “com.heart.owmStickers.StickerPackExtension” has a valid code signature that permits it to be launched on “iPhone([]name)”. Refer to crash logs and system logs to for more diagnostic information.
User Info: {
DVTErrorCreationDateKey = "2024-11-24 08:42:49 +0000";
DVTRadarComponentKey = 855031;
IDERunOperationFailingWorker = DBGLLDBLauncher;
RawUnderlyingErrorMessage = "no such process.";
}
--
Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
"device_identifier" = "00008110-0011514A227A401E";
"device_isCoreDevice" = 1;
"device_model" = "iPhone14,7";
"device_osBuild" = "18.1 (22B83)";
"device_platform" = "com.apple.platform.iphoneos";
"device_thinningType" = "iPhone14,7";
"dvt_coredevice_version" = "397.24";
"dvt_coresimulator_version" = "987.2";
"dvt_mobiledevice_version" = "1759.60.6";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 336;
"operation_errorCode" = 7;
"operation_errorDomain" = IDEDebugSessionErrorDomain;
"operation_errorWorker" = DBGLLDBLauncher;
"operation_name" = IDERunOperationWorkerGroup;
"param_debugger_attachToExtensions" = 0;
"param_debugger_attachToXPC" = 1;
"param_debugger_type" = 3;
"param_destination_isProxy" = 0;
"param_destination_platform" = "com.apple.platform.iphoneos";
"param_diag_113575882_enable" = 0;
"param_diag_MainThreadChecker_stopOnIssue" = 0;
"param_diag_MallocStackLogging_enableDuringAttach" = 0;
"param_diag_MallocStackLogging_enableForXPC" = 0;
"param_diag_allowLocationSimulation" = 0;
"param_diag_checker_tpc_enable" = 0;
"param_diag_gpu_frameCapture_enable" = 0;
"param_diag_gpu_shaderValidation_enable" = 0;
"param_diag_gpu_validation_enable" = 1;
"param_diag_guardMalloc_enable" = 0;
"param_diag_memoryGraphOnResourceException" = 0;
"param_diag_mtc_enable" = 0;
"param_diag_queueDebugging_enable" = 1;
"param_diag_runtimeProfile_generate" = 0;
"param_diag_sanitizer_asan_enable" = 0;
"param_diag_sanitizer_tsan_enable" = 0;
"param_diag_sanitizer_tsan_stopOnIssue" = 0;
"param_diag_sanitizer_ubsan_enable" = 0;
"param_diag_sanitizer_ubsan_stopOnIssue" = 0;
"param_diag_showNonLocalizedStrings" = 0;
"param_diag_viewDebugging_enabled" = 1;
"param_diag_viewDebugging_insertDylibOnLaunch" = 1;
"param_install_style" = 2;
"param_launcher_UID" = 2;
"param_launcher_allowDeviceSensorReplayData" = 0;
"param_launcher_kind" = 0;
"param_launcher_style" = 99;
"param_launcher_substyle" = 0;
"param_runnable_appExtensionHostRunMode" = 0;
"param_runnable_productType" = "com.apple.product-type.app-extension.messages-sticker-pack";
"param_structuredConsoleMode" = 0;
"param_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphoneos18.1";
"sdk_osVersion" = "18.1";
"sdk_variant" = iphoneos;
}
--
System Information
macOS Version 15.2 (Build 24C5073e)
Xcode 16.1 (23503) (Build 16B40)
Timestamp: 2024-11-24T11:42:49+03:00
Views can be viewed on the canvas in XCode via the code below.
#Preview {
ContentView()
}
But how do I preview an App class in XCode?
Background: I'd like to preview various settings done in the Scene of the App.
Dear Support Team,
I constantly get a 401 unauthorised error, when I try to add my Developer account in Xcode while running a virutalised macOS using https://developer.apple.com/documentation/virtualization. So I can't use signing, entitlements, etc when building within a virutalised macOS.
The error shown is below:
There was a failure decoding response: (HTTP 401, 60 bytes) The data couldn’t be read because it isn’t in the correct format.
I've found probably the same issue here https://developer.apple.com/forums/thread/759877 Unfortunately, I can't find any updates.
Are you aware of this problem? Are there any planned fixes in upcoming macOS updates?
15.0 (24A335)
Version 16.1 (16B40)
Apple M1 Pro, 16 GB Ram
Best regards, Evgenii