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?
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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 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.
i bought new laptop and run project using Xcode version 16.1, and its show erros like this:
already trying this link https://stackoverflow.com/questions/52387452/command-compileswift-failed-with-a-nonzero-exit-code-in-xcode-10 but didnt works for me,
could you guys help me?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Dialog: "Would you to save this password in your Keychain to use with apps and websites"
Xcode 15.4
Simulator iOS 16.4
Rosetta
Macbook M2 pro
=> dialog save password showing and work normal.
When updating to xcode 16, it is not showing and makes the app unable to do anything else.
xCode 16.0
Simulator iOS 18.0
Rosetta
Macbook M2 pro
=> dialog save password not showing
However, if you use Non-rosetta, the dialog will not show but you can still operate the app.
I'm implementing a timer feature and facing the issue that the live activity I'm starting just continues showing after the timer is complete.
The body of the live activity widget is more or less:
ActivityConfiguration(for: WhendyWidgetAttributes.self) { context in
VStack {
Text(
context.state.timerEndDate,
style: .timer
)
// if Date.now < timerEndTime { Text("Done") }
self.expandedView(state: context.state)
}
} …
Ideally I could get the activity to show something else when it is done but I don't know how to get it to re-evaluate it's body once the end time is reached.
I create the activity with
let activity = try ActivityKit.Activity.request(
attributes: attributes,
content: .init(
state: .init(timerEndDate: timerEndDate),
staleDate: timerEndDate
),
pushType: nil
)
Can I schedule the activity to do a refresh it's body (and reevaluating Date.now) once the timerEndDate is reached?
Considered Approaches
trying staleDate
However, the activity never shows that it has become stale. Would it be expected that it shows the stale-ness?
scheduling dismissal
I also thought about starting and immediately stopping the activity with a delayed dismissal, but unfortunately it seems this is limited to a 4 hour window, and I'd like longer timers too.
remote updates
I understand I could use remote notifications to update the live activity, but I'd really like to keep things local as all the functionality is locally plannable.
Background Tasks
I understand these don't run reliably or at a predictable time.
A Timer in the app that updates the content
I think this would only update the activity while the app is in foreground.
Hi,
I work on a iOS application which includes several local swift packages containing modularised code. Each of those local swift packages has a test target defined in their respective Package.swift, and when opening a local package folder standalone in Xcode, then the tests run without issues.
However I would like in the main app's test plan to add the local package test targets and have them all run together when the main app's default test plan is run. Xcode allows me to select local package test targets within the main app's test plan (also within Test portion of the main app's scheme), however attempting to build for testing throws a "Module '…' was not compiled for testing".
Any ideas on how to achieve this goal (run local package tests in conjunction with main app's tests) and avoid that error?
Thanks
Peter
Hello,
I found in IOS18 preset iphone 16PM simulator, when I set as not connect to hardware keyboard, after the simulator restart, the visual keyboard no longer shows. The input from Mac keyboard also not work. I must open hardware keyboard connection and disable it again to show the keyboard.
This is not happen on IOS17 iphone15PM simulator. Is anyone know why or how to set it as always show the visual keyboard?
Thanks
Xcode crash report
I have latest version Xcode-15.1 & Mac-os version Sonoma-14.3.1 - while running particularly UITest target Xcode not launching the simulator, even after build succeed & test's completed without any errors.
I tried cleaning project, re-starting Xcode, restarting system(Mac) - no luck
It would be helpful if I get any suggestion on resolving the issue.
I have various main Xcode projects referencing the same Xcode sub projects. However Xcode only allows to open one of the main projects with the shared sub project available for accessing its files and building.
How can I create main projects that are able to open shared sub project at the same time?
Topic:
Developer Tools & Services
SubTopic:
Xcode
I'm debugging a change to my share sheet extension, which I published to the App Store several months ago. But I can't run it on my iPhone, attached to my MacBook. I know that I did this when I originally published it but some time has passed.
The error that I get is "Failed to install the app on the device.
Domain: com.apple.dt.CoreDeviceError
Code: 3002
Failure Reason: The provided item to be installed is not of a type that CoreDevice recognizes."
Does anyone know what would cause that?
tia
Topic:
Developer Tools & Services
SubTopic:
Xcode
I have been doing app dev for my AVP for a few months now. It was working fine last time I connected it. I believe at the time I was using Xcode 15.4 and OS 2.0.
I just went to update my app and in the Xcode device manager I get this message:
"Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac."
I am now using Xcode 16.1 and VisionOS 2.1.1.
Nothing else has changed. I am on the same wifi network and both devices have IP addresses, masks and default gateways that match.
I have tried rebooting both the AVP and my MacBook pro.
I do not have the $300 cable, so I have to do this over the network.
What do I do?
Hi everyone,
I'm encountering an issue while working with my iPhone running iOS 18.1.1 and Xcode 16.1.
I need to run tests on my physical device using idb (Facebook's iOS Device Bridge). However, I'm unable to proceed because the required Developer Disk Image (DDI) for iOS 18.1 is not present in Xcode's DeviceSupport directory. Here's what I've tried so far:
Verified that I have the latest version of Xcode (16.1) installed:
xcodebuild -version outputs:
Xcode 16.1
Build version 16B40
Checked the contents of /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport, and the highest iOS version available is 16.4. There is no folder for 18.1.
Tried using idb to interact with my device, but it fails with the error:
The best match /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/16.1/DeveloperDiskImage.dmg: 16.1 is not suitable for 18.1
I understand that the DDI for each iOS version is critical for debugging and testing on physical devices. I've explored potential workarounds, including downloading the iOS 18.1 restore image, but I haven't been able to resolve the issue.
Questions:
Does Xcode 16.1 officially support the iOS 18.1 Developer Disk Image?
If not, is there an official way to download and add the missing DDI to DeviceSupport?
Could creating a sample app in Xcode targeting iOS 18.1 trigger the download of the required DDI?
I'd appreciate any advice or guidance from the community or Apple team. If there's a known resolution or an official source for missing DDIs, please let me know.
Thank you in advance for your help!
Hello, I wanted to sync my Swift Data App with iCloud. I provided default values to all my models, made very relationship between my models optional. Then, at Signing and Capabilities, I finally added Background Modes (and checked Remote notifications) and iCloud (and checked CloudKit and added a container with my bundle id). Now I receive these errors every time I run my app on a device that is connect to iCloud
CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _recoverFromError:withZoneIDs:forStore:inMonitor:](2620): <NSCloudKitMirroringDelegate: 0x302de80f0> - Failed to recover from error: CKErrorDomain:15
Recovery encountered the following error: (null):0
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _finishedRequest:withResult:](3582): Finished request: <NSCloudKitMirroringDelegateSetupRequest: 0x3031d4460> 53CB1DFC-E589-4945-8AF1-36126756110B with result: <NSCloudKitMirroringResult: 0x301c79320> storeIdentifier: 41F2B808-5C97-44B3-BC28-5534FEBCCF2C success: 0 madeChanges: 0 error: <CKError 0x301c98870: "Partial Failure" (2/1011); "Failed to modify some record zones"; uuid = 044262C6-5136-4989-823C-B0430F7B87DC; container ID = "iCloud.lu.yansoisson.blip-notes"; partial errors: {
com.apple.coredata.cloudkit.zone:__defaultOwner__ = <CKError 0x301c7a9a0: "Server Rejected Request" (15/2000); op = 15C2EFE32CB459E1; uuid = 044262C6-5136-4989-823C-B0430F7B87DC>
}>
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest](3551): <NSCloudKitMirroringDelegate: 0x302de80f0>: Checking for pending requests.
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest]_block_invoke(3567): <NSCloudKitMirroringDelegate: 0x302de80f0>: No more requests to execute.
CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate recoverFromError:](2310): <NSCloudKitMirroringDelegate: 0x302de80f0> - Attempting recovery from error: <CKError 0x301c98870: "Partial Failure" (2/1011); "Failed to modify some record zones"; uuid = 044262C6-5136-4989-823C-B0430F7B87DC; container ID = "iCloud.lu.yansoisson.blip-notes"; partial errors: {
com.apple.coredata.cloudkit.zone:__defaultOwner__ = <CKError 0x301c7a9a0: "Server Rejected Request" (15/2000); op = 15C2EFE32CB459E1; uuid = 044262C6-5136-4989-823C-B0430F7B87DC>
}>
Here's the debug message that appears first when I start the app
CoreData: debug: CoreData+CloudKit: -[PFCloudKitOptionsValidator validateOptions:andStoreOptions:error:](36): Validating options: <NSCloudKitMirroringDelegateOptions: 0x3023ec6e0> containerIdentifier:iCloud.lu.yansoisson.blip-notes databaseScope:Private ckAssetThresholdBytes:<null> operationMemoryThresholdBytes:<null> useEncryptedStorage:NO useDeviceToDeviceEncryption:NO automaticallyDownloadFileBackedFutures:NO automaticallyScheduleImportAndExportOperations:YES skipCloudKitSetup:NO preserveLegacyRecordMetadataBehavior:NO useDaemon:YES apsConnectionMachServiceName:<null> containerProvider:<PFCloudKitContainerProvider: 0x3010e62d0> storeMonitorProvider:<PFCloudKitStoreMonitorProvider: 0x3010e62e0> metricsClient:<PFCloudKitMetricsClient: 0x3010e62f0> metadataPurger:<PFCloudKitMetadataPurger: 0x3010e6300> scheduler:<null> notificationListener:<null> containerOptions:<null> defaultOperationConfiguration:<null> progressProvider:<NSPersistentCloudKitContainer: 0x300785440> test_useLegacySavePolicy:YES archivingUtilities:<PFCloudKitArchivingUtilities: 0x3010e6310> bypassSchedulerActivityForInitialImport:NO bypassDasdRateLimiting:NO activityVouchers:(
)
storeOptions: {
NSInferMappingModelAutomaticallyOption = 1;
NSMigratePersistentStoresAutomaticallyOption = 1;
NSPersistentCloudKitContainerOptionsKey = "<NSPersistentCloudKitContainerOptions: 0x3036f0ea0>";
NSPersistentHistoryTrackingKey = 1;
NSPersistentStoreMirroringOptionsKey = {
NSPersistentStoreMirroringDelegateOptionKey = "<NSCloudKitMirroringDelegate: 0x302de80f0>";
};
NSPersistentStoreRemoteChangeNotificationOptionKey = 1;
}
CoreData: debug: CoreData+CloudKit: -[NSCloudKitMirroringDelegate observeChangesForStore:inPersistentStoreCoordinator:](427): <NSCloudKitMirroringDelegate: 0x302de80f0>: Observing store: <NSSQLCore: 0x10214ca00> (URL: file:///var/mobile/Containers/Data/Application/780A6276-3BE4-458E-BD2D-EC304B123111/Library/Application%20Support/default.store)
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _setUpCloudKitIntegration:](589): <NSCloudKitMirroringDelegate: 0x302de80f0>: Successfully enqueued setup request: <NSCloudKitMirroringDelegateSetupRequest: 0x3031d4460> 53CB1DFC-E589-4945-8AF1-36126756110B
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest](3551): <NSCloudKitMirroringDelegate: 0x302de80f0>: Checking for pending requests.
CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest]_block_invoke(3564): <NSCloudKitMirroringDelegate: 0x302de80f0>: Executing: <NSCloudKitMirroringDelegateSetupRequest: 0x3031d4460> 53CB1DFC-E589-4945-8AF1-36126756110B
CoreData: warning: CoreData+CloudKit: -[PFCloudKitSetupAssistant _checkAccountStatus:]_block_invoke(342): Fetched account info for store 41F2B808-5C97-44B3-BC28-5534FEBCCF2C: <CKAccountInfo: 0x3007bbb80; accountStatus=Available, accountPartition=Prod, deviceToDeviceEncryptionAvailability=(account|device), hasValidCredentials=true, walrus=Enabled, needsToVerifyTerms=false, accountAccessAuthorization=Yes, validationCounter=545>
(null)
CoreData: warning: CoreData+CloudKit: -[PFCloudKitSetupAssistant _checkUserIdentity:]_block_invoke(1446): Fetched user recordID for store 41F2B808-5C97-44B3-BC28-5534FEBCCF2C: <CKRecordID: 0x3012ddbc0; recordName=_e002d189d325132b7dae12ad045e5d76, zoneID=_defaultZone:__defaultOwner__>
(null)
Does anyone know how to solve this issue since I have done everything exactly like mentioned in multiple tutorials and blogs?
Thanks
Sorry if this question is too vague, however I've tried this multiple times and see the same result. I'm pretty sure I'm doing something wrong, but don't know what.
I have a Multiplatform (iOS and macOS) project that builds, and runs
I add a new target of type Unit Test Bundle
I click the diamond in the margin beside the XCTestCase declaration at the top of the new Test file
The target project builds, then Xcode says 'Testing...' and it stays like this forever.
I've also tried creating a new scheme that targets the target created in the above steps. attempting to run my tests behaves the same. The top status bar will get stuck saying 'Testing...' and never get anywhere.
I'm pretty sure this is something basic.
thanks, in advance for any guidance.
Mike
Is it possible to merge or split a string catalog? It doesn't seem possible now.
The workaround i use now is eidting the xcstrings file in TextEdit.
Hey all -
Been building my app and all has been going well with successful builds through to test flight.
However, I have just added CKSharing support into the app and therefore into the entitlements to allow collaboration within the app.
As soon as I have added this, I can no longer build due to a signing certificate error stating my provisioning profile just not allow for CKSharing...
"Provisioning profile "iOS Team Provisioning Profile: com.MyApp" doesn't include the com.apple.developer.cksharing entitlement."
However, iCloud is enabled within my app profile, and all other cloudkit features have worked up until adding that specific entitlement.
Any help or guidance to get passed this would be greatly appreciated.
Below copied from my original post here: https://forums.swift.org/t/xcode-16-2-beta-seems-increase-the-min-deploy-to-16-0-for-swift-cpp-mixed-project/76221
Our games are set to min deploy of iOS 12.0.
When building with the Xcode 16.2 beta3, the Xcode 16.1 build-able project will have errors for those static libs that has swift mixed with C++:
Compiling for iOS 12.0, but module 'Cxx' has a minimum deployment target of iOS 16.0: /Users/trout.zhang/Documents/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Cxx.swiftmodule/arm64-apple-ios.swiftmodule
Change that static lib min deploy to 16.0 can make the build succeed, while maintain the exe target still use iOS 12.0.
I am not familiar with how the min deploy works, is it:
choosing the highest of exe and its dependencies, thus effectively set the final product has min deploy of iOS 16.0
or maintaining exe's iOS 12.0 and actually crash in runtime if the iOS is less than 16.0, when reach the code in that static lib.
Apparently, non of the above is what we want.
Use cat in cmdline, for
Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/Cxx.swiftmodule/arm64-apple-ios.swiftdoc
with both Xcode.app(16.1) and Xcode-beta.app(16.2 beta3), I found the different lines:
Xcode 16.1 has:
Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)Cxx?arm64-apple-ios11.0
Xcode 16.2 beta 3 has:
Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.8 clang-1600.0.30.1)Cxx?arm64-apple-ios16.0
My preview crashed because it could not access my font resources. I am working on a Framework, and it seems that for frameworks, the resources are not copied into the app package of the preview.
Investigation:
I verified this by examining the contents of the preview: /Users/YOUR_NAME/Library/Developer/Xcode/UserData/Previews/Simulator Devices/DEVICE_UUID/data/Containers/Bundle/Application/APPLICATION_UUID/APPLICATION_NAME.app
Make sure to replace "YOUR_NAME," "DEVICE_UUID," "APPLICATION_UUID," and "APPLICATION_NAME" with the actual names or UUIDs relevant to your specific situation.
Now right-click on the app and select Show Package Contents.
For previews that work correctly, the name of the associated app is used, and you will see all the resources in the package.
However, my framework was not using the framework name. Instead, it was named XCPreviewAgent.app and did not contain any resources from my framework.
Fix:
As of November 2024 (Xcode 16.0 and Xcode 16.1), the fix is to use Legacy Preview Execution.
In the menu, select Editor > Canvas > Legacy Preview Execution.
Please leave a comment if this is fixed in a newer Xcode version.