I am using NSPersistentCloudKitContainer and I decided to add a property to an entity. I accidentally ran try! container.initializeCloudKitSchema(options: []) while using the production container in Xcode (com.apple.developer.icloud-container-environment) which throw a couple of errors and created some FAKE_ records in my production container.
So I changed to my development container and ran the try! container.initializeCloudKitSchema(options: []) and now it succeeded.
After that I cleaned up the FAKE_ records scattered in production container but in Xcode when I'm running I now get these logs in the console (and I can't seem to get rid of them):
error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _importFinishedWithResult:importer:](1398): <PFCloudKitImporter: 0x300cc72c0>: Import failed with error:
Error Domain=NSCocoaErrorDomain Code=4864 "*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: incomprehensible archive (0x53, 0x6f, 0x6d, 0x65, 0x20, 0x73, 0x61, 0x6d)" UserInfo={NSDebugDescription=*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: incomprehensible archive (0x53, 0x6f, 0x6d, 0x65, 0x20, 0x73, 0x61, 0x6d)}
error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate recoverFromError:](2310): <NSCloudKitMirroringDelegate: 0x302695770> - Attempting recovery from error: Error Domain=NSCocoaErrorDomain Code=4864 "*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: incomprehensible archive (0x53, 0x6f, 0x6d, 0x65, 0x20, 0x73, 0x61, 0x6d)" UserInfo={NSDebugDescription=*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: incomprehensible archive (0x53, 0x6f, 0x6d, 0x65, 0x20, 0x73, 0x61, 0x6d)}
error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _recoverFromError:withZoneIDs:forStore:inMonitor:](2620): <NSCloudKitMirroringDelegate: 0x302695770> - Failed to recover from error: NSCocoaErrorDomain:4864
Recovery encountered the following error: (null):0
error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate resetAfterError:andKeepContainer:](610): <NSCloudKitMirroringDelegate: 0x302695770> - resetting internal state after error: Error Domain=NSCocoaErrorDomain Code=4864 "*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: incomprehensible archive (0x53, 0x6f, 0x6d, 0x65, 0x20, 0x73, 0x61, 0x6d)" UserInfo={NSDebugDescription=*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: incomprehensible archive (0x53, 0x6f, 0x6d, 0x65, 0x20, 0x73, 0x61, 0x6d)}
error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _requestAbortedNotInitialized:](2198): <NSCloudKitMirroringDelegate: 0x302695770> - Never successfully initialized and cannot execute request '<NSCloudKitMirroringExportRequest: 0x303a52d00> 548CB420-E378-42E5-9607-D23E7A2A364D' due to error: Error Domain=NSCocoaErrorDomain Code=4864 "*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: incomprehensible archive (0x53, 0x6f, 0x6d, 0x65, 0x20, 0x73, 0x61, 0x6d)" UserInfo={NSDebugDescription=*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: incomprehensible archive (0x53, 0x6f, 0x6d, 0x65, 0x20, 0x73, 0x61, 0x6d)}
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Posts under Xcode tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Like I said in the title, it looks like MetalTools.framework is missing or corrupted. I think I saw that the symbolic link was broken. They look like aliases in the finder, but I can't find the original.
This was a problem with Ventura (using the last compatible Xcode version) and Sequoia 15.2 (Xcode 16.2). I didn't use Xcode before that. Note that none of my apps need Metal API (I don't think). I only noticed it when Xcode gave an error regarding Metal.
Sorry this is so long; I hope the Terminal info will help.
I don't want to reinstall Sequoia and this has been a problem since at least Ventura.
Recommendations?
ls -l /System/Library/PrivateFrameworks/MetalTools.framework/
total 0
lrwxr-xr-x 1 root wheel 27 Dec 7 01:11 MetalTools -> Versions/Current/MetalTools
lrwxr-xr-x 1 root wheel 26 Dec 7 01:11 Resources -> Versions/Current/Resources
drwxr-xr-x 4 root wheel 128 Dec 7 01:11 Versions
ls -la /System/Library/PrivateFrameworks/MetalTools.framework/
total 0
drwxr-xr-x 5 root wheel 160 Dec 7 01:11 .
drwxr-xr-x 1885 root wheel 60320 Dec 7 01:11 ..
lrwxr-xr-x 1 root wheel 27 Dec 7 01:11 MetalTools -> Versions/Current/MetalTools
lrwxr-xr-x 1 root wheel 26 Dec 7 01:11 Resources -> Versions/Current/Resources
drwxr-xr-x 4 root wheel 128 Dec 7 01:11 Versions
codesign -v /System/Library/PrivateFrameworks/MetalTools.framework/MetalTools
/System/Library/PrivateFrameworks/MetalTools.framework/MetalTools: No such file or directory
ls -la /System/Library/PrivateFrameworks/MetalTools.framework/Versions/
total 0
drwxr-xr-x 4 root wheel 128 Dec 7 01:11 .
drwxr-xr-x 5 root wheel 160 Dec 7 01:11 ..
drwxr-xr-x 4 root wheel 128 Dec 7 01:11 A
lrwxr-xr-x 1 root wheel 1 Dec 7 01:11 Current -> A
ls -la /System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/
total 0
drwxr-xr-x 4 root wheel 128 Dec 7 01:11 .
drwxr-xr-x 4 root wheel 128 Dec 7 01:11 ..
drwxr-xr-x 10 root wheel 320 Dec 7 01:11 Resources
drwxr-xr-x 3 root wheel 96 Dec 7 01:11 _CodeSignature
Note - -rwxr-xr-x 1 root wheel MetalTools should be in the above list (according to ChatGPT)
system_profiler SPDisplaysDataType
Intel UHD Graphics 630 and AMD Radeon Pro 5500M (includes:
Metal Support: Metal 3
Playground code => "Metal is supported." Default device: Apple iOS simulator GPU.
Thanks, Ashley
Hi,
After updating to Xcode 16.2, I am getting an error running all iOS apps. I'm using Sequioa 15.2.
Error creating the CFMessagePort needed to communicate with PPT.
I ran the default Hello World app and got the same error message (plus another error not showing up on my apps - Failed to send CA Event for app launch measurements for ca_event_type: 1 event_name: com.apple.app_launch_measurement.ExtendedLaunchMetrics).
Can I ignore the error or is it truly affecting my app (all are testflight versions and it's fine if I don't update them for awhile, although not ideal).
Hopefully someone can help!
Thanks,
-Ashley
This wasn't happening until I updated Xcode to 16.2 (I'm using Sequoia 15.2). When I run any Mac app, I get these errors:
Can't find or decode reasons
Failed to get or decode unavailable reasons
Can't find or decode disabled use cases
I even got these errors running "Hello, world" which tells me that either I need to reinstall or there is a bug.
Thanks for any help,
-Ashley
I update my Xcode to latest 16.2. However I am unable to run the unit tests which were working fine when I used Xcode 15. Also I am using a CI/CD tools which has Xcode 15.3 and also using iOS 17.5 device to run unit tests and those are also working fine.
I am getting following 3 different types of errors when I try running tests.
Command SwiftCompile failed with a nonzero exit code
Command SwiftEmitModule failed with a nonzero exit code
PhaseScriptExecution failed with a nonzero exit code
Any help how I can fix this?
hello, when i try to archive my unity game through xcode to publish it on app store connect i get these 4 undefined symbol errors: undefined symbol:_initializeclass, undefined symbol: _initializeunityobject, undefined symbol: _onrequestasync, undefined symbol: _onrequestsync.
is there anyway to get rid of this error ? the only solution i found was enabling module verifier in build settings but when i do that i get this error:error: Sandbox: mkdir(24068) deny(1) file-write-create , i get rid of this by choosing no to user script sandboxing in builds settings, but when i do that i get these errors: double-quoted include "LifeCycleListener.h" in framework header, expected angle-bracketed instead, "RedefinePlatforms.h can only be used after UndefinePlatforms.h got included before.", double-quoted include "RenderPluginDelegate.h" in framework header, expected angle-bracketed instead, umbrella header for module 'UnityFramework' does not include header 'RedefinePlatforms.h', umbrella header for module 'UnityFramework' does not include header 'RedefinePlatforms.h', fatal) could not build module 'Test'.
what should i do ?
Mac App getting error - Could not launch “App Name” with Xcode 16.2 and Mac sequoia
Error -
Could not launch “App Name”
Domain: IDELaunchErrorDomain
Code: 20
Recovery Suggestion: LaunchServices has returned error -54. Please check the system logs for the underlying cause of the error.
User Info: {
DVTErrorCreationDateKey = "2024-12-27 12:16:34 +0000";
DVTRadarComponentKey = 113722;
IDERunOperationFailingWorker = IDELaunchServicesLauncher;
}
The operation couldn’t be completed. (OSStatus error -54.)
Domain: NSOSStatusErrorDomain
Code: -54
User Info: {
"_LSFunction" = "_LSOpenStuffCallLocal";
"_LSLine" = 4224;
}
Could not launch “App Name”
Domain: IDELaunchErrorDomain
Code: 20
Recovery Suggestion: LaunchServices has returned error -54. Please check the system logs for the underlying cause of the error.
User Info: {
DVTErrorCreationDateKey = "2024-12-27 12:16:34 +0000";
DVTRadarComponentKey = 113722;
IDERunOperationFailingWorker = IDELaunchServicesLauncher;
}
The operation couldn’t be completed. (OSStatus error -54.)
Domain: NSOSStatusErrorDomain
Code: -54
User Info: {
"_LSFunction" = "_LSOpenStuffCallLocal";
"_LSLine" = 4224;
}
I am trying to name my app "Tata Daewoo Mobility Service" but in app showing without space like 'TataDaewooMobilityService. In korean language not showing the space.
How to add the name in korean language with space in iPhone.
Hi, I'm setting up Xcode and after updating MacOS to 15.2 and Xcode to 16.2, I cannot download the Predictive Code Completion Model. I've done some research and I haven't found any solution, specially since most people suggest that it randomly fixed itself, which for me hasn't been the case. I've tried restarting my Mac, uninstalling and reinstalling Xcode multiple times, I've also reinstalled MacOS from Recovery and haven't found any success (I'm also not running Xcode inside a VM, as I've seen this can cause some problems in this case).
This is the error that I receive when I attempt to download the model:
And here are the details:
The operation couldn’t be completed. (IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $11eba9a90).DownloadError error 3.)
Domain: IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $11eba9a90).DownloadError
Code: 3
User Info: {
DVTErrorCreationDateKey = "2024-12-26 23:09:25 +0000";
}
--
There was an error processing the asset.
Domain: IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $11eba9a90).DownloadError
Code: 3
--
System Information
macOS Version 15.2 (Build 24C101)
Xcode 16.2 (23507) (Build 16C5032a)
Timestamp: 2024-12-26T17:09:25-06:00
For the record, I'm a new developer and I'm still learning, so thank you very much!
I'm new to Xcode and decided to give it a try, however, I'm unable to preview even the default "hello, world" message.
I've tried downloading Xcode on the App Store on Mac and from the official website, but I couldn't go pass the "Preparing (Automatic) iPhone Simulator."
I've also tried the following line of code on Terminal, but nada:
xcrun simctl erase all
Here's what I see for almost two hours now (it makes no sense):
My system specs:
iMac Retina 4K, 21.5-inch, 2019, 3 GHz Intel Core i5 6-Core, Radeon Pro 560X 4 GB, 8 GB 2667 MHz DDR4 (two 4gb core each), 1TB SSD.
I've coded way bigger web projects using various applications, but Xcode can't even preview the sample file?
Please, help. I would really like to code using Swift. :)
在使用 Xcode 构建项目时,我遇到了以下错误:
Showing All Errors Only
Prepare packages
Prepare build
Build service could not create build operation: unable to load transferred PIF: The workspace contains multiple references with the same GUID 'PACKAGE:1Y9CU7L2QFO7OX4UJBYP19ZPPL5MJNV3R::MAINGROUP'
Activity Log Complete 2024/12/24, 15:26 0.2 seconds
问题描述:
1. 我正在开发一个使用 Swift Package Manager (SPM) 管理依赖的多模块 iOS 项目。
2. 构建过程中,Xcode 无法加载传输的 PIF 文件,并提示某个 GUID 存在重复引用。
3. 这个问题导致整个项目无法正常构建。
已尝试的解决方案:
1. 检查了 Swift Package Manager 的依赖管理:
• 确认没有重复添加相同的依赖。
2. 清理了 Derived Data:
3. 检查了 project.pbxproj 文件,搜索 GUID 'PACKAGE:1Y9CU7L2QFO7OX4UJBYP19ZPPL5MJNV3R::MAINGROUP':
• 没有发现明显的重复引用。
4. 删除并重新添加了所有的 Swift 包依赖。
5. 删除并重新生成了 .xcworkspace 文件。
结果:
• 尝试以上解决方案后问题依然存在,构建仍然失败。
• 这可能是由于某些依赖的重复引用或 Xcode 内部的问题。
Xcode 16.2
Mac OS 15.2
如果有人遇到过类似问题或者知道该如何解决,能否分享一下解决方案?
非常感谢!
Hello,
I have a problem with Xcode, in C++ language. When I create a new project, I put my program in a file and click Build. It works correctly and without any problems, but when I enter a second file in the same project and click build, it says build failed. In the log it says, duplicate symbols appear.
Can someone from Apple officially confirm either a delay or cancellation of this feature? 9 days before 2024 ends and Apple said “later this year” in June 2024. Apple mentioned Swift Assist even in the MacBook Pro announcement on the 30th of October 2024 as if it already exists.
Why is Apple not releasing Swift Assist?
The following error occurred when I uploaded the application for distribution in the test flight.
After rebuilding, the problem resolved. What was the cause?
I recently upgraded the Xcode version from 15.2 to 16.0, and this was my first build, so is it an environmental factor?
ITMS-90433: Invalid Swift Support - The file libswifCore.dylib doesn’t have the correct code signature. Make sure you’re using the correct signature, rebuild your app using the current public (GM) version of Xcode, and resubmit it. Don’t just modify the code signature of libswiftCore.dylib.
I’m trying to use the Vision framework in a Swift Playground to perform face detection on an image. The following code works perfectly when I run it in a regular Xcode project, but in an App Playground, I get the error:
Thread 12: EXC_BREAKPOINT (code=1, subcode=0x10321c2a8)
Here's the code:
import SwiftUI
import Vision
struct ContentView: View {
var body: some View {
VStack {
Text("Face Detection")
.font(.largeTitle)
.padding()
Image("me")
.resizable()
.aspectRatio(contentMode: .fit)
.onAppear {
detectFace()
}
}
}
func detectFace() {
guard let cgImage = UIImage(named: "me")?.cgImage else { return }
let request = VNDetectFaceRectanglesRequest { request, error in
if let results = request.results as? [VNFaceObservation] {
print("Detected \(results.count) face(s).")
for face in results {
print("Bounding Box: \(face.boundingBox)")
}
} else {
print("No faces detected.")
}
}
let handler = VNImageRequestHandler(cgImage: cgImage, options: [:])
do {
try handler.perform([request]) // This line causes the error.
} catch {
print("Failed to perform Vision request: \(error)")
}
}
}
The error occurs on this line:
try handler.perform([request])
Details:
This code runs fine in a normal Xcode project (.xcodeproj).
I'm using an App Playground instead (.swiftpm).
The image is being included in the .xcassets folder.
Is there any way I can mitigate this issue? Please do not recommend switching to .xcodeproj, as I am making a submission for Apple's Swift Student Challenge, and they require that I use .swiftpm.
In the Xcode 16.2 release notes, it says to avoid a memory leak in Swift 6 you should "Pass -checked-async-objc-bridging=off to the Swift compiler using “Other Swift Flags” in Xcode build settings." https://developer.apple.com/documentation/xcode-release-notes/xcode-16_2-release-notes#Swift
However, when I add this value to OTHER_SWIFT_FLAGS (either in the Xcode build settings interface, or in an .xcconfig file), it yields a build error:
error: Driver threw unknown argument: '-checked-async-objc-bridging' without emitting errors.
Does anybody know if there's a trick to get this working that isn't explained in the release notes?
Hello!
I am attempting to add Subscriptions to an App that Is already published on the App Store.
I cannot get Xcode to actually sync what is in my App Store Connect.
When adding the Storekit configuration file, I go through the automatic linking process and select the proper bundleID. The configuration file says 'Synced @ [CurrentTime]' however there are no subscriptions listed in there.
I have attempted deleting the file several times, creating a new subscription group. With no success.
Do I need to publish the subscriptions without the features first? Upon attempting to write the supporting code that will enable these features within the app, I cannot get Xcode to identify that I have these subscriptions.
I have also tried pushing these to TestFlight, still with no success.
Thank you.
I would like a shortcut for deleting view in swiftui
VStack {
// long code
}
How to delete VStack with its ending curly bracket?
Thanks