Hi,
I'm unable to install provisioning profile on my iPad and I know the xcode component iOS/iPadOs version and iPadOS version should be same or below the latest compared to xcode components.
Now the issue is xcode component version is iOS 18.4 (22E235) SDK + iOS 18.4 (22E238) Simulator (Installed) and iPadOS version is iOS 18.4.1(22E252) could this be cause of issue ?
If yes then when will apple release components for 18.4.1?
Because iOS 18.4.1 release at least 3-4 weeks before this post.
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 am getting this error in a couple of places in my code with Task closure after setting Swift 6 as Language version in XCode.
Passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure
Below is minimally reproducible sample code.
import Foundation
final class Recorder {
var writer = Writer()
func startRecording() {
Task {
await writer.startRecording()
print("started recording")
}
}
func stopRecording() {
Task {
await writer.stopRecording()
print("stopped recording")
}
}
}
actor Writer {
var isRecording = false
func startRecording() {
isRecording = true
}
func stopRecording() {
isRecording = false
}
}
While making the class Recorder as Actor would fix the problem, I fear I will have to make too many classes as Actors in the class and in my scenario, there could be performance implications where real time audio and video frames are being processed. Further, I don't see any race condition in the code above. Does the error talk about possible race conditions that could arise if I were to call other functions on the self in future, or the current code itself is not safe?
I recently encountered an issue involving Core Data’s new Composite Attributes feature and thought I would share my experience, as well as seek clarification.
I created a composite type where all attributes were mandatory, except for one. Subsequently, I added an attribute to an entity and set its type to that composite type. Upon running the app, the console output the following error:
CoreData: error: CoreData: error: Row (pk = 85) for entity ‘(EntityName)’ is missing mandatory text data for property ‘(propertyName)’
The way I resolved this was by removing the composite type attribute from the entity, after which the error no longer appeared. I also observed that in another entity, where a different composite type is used, all the attributes were optional — and no error occurred.
This raises the question: why must all attributes in a composite type be optional? Furthermore, why does Xcode not inform the developer of this requirement? I have reviewed both the documentation and the WWDC23 “What’s New in Core Data” session, but neither mentions that having non-optional attributes within a composite type will cause such errors and lead to unpredictable application behaviour.
Additionally, this issue remains unresolved in another area I raised previously in this topic:
Composite Attributes feature requires tvOS deployment target 17.0 or later
Composite Attributes feature requires watchOS deployment target 10.0 or later
However, I do not have a tvOS or watchOS target, nor do I intend to add one.
Could someone from Apple, or anyone with more experience, please clarify why all attributes within a composite type must be optional? And could it be possible for Xcode to flag this at compile time, rather than failing at runtime?
Thank you in advance.
Hi!
I have now spend a few days of trying to only get the option in Xcode to distribute to App Store. My app works on my own device, I have paid developer account and created a record for the app and its bundle id in App Store Connect. After archive the only options I can see is "Release testing, Enterprise, Debug and Custom". I have verified a lot of settings in both info.plist and build settings, without luck. I also see that the "Validate" button is greyed out, and the "SKIP_INSTALL" does not do the trick to enable it, and the archive is not a generic one, its explicit for watchOS. Using Xcode 16.2. Any suggestions of what to try before registering a support case.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Hi everyone,
I'm trying to add standard, non-unique database indexes to my Core Data entities for performance optimization (e.g., indexing Date or String attributes used in predicates and sort descriptors). I'm using Xcode 16.2 on macOS Sequoia 15.1.
My problem is that I cannot find the expected UI element in the Core Data model editor (.xcdatamodeld) to configure these database indexes.
What I Understand / Expect:
I know the old "Indexed" checkbox on the Attribute Inspector is deprecated/gone.
My understanding from recent documentation and tutorials is that database indexing (separate from Spotlight indexing) should be configured in the Entity Inspector (when the Entity itself is selected), within a section titled "Indexes" (usually located below "Constraints").
This "Indexes" section should allow adding individual or compound indexes that translate to SQL CREATE INDEX commands, distinct from uniqueness constraints.
What I'm Experiencing:
When I select an Entity in the model editor, the "Indexes" section is completely missing from the Data Model Inspector pane on the right. I see sections for Name, Class, Constraints, Spotlight, User Info, Versioning, etc., but no "Indexes" section appears between Constraints and Spotlight (or anywhere else).
Troubleshooting Steps Taken:
Verified Selection: I have confirmed I am selecting the Entity itself in the left-hand list, not an individual Attribute.
Ruled out Spotlight Indexing: I understand the difference between database indexing (for internal query performance) and the "Index in Spotlight" checkbox/Core Spotlight framework (for system search). I specifically need the former.
Basic Xcode Troubleshooting: I have tried restarting Xcode, cleaning the build folder (Shift+Command+K), and deleting the project's Derived Data. The "Indexes" section remains missing.
Checked File Placement/Target Membership: Confirmed the .xcdatamodeld file is correctly included in the target. Its location in the project navigator doesn't seem relevant.
Checked Model Versioning: Ensured the correct model version is set as "Current" in the File Inspector.
Ruled out Other Features: Confirmed that Fetch Requests, Fetched Properties, and User Info keys are not the mechanisms for defining database indexes.
Confirmed Not Project-Specific: I created a brand new, template-generated iOS App project with "Use Core Data" checked. In this new project, when selecting the default "Item" entity, the "Indexes" section is also missing from the Entity Inspector. This strongly suggests the issue is with my Xcode environment/version itself, not my specific project's setup.
Considered Programmatic/Manual: I understand Core Data expects schema definitions (including indexes) declaratively in the model file. While manual XML editing of the contents file works (adding ... within the tag), this is not the desired or intended workflow via the standard tools.
My Questions:
What is the correct, current procedure for defining non-unique Core Data database indexes using the Xcode UI in Xcode 16.2?
Has the location or method for configuring database indexes changed in this version of Xcode? If so, where is it now?
Is the absence of the "Indexes" section in the Entity Inspector a known issue or intentional change for this Xcode version?
If the standard UI method is unavailable, what is the officially recommended approach (other than manual XML editing)?
I've reviewed the documentation ("Configuring Entities", "Configuring Attributes") and while screenshots show the inspectors, they don't definitively show the "Indexes" section within the Entity Inspector, sometimes focusing on attributes or potentially being cropped.
Any clarification or guidance would be greatly appreciated!
Hello everyone,
I am using Xcode 16 on macOS 14.6 and have integrated GitHub Copilot for Xcode. However, GitHub Copilot stops functioning when Netskope is enabled on my Mac. I have the necessary SSL certificate in my Mac’s Keychain and have trusted it. When I check, GitHub Copilot successfully connects to the server. However, I can’t find an option to set the certificate in Xcode. Since Netskope is required by my organization, I cannot disable it.
Has anyone encountered this issue or know how to resolve it?
Thank you in advance for your help!
Topic:
Developer Tools & Services
SubTopic:
Xcode
At the last place I worked it took roughly 5 minutes to do an application build. Which in turn made doing any sort of TDD or ever just regular Unit Tests extremely painful to do as the cycle time was simply too long.
But that got me thinking.
In recent versions of Xcode, Apple added Previews for SwiftUI Views that basically showed code changes to the View in real time. And Previews were made possible by extremely targeted compilation of the view in question.
So... what if instead of a Preview pane in the Xcode IDE there was a Test pane the could be displayed such that Tests for a piece of code could be created and run almost immediately?
Perhaps by adding a #Testing section to your code
#Testing(MyService.self) // Define the entity to be tested.
If you could drop the turnaround time AND provide a test playground for service level code that could speed development of such code greatly... and encourage interactive test development at the same time.
What do you think?
Trying to use App Data on Xcode 16.2, and failing
I'm running the app with the debugger. When I run the app, I need to do a handful of things, which affects my app's cache files, and UserDefaults. What I'd like to do is store all of these settings, then have them loaded in when the app launches, so I don't need to do same, tedious work of changing settings by hand in the UI.
So, I discovered that I can provide an xcappdata directory in the Run options. This seems like exactly what I'm looking for. But I can't seem to get it to work. Like, when the app runs, it looks like none of those settings are brought in.
I ran the app on a device, and pulled down the application data, and then put that in the project. And you can see in the screenshot, that the value is set.
So, either I'm missing something (which is totally possible) or this feature is broken. Documentation on this is not great, so maybe I'm doing something wrong. If the feature is known to be broken, I'll give up on this. But if it should work, it would be great to get some tips here.
Running macOS 15.4.1, Simulator 16.0 (1042.1), various iOS devices (iPhone 16, iPad 13" M4)
I log into iCloud and enable iCloud Drive. Running the Files app, I noticed that I can click on "flat" documents (PDF, JPEG, etc) and they work. However, when I click on "package" documents (e.g. represented by a directory behind the scenes), I get a normal download progress, but then an alert "The operation could not be completed. No such file or directory".
This seems to happen with all package documents, e.g. Keynote documents or Reality Composer objcap documents. It does not happen on actual devices logged into the same account.
I've tried completely deleting and rebuilding the simulator instances in question, with no success.
I have one of our developer when he attempts to login to xcode on his macos device, he get a message that account is not found but he has an account and he logs in to app developer portal with no issue. Thanks
Topic:
Developer Tools & Services
SubTopic:
Xcode
I have this code:
var eventIn = kevent(ident: UInt(self.socket),
filter: Int16(EVFILT_WRITE),
flags: UInt16((EV_ADD | EV_ENABLE)),
fflags: 0,
data: 0,
udata: nil
)
I looked at it and thought why do I have those extra parentheses? So I changed it to
var eventIn = kevent(ident: UInt(self.socket),
filter: Int16(EVFILT_WRITE),
flags: UInt16(EV_ADD | EV_ENABLE), // changed line!
fflags: 0,
data: 0,
udata: nil
)
and then kevent gave me EBADF.
Does this make sense to anyone?
Currently I only see the right eye view when running my test app on the Vision Simulator. But to be able to evaluate if what I'm doing is actually possible on the device before buying one for developing my app I like to be able to switch between viewing the right eye and left eye in the simulator.
In app purchase is not executed in ios while i run the code in xcode 16.3
But it's working fine in Xcode 16.0.
There is no proper error message or any alerts showing. It just returns an empty product identifier.
Provide the me the solution or kindly fix the issue in xcode IDE regarding this issue in latest xcode
Hi,
Regarding the bundle identifiers of App that I remove from App Store Connect will they be locked forever andI can't reuse them ?
Kind Regards
Topic:
Developer Tools & Services
SubTopic:
Xcode
Please see this question: https://github.com/appium/appium/discussions/20827?sort=new
Topic:
Developer Tools & Services
SubTopic:
Xcode
Hi all,
I’m looking for a way to automate the process of adding Swift Package dependencies (SPM) into an Xcode project.
Right now, I’m doing this manually via:
Xcode → Project → Swift Packages → Add Package Dependency...
But I’d like to script this step — ideally as part of a CI/CD pipeline or a setup script. I explored the xcodeproj Ruby gem, but it doesn’t support adding SPM packages, and there's no official support for editing the .xcodeproj structure related to Swift Packages.
So my question is:
Is there any Apple-supported or community-supported way to programmatically add Swift Package dependencies to an Xcode project or workspace?
Would love to know if anyone has:
Used xcodebuild, xcodegen, or other tools for this
Explored editing project files directly (like project.pbxproj or Package.resolved)
Found any API or CLI hooks from Apple for this
Thanks in advance!
Topic:
Developer Tools & Services
SubTopic:
Xcode
Hi,
We are facing issues on ios simulators os version 18, "Simulator device failed to install the application. Failed to create promise. Underlying error (domain=IXErrorDomain, code=2):"
Due to this error simulator is unable to install the application. we are facing this intermittently.
xcode version : Xcode.16.0.0.16A242d.app
ios simulator runtime : com.apple.CoreSimulator.SimRuntime.iOS-18-0
ios simulator : com.apple.CoreSimulator.SimDeviceType.iPhone-16
mac os version : macOS 15.4
we have tried upgrading to xcode Xcode.16.1.0.16B40.app and ios simulator runtime to 18.1 but its not working. Also we have rebooted xcode, not helping.
*Exact error message : **
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Error running 'install': An error was encountered processing the command (domain=IXErrorDomain, code=2): Simulator device failed to install the application. Failed to create promise. Underlying error (domain=IXErrorDomain, code=2): Failed to set icon resources promise for com.yyyy.xxxx Failed to create promise. Host info: host: 'uci-macmini-019lab3b.local', ip: 'fe80:0:0:0:1caf:6627:141d:f464%en0' Build info: version: '4.30.0', revision: '509c7f17cc' System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '15.3.1', java.version: '11.0.25' Driver info: com.mypackage.common.drivers.CustomIosDriver$ByteBuddy$g865VfU3 Command: [null, newSession {capabilities=[{appium:webviewConnectTimeout=120000, appium:autoAcceptAlerts=true, appium:app=/Users/mobileci/.buildkite-agent/builds/uci-macmini-019lab3b/mypackage/e2e-test-ios-simulator/8155f349-18b9-413c-9d17-dcb064986154/test_artifacts/target.app, appium:includeSafariInWebviews=true, appium:locale=US, appium:mjpegServerPort=52715, appium:newCommandTimeout=600000, appium:waitForIdleTimeout=3, appium:derivedDataPath=/Users/mobileci/.buildkite-agent/builds/uci-macmini-019lab3b/mypackage/e2e-test-ios-simulator/8155f349-18b9-413c-9d17-dcb064986154/appium_wda_ios/, appium:wdaConnectionTimeout=300000, appium:wdaLaunchTimeout=300000, appium:processArguments={env={E2E_TESTING=YES, RUN_UUID=8155f349-18b9-413c-9d17-dcb064986154}}, appium:automationName=XCUITest, appium:fullReset=true, appium:udid=F266ECC3-FD23-464D-B0C3-576EB48B2FF5, appium:deviceName=E2ESimulator, appium:wdaLocalPort=52714, appium:showXcodeLog=true, appium:webkitDebugProxyPort=52716, appium:noReset=false, appium:language=en, platformName=IOS, appium:simpleIsVisibleCheck=true}], desiredCapabilities=Capabilities {app: /Users/mobileci/.buildkite-..., autoAcceptAlerts: true, automationName: XCUITest, derivedDataPath: /Users/mobileci/.buildkite-..., deviceName: E2ESimulator, fullReset: true, includeSafariInWebviews: true, language: en, locale: US, mjpegServerPort: 52715, newCommandTimeout: 600000, noReset: false, platformName: IOS, processArguments: {env: {E2E_TESTING: YES, RUN_UUID: 8155f349-18b9-413c-9d17-dcb...}}, showXcodeLog: true, simpleIsVisibleCheck: true, udid: F266ECC3-FD23-464D-B0C3-576..., waitForIdleTimeout: 3, wdaConnectionTimeout: 300000, wdaLaunchTimeout: 300000, wdaLocalPort: 52714, webkitDebugProxyPort: 52716, webviewConnectTimeout: 120000}}] Capabilities {app: /Users/mobileci/.buildkite-..., autoAcceptAlerts: true, automationName: XCUITest, derivedDataPath: /Users/mobileci/.buildkite-..., deviceName: E2ESimulator, fullReset: true, includeSafariInWebviews: true, language: en, locale: US, mjpegServerPort: 52715, newCommandTimeout: 600000, noReset: false, platformName: IOS, processArguments: {env: {E2E_TESTING: YES, RUN_UUID: 8155f349-18b9-413c-9d17-dcb...}}, showXcodeLog: true, simpleIsVisibleCheck: true, udid: F266ECC3-FD23-464D-B0C3-576..., waitForIdleTimeout: 3, wdaConnectionTimeout: 300000, wdaLaunchTimeout: 300000, wdaLocalPort: 52714, webkitDebugProxyPort: 52716, webviewConnectTimeout: 120000} at
When I execute:
geoCoder.reverseGeocodeLocation(location, completionHandler:{[weak self](placemarks, error) in
print("reverse geocoding location after altitude: ",location.altitude)
print("placemark location first", placemarks?.first?.location?.altitude ?? -1)
The input CLLocation has correct altitude 25, instead the location in the output placemarks have altitude 0, when of course they should have the same location. Moreover it is impossible to retrofit any data in the returned placemarks as they are portrayed as a read only property.
Hello All
I'm encountering an issue with Keychain access in iOS simulators after reinstalling Xcode. My app successfully accesses the Keychain on physical devices, but simulators consistently fail with errors.
Details:
App uses Keychain to store API keys
Works perfectly on physical devices
After Xcode reinstall, simulator Keychain access fails
Error logs show "Keychain retrieve failed for key with status: -25300"
I've properly configured Keychain Sharing entitlements
My entitlements file includes: $(AppIdentifierPrefix)*******
What I've tried:
Resetting simulators
Deleting simulator Keychain databases manually
Adding Keychain Sharing capability
Ensuring entitlements are correct
My app worked fine with simulators before reinstalling Xcode, which suggests something changed in the development environment rather than my code.
Has anyone encountered similar issues? Is there a recommended approach for handling Keychain access in simulators that's more resilient to Xcode environment changes?
Thanks for your help!
We have a big iOS project and we are using .xcconfig files to define our compiler options and build settings.
We have our SWIFT_TREAT_WARNINGS_AS_ERRORS set to YES so that all Swift related warnings will be reported as errors.
Now, we are trying to migrate to Xcode 16.1 and set 'targeted' in the 'Strict Concurrency Checking' flag. This produces some errors that are related to Swift's concurrency checks.
We are now planning to have an approach where we still want to keep SWIFT_TREAT_WARNINGS_AS_ERRORS as is but we want all concurrency related warnings to be still treated as warnings while the rest will get reported as errors.
We found this new compiler option - https://forums.swift.org/t/warnings-as-errors-exceptions/72925.
It looks like the one we want but I think it is still not out yet and we need to wait until Swift 6.1 (correct me if im wrong).
Or is there any other way to do what we want to achieve?