Posts under Developer Tools & Services topic

Post

Replies

Boosts

Views

Activity

File download not working in Xcode 26.0 RC
Hello Apple Developer Community, I'm experiencing an issue with file download functionality in the iOS Simulator after updating to Xcode 26 RC (Build 17A321). Issue Description: When attempting to download files in the iOS Simulator via Safari, the download prompt appears correctly, but after tapping the 'Download' button, files are not being saved to the Files app. The download appears to do nothing with no error message, no indication of failure, but the file simply doesn't appear in Downloads or anywhere in the Files app. Environment: Xcode Version: 26.0 RC (17A321) iOS Simulator Version: 26.0 RC (23A339) Device Simulated: iPhone Air Steps to Reproduce: Open Safari in the iOS Simulator Navigate to a downloadable file (PDF, ZIP, etc.) Tap to initiate download Download prompt appears as expected Tap the 'Download' button Check the Files app → Downloads folder (empty) Expected Behavior: Files should download normally as they do on physical devices and as they did in previous Xcode versions. Actual Behavior: The download prompt dismisses after tapping 'Download', but no file appears in the Files app. No error message is shown, and there's no indication that the download failed, it simply appears as if nothing happened. Additional Information: Downloads work correctly on physical device (iOS 26 RC 23A340) This functionality worked properly in previous Xcode versions I have created a bug report to Feedback assistant: FB20190927 Thanks in advance for any assistance.
3
1
83
4d
A few questions about allowed-os-versions and os-version in Distribution Definition files
In the archived documentation for Distribution Definition files (https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html), the allowed-os-versions and os-version element are partially documented. I have a few questions about these elements: allowed-os-versions The documentation states: Availability: Available in OS X v10.6.6 and later. Has this element always worked correctly in the past? I'm asking because it does not seem to work correctly on OS X v10.14 for the min attribute of a sub os-version element. os-version The documentation states: This element is designed for you to use a specific OS version number for the min attribute, and a major OS version number for the before attribute. The expectation is that you will know an exact minimum version but not an exact major version. This keeps you from having to guess the last minor revision before the next major revision, as you would have to do if the before attribute were inclusive. This is quite confusing because the documentation never explicitly says what a specific or major OS version number is. Is specific major.minor.patch or major.minor? What is major? major or major.minor? As the documentation was created at a time where the OS version scheme was: 10.minor.patch (and minor was actually the major) and we are now in an era where the OS version is major.minor.path, this is even more confusing. I would also be curious to know what the major version is officially supposed to be for macOS Tahoe in this case. 16 or 26? Generally speaking, this documentation is missing examples for a lot of the elements. Also why is there a tag for InstallerJS and not one for Installation in the Developer Forums?
2
0
89
5d
StoreKit2: appAccountToken in purchase() always returns first value instead of updated UUID
Hello, I’m experiencing an issue with StoreKit 2 when passing a new appAccountToken for each purchase request. Case-ID: 15948169 (for DTS reference) Description of the Problem When initiating a purchase, I generate a new UUID to use as the appAccountToken: let serverTransactionId = UUID() let options: Set<Product.PurchaseOption> = [ .appAccountToken(serverTransactionId) ] let result = try await product.purchase(options: options) Expected Behavior: Each new purchase should return the updated appAccountToken that I pass into the purchase options. Actual Behavior: The payload response after success always contains the same appAccountToken from the very first transaction. It ignores subsequent UUIDs I pass and keeps reusing the original one. This causes issues because the same identifier is being reused across multiple transactions, making it difficult to map purchases to the correct user session. Steps to Reproduce Generate a fresh UUID using UUID(). Pass it as .appAccountToken when calling purchase(). Complete the transaction in the sandbox environment. Inspect the payload response → The appAccountToken value is always the same as the first one used, not the newly provided one. Additional Info I do have a focused test project that reproduces this issue. The issue appears specific to appAccountToken persistence across multiple transactions. Has anyone else experienced this behavior with StoreKit 2? Is this expected (Apple caching the first token) or could this be a bug?
2
0
73
5d
Mergeable Libraries & Image assets
We are unable to access images from an Asset catalog that is part of a dynamic framework that is mergeable, on Debug configuration, when running on an actual device under certain circumstances when using Xcode 16.4 and targeting iOS. If anywhere in the app we call the Bundle(identifier:) initializer for whatever ID, subsequent calls to UIImage(named:in:with:) for images in the framework's bundle return nil. We have verified that the bundle (path) and the name of image & assets target memberships are correct, and that Assets.car has the images. Additionally the only way to make UIImage(named:in:with:) work is to use Bundle(for:) where BundleFinder is part of the mergeable library, non private NSObject class. Anything else and the re-exported bundle is returned which has no assets.
0
0
62
5d
Xcode 26 RC doesn't properly use build configurations
We have several build configurations in our project, yet Xcode seems to ignore them when changing the run configuration in the scheme. There are several OTHER_SWIFT_FLAGS set like this but all code paths using conditionals like #if APPSTORE_BUILD etc. that worked previously with Xcode 16 just all default to the Debug (RETAIL_BUILD) configuration now.
1
0
111
5d
Tapping tab item in Xcode UI test doesn't always work
While preparing automated screenshots with Xcode UI tests for the iOS 26 release, I noticed that this simple line of code app.buttons["myTabItem"].tap() doesn't always work, both on iPhone and iPad Simulator. In fact, it rarely works. Even when repeating the same test, mostly it fails on that line, but a few times it works and I can see the tab item change in the simulator. My main view looks like this: TabView { MyTab1() .tag(tag1) .tabItem { Label("label1", systemImage: "image1") } MyTab2() .tag(tag2) .tabItem { Label("label2", systemImage: "image2") .accessibilityIdentifier("myTabItem") } The error I get is Failed to tap "myTabItem" Button: No matches found for Elements matching predicate '"myTabItem" IN identifiers' from input In the given list of buttons, I see the tab items with their labels, but none of them seem to have an identifier, while other buttons have the correct identifier. I wonder how this can only sometimes work. I tried isolating the issue by iteratively commenting out parts of the SwiftUI code, but unfortunately the behaviour seems erratic. When a change results in the issue not happening anymore, undoing the last X changes often causes the issue to stay away, even with configurations that previously had the issue. I've already spent almost a whole day trying to find the root cause, but with such apparently random behaviour it has proven impossible. Of course, I cannot reproduce the issue with a fresh test project, so the only way to reproduce it with 95% probability is running my original project. Has anyone had the same issue, or does anyone know how I could debug this to find out what causes my UI test to not be able to tap another tab item?
0
0
65
5d
RC sending non-specific file format to simulator no longer opens Files app to import
Up until yesterday (previous Xcode builds) when I send a file from the Mac to the simulator, either by right-click or drag and dropping, the simulator opened the Files app to import/save the file. Now when I do the same, instead of the iOS simulator opening the Files app, it opens Safari and asks if I want to download the file, if I agree the file is supposedly download but nowhere to be found. By a non-specific file format is a file format that is not set up to open any specific app, such is the case of PDF, JPG, MP4, MD, etc. A zip file, for example. I constantly send database backup files to the simulator to then import in my app (it has an import tool that lets me select a file from the filesystem) to test, but now I see myself unable to use this because the file I send is not being transferred. Has anyone came across this?
2
1
53
5d
action button on watch ultra
hi there, can someone answer if i have shallow water entitlement is there any way to add my app under dive category in the action button settings and select my app as the one beside default depth app. No matter what i change in the logic flow my app isn't there. The only one available is depth. What I would like to see: two options one is depth and another my diving app to select. What do I need to make it happen. Thanks
0
0
72
5d
Xcode 26 Coding Assistant & Anthropic
I've been trying to use Antrhopic with Xcode 26 RC and continue to run into this error: No Data/Bytes for request: https://api.anthropic.com/v1/messages Once I get it, all prompts fail even a simple "Hello" that worked a moment ago returns the error message. Restarting Xcode and it returns to normal till I hit that error again. Any ideas on what's going on?
0
0
76
5d
Save SwiftData object for model with one to many relationship
First the Model: import Foundation import SwiftData //Model for Earned Value Analysis @Model final class CostReport{ var aCWP: Double //Actual Cost of Work Performed var bCWP: Double //Budgeted Cost of Work Performed var bCWS: Double // Budgeted Cost of Work Scheduled var cumACWP: Double// Cumlative Actual Cost of Work Performed var cumBCWP: Double // Cumlative Budgeted Cost of Work Performed var cumBCWS: Double // Cumlative Budgeted Cost of Work Scheduled var startDateOfPeriod: Date var endDateOfPeriod: Date var contract: Contract? init(aCWP: Double = 0.0, bCWP: Double = 0.0, bCWS: Double = 0.0, cumACWP: Double = 0.0, cumBCWP: Double = 0.0, cumBCWS: Double = 0.0, startDateOfPeriod: Date = .now, endDateOfPeriod: Date = .now, contract: Contract) { self.aCWP = aCWP self.bCWP = bCWP self.bCWS = bCWS self.cumACWP = cumACWP self.cumBCWP = cumBCWP self.cumBCWS = cumBCWS self.startDateOfPeriod = startDateOfPeriod self.endDateOfPeriod = endDateOfPeriod self.contract = contract } } @Model //Model for Contracts final class Contract{ var costReports: [CostReport] var contractType: ContractType? @Attribute(.unique)var contractNumber: String @Attribute(.unique)var contractName: String var startDate: Date var endDate: Date var contractValue: Double var contractorName: String var contractorContact: String var contractorPhone: String var contractorEmail: String init(costReports: [CostReport], contractType: ContractType, contractNumber: String = "", contractName: String = "", startDate: Date = .now, endDate: Date = .now, contractValue: Double = 0.0, contractorName: String = "", contractorContact: String = "", contractorPhone: String = "", contractorEmail: String = "") { self.costReports = costReports self.contractType = contractType self.contractNumber = contractNumber self.contractName = contractName self.startDate = startDate self.endDate = endDate self.contractValue = contractValue self.contractorName = contractorName self.contractorContact = contractorContact self.contractorPhone = contractorPhone self.contractorEmail = contractorEmail } } @Model //Model for contract types final class ContractType{ var contracts: [Contract] @Attribute(.unique)var typeName: String @Attribute(.unique)var typeCode: String var typeDescription: String init(contracts: [Contract], typeName: String = "", typeCode: String = "", typeDescription: String = "") { self.contracts = contracts self.typeName = typeName self.typeCode = typeCode self.typeDescription = typeDescription } } ContractType has a one to many relationship to Contract. Contract has a one to many relationship with CostReport. The ContractTypes can vary depending on the users situation so I need the user to be able to enter ContractTypes. Code for that: import SwiftUI import SwiftData struct EnterContractTypes: View { @Environment(.modelContext) var managedObjectContext @Query private var contracts: [Contract] @Query private var contractTypes: [ContractType] @State private var typeName: String = "" @State private var typeCode: String = "" @State private var typeDescription: String = "" var body: some View { Form { Section(header: Text("Enter Contract Type") .foregroundStyle(Color(.green)) .bold() .font(.largeTitle)) { TextField("Name", text: $typeName) .frame(width: 400, height: 40) TextField("Code", text: $typeCode) .frame(width: 400, height: 40) TextField("Description", text: $typeDescription, axis: .vertical) .frame(width: 600, height: 60) } } .frame(width:1000, height:500) } func save() { let newContractType = ContractType(context: managedObjectContext) newContractType.typeName = typeName newContractType.typeCode = typeCode newContractType.typeDescription = typeDescription try? managedObjectContext.save() The "let newContractType = ContractType(context: managedObjectContext)" is where the error happens. It says there is an extra argument in the context call.
4
0
207
6d
Xcode's new-tab vs. reuse-tab behavior is still infuriating and baffling.
Is there any way to stop Xcode from randomly re-using a tab when you click on a file in the project treeview? I never, never, NEVER want the file in the current tab replaced. If the clicked-on file is not already open in a tab, I want a new one. Every time. But in Xcode, you sometimes get a new tab, and sometimes don't. I can't find any pattern to this absurd behavior. Even double-clicking doesn't produce a new tab, even though the Navigation settings say, "Double-click: Opens tab in focused editor." WTH is this thing doing, and how do we stop it? This is Xcode 16.4.
3
0
186
1w
Repeated Failure to Enroll in Apple Developer Program – No Reason Provided
Hello, I’ve attempted multiple times to enroll in the Apple Developer Program, but the enrollment consistently fails. Despite reaching out to Apple Support through several emails, I have never received a clear explanation or log details on why the enrollment was not successful. I even requested that my client (with a foreign account) attempt the payment on my behalf, yet the application was still rejected. This suggests the issue is not simply related to payment method or regional restrictions. At this point, I would appreciate clear feedback or error details explaining why the enrollment fails so I can resolve the issue. For reference, here is the Purchase ID issued to me during the attempted enrollment: DWHQ8WFZJH I kindly ask Apple Support or community members with similar experience to assist in resolving this matter.
0
0
58
1w
Very technical question about the 'project.pbxproj' file. Targeted devices?
Hello In my app code (in flutter) but you can remain if you code in other langages, maybe you can help in other ways, I have a file called: project.pbxproj I am wondering about this line: ARGETED_DEVICE_FAMILY = "1,2"; Is it true that the 1 is for Iphone and 2 for Ipad? Would that mean that if I wrote "1" and removed 2, then in my app page in developer store side I would not see a tab for Ipad where the store requires from me to post screenshots for ipad? For instance (see image below) I know you guys use XCODE and it handels it itself, but can you open your .ipa files and check "project.pbxproj" to confirm differences between these files when the app is targeting Iphone Vs targeting Ipad? Thanks
4
0
156
1w
How to consume a dynamic Xcode framework?
I have an Xcode project setup as follows: 3 static libraries 1 framework target, whose Mach-O type is set to Dynamic Library main app target (iOS app) The target dependencies are as follows: In framework's build phase [Link with libraries], I have the 3 libs statically linked. In the main app's build phase [Link with libraries], I have only the framework, which is dynamically linked. As per my understanding: The libs are statically linked to the framework. So, the framework binary would contain code from all the libs. The framework is dynamically linked to the main app (iOS app in this case). So, the main app's binary only has a reference to the framework's binary, which would be loaded in the memory at runtime. Assuming my understanding is correct, I'm stuck with the following problem: All 3 libs build successfully The framework builds successfully The main app target doesn't build. The compilation is successful, but the build fails with linker errors. Please let me know if I am doing something incorrectly, or if a configuration is missing. Below are more details: The linker gives the following error: Undefined symbols for architecture arm64: "StringUtils.GetStr() -> Swift.String", referenced from: dynamic_fw.AppDelegate.application(_: __C.UIApplication, didFinishLaunchingWithOptions: [__C.UIApplicationLaunchOptionsKey : Any]?) -> Swift.Bool in AppDelegate.o "TWUtils.GetNum() -> Swift.Int", referenced from: dynamic_fw.AppDelegate.application(_: __C.UIApplication, didFinishLaunchingWithOptions: [__C.UIApplicationLaunchOptionsKey : Any]?) -> Swift.Bool in AppDelegate.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) And the command shown in the logs for linking phase is: Ld /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Products/Debug-iphonesimulator/dynamic-fw.app/dynamic-fw normal (in target 'dynamic-fw' from project 'dynamic-fw') cd /Users/raunit.shrivastava/Desktop/dynamic-fw /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target arm64-apple-ios17.5-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.5.sdk -O0 -L/Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphonesimulator -L/Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Products/Debug-iphonesimulator -L. -L./StringUtils -L./TWFramework -L./TWUtils -L./dynamic-fw -F/Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphonesimulator -F/Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Products/Debug-iphonesimulator -F. -F./StringUtils -F./TWFramework -F./TWUtils -F./dynamic-fw -filelist /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/dynamic-fw.build/Debug-iphonesimulator/dynamic-fw.build/Objects-normal/arm64/dynamic-fw.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker ./\*\* -dead_strip -Xlinker -object_path_lto -Xlinker /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/dynamic-fw.build/Debug-iphonesimulator/dynamic-fw.build/Objects-normal/arm64/dynamic-fw_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/dynamic-fw.build/Debug-iphonesimulator/dynamic-fw.build/Objects-normal/arm64/dynamic_fw.swiftmodule -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/dynamic-fw.build/Debug-iphonesimulator/dynamic-fw.build/dynamic-fw.app-Simulated.xcent -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __ents_der -Xlinker /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/dynamic-fw.build/Debug-iphonesimulator/dynamic-fw.build/dynamic-fw.app-Simulated.xcent.der -framework TWFramework -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/dynamic-fw.build/Debug-iphonesimulator/dynamic-fw.build/Objects-normal/arm64/dynamic-fw_dependency_info.dat -o /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Products/Debug-iphonesimulator/dynamic-fw.app/dynamic-fw
3
0
103
1w
Xcode fails to provision target
I've alluded to this before in these posts and there are some posts from others about this, e.g. https://developer.apple.com/forums/thread/759845 and I've filed some bugs related to the behavior. FB20212935 FB19451832 FB19450508 FB19450162 FB19449747 Our company owns the USB vendor IDs X and Y . We've been granted a USB transport entitlement for both of those IDs. The crux of the problem is that I want to build a driver for USB vendor ID Y. Xcode's well-hidden auto-generated provisioning profile for my driver contains com.apple.developer.driverkit.transport.usb: { idVendor = X; } which is obviously not what I want. Xcode fails to provision the target. But I have another, much older project with an auto-generated provisioning profile containing com.apple.developer.driverkit.transport.usb: { idVendor = X; }, { idVendor = Y; } I can build a driver for idVendor Y without problems in this project. But that doesn't help me with my new project. What can I do to fix this? Do I need to request our entitlements again? I fear if I do so, something will get lost in the process. Is there a way to inspect what we have already been granted? - I can't see a "managed entitlements" section on the account portal. I can go through the motions of making a new App ID, then I can see that some Capability Request have been "Assigned", but I don't see what their values are. A second question I have is about the userclient-access entitlement. Are these tied to the bundle ID of the app which claims the access? In other words, if I have two drivers com.mycompany.app1.driver1 com.mycompany.app2.driver2 and I would like to have com.mycompany.app1 communicate with com.mycompany.app1.driver1, I would ask for the com.apple.developer.driverkit.userclient-access capability for com.mycompany.app1.driver1. But must I request that access for each specific app bundle ID that will talk to that driver, or once the entitlement is granted, can I use com.apple.developer.driverkit.userclient-access = { com.mycompany.app1.driver1 } in any of my apps?
1
0
128
1w