Build, test, and submit your app using Xcode, Apple's integrated development environment.

Xcode Documentation

Post

Replies

Boosts

Views

Activity

Developer account can't be added on a virtualised macOS using Virtualization framework
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
0
0
65
12h
Threads with classic lock-based synchronization in SwiftUI in Xcode 16
Hi, I am stuck moving one of my projects from Xcode 15 to Xcode 16. This is a SwiftUI application that uses in some places classic Threads and locks/conditions for synchronization. I was hoping that in Swift 5 mode, I could compile and run this app also with Xcode 16 so that I can start migrating it towards Swift 6. Unfortunately, my application crashes via EXC_BREAKPOINT (code=1, subcode=0x1800eb31c) whenever some blocking operation e.g. condition.wait() or DispatchQueue.main.sync { ... } is invoked from within the same module (I haven't seen this happening for frameworks that use the same code that I linked in dynamically). I have copied an abstraction below that I am using, to give an example of the kind of code I am talking about. I have verified that Swift 5 is used, "strict concurrency checking" is set to "minimal", etc. I have not found a workaround and thus, I'm curious to hear if others were facing similar challenges? Any hints on how to proceed are welcome. Thanks, Matthias Example abstraction that is used in my app. It's needed because I have synchronous computations that require a large stack. It's crashing whenever condition.wait() is executed. public final class TaskSerializer: Thread { /// Condition to synchronize access to `tasks`. private let condition = NSCondition() /// The tasks queue. private var tasks = [() -> Void]() public init(stackSize: Int = 8_388_608, qos: QualityOfService = .userInitiated) { super.init() self.stackSize = stackSize self.qualityOfService = qos } /// Don't call directly; this is the main method of the serializer thread. public override func main() { super.main() while !self.isCancelled { self.condition.lock() while self.tasks.isEmpty { if self.isCancelled { self.condition.unlock() return } self.condition.wait() } let task = self.tasks.removeFirst() self.condition.unlock() task() } self.condition.lock() self.tasks.removeAll() self.condition.unlock() } /// Schedule a task in this serializer thread. public func schedule(task: @escaping () -> Void) { self.condition.lock() self.tasks.append(task) self.condition.signal() self.condition.unlock() } }
0
0
59
15h
What is all this console spew, and how to manage it?
Something (or a lot) is janky about apps built for "My Mac - designed for iPad." Aside from things just not working, the amount of garbage spewed to the console during debugging is unmanageable. I can't see my own trace statements amongst screens and screens of repetitive nonsense. I right-clicked on it and set it to filter out errors, but I'd like to get notified of legitimate errors. Anyone employing a clever filtering method I'm not aware of?
0
0
58
22h
Troubleshooting "Decoding Error" in Xcode 16.2 on MacMini M1 with Sequoia 15.1
I'm working with a MacMini M1 running Sequoia 15.1 OS, and I've configured a Virtual Machine on this device using the Virtualization.Framework to operate with the same OS version. While I can sign into my account through System Settings without any problems, I encounter difficulties when trying to add my account to Xcode 16.2. Initially, the login appears to succeed, but Xcode quickly presents a "Decoding Error": There was an issue decoding the response: (HTTP 401, 60 bytes) The data couldn’t be read because it is not in the correct format. As a result, I'm unable to access any account details or team information. I found a similar issue but I don't think it was resolved, even if it's marked as such: https://developer.apple.com/forums/thread/767673 Is there an existing workaround?
0
0
47
1d
Can't get Account information with XCode 16.1
I’m trying to add my account to Xcode 16.1, which is running on a virtual machine with macOS Sequoia 15.1. I was able to successfully sign in to my account on the virtual machine itself. I’m using a Mac Mini M2, but when I attempt to add my account in Xcode, I encounter the following 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."
0
1
45
1d
This app cannot be installed to apple watch
I recently added a new target for Apple Watch, which works fine on the simulator. However, I wasn't able to run it on real Apple watches. First, I don't see it in the list of devices, even after I click "trust" and connect to my Mac over charging cable. Second, I've always used automatic code signing, and everything seems OK here. Third, I also tried distributing it over TestFlight, but that build doesn't appear in the TF. I restarted my phone and relaunched the TF app. So, when I install the app to my iPhone over the cable, the watch app doesn't appear on Apple watches. Then, If I go to watch app and install my app manual (I see it at the bottom with the "install" button), it fails with the error "This app cannot be installed because its integrity could not be verified.". Also, there's an icon on the Apple watch, but it shows the same error when I click it. I unpaired and paired it again, but it didn't help. Also, I tried another pair of phones, and the same thing happened. I use an AppStore account (not enterprise), and the main app works fine. Is there a way how to fix it?
1
0
87
2d
Xcode Fails to Load Products Metadata from the StoreKit Configuration File
I'm on an Intel-based Mac running macOS Sonoma 14.7.1 (23H222) and Xcode Version 16.1 (16B40). I've created a local StoreKit Configuration File that does not synchronise with App Store Connect and selected it in the Scheme. I have some products that are consumable in-app purchase and it loads fine as expected when I run the app and I am able to make transactions. It also show up in the Transaction Manager. After a little while, working on the app, re-running it several times, it stops working. The products do not load the metadata from the StoreKit configuration file. I also get this error in the console: Error enumerating unfinished transactions for first transaction listener: Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={AMSStatusCode=0, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <DF5E86B0-0E4A-4982-AF42-FC58FA858C01>.<1>, NSErrorFailingURLKey=http://localhost:51027/inApps/history?guid=F01898465023&reason=initial, _kCFStreamErrorDomainKey=10, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <DF5E86B0-0E4A-4982-AF42-FC58FA858C01>.<1>" ), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=http://localhost:51027/inApps/history?guid=F01898465023&reason=initial, NSUnderlyingError=0x60000038c150 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorDomainKey=10, _kCFStreamErrorCodeKey=-72000, _NSURLErrorNWPathKey_desc=satisfied (Path is satisfied), interface: lo0, _NSURLErrorNWResolutionReportKey_desc=Resolved 0 endpoints in 0ms using unknown from query}}, _kCFStreamErrorCodeKey=-72000} Restarting the computer resolves the issue but I don't want to restart the computer every single time when it happens and it happens quite soon after a short while. How can I make sure that it doesn't happen or if it does happen then fix the issue without restarting the computer? Relaunching Xcode doesn't help and neither does deleting Project Build Data and Indexes.
0
0
40
2d
SwiftUI: Command SwiftCompile failed with a nonzero exit code
I have a SwiftUI app that I've been working on in XCode 16.1. The project builds and runs in the simulators, on my mac and on my iPhone/iPad without any issues. I'm also able to build my unit test project and run them without any errors. The project has zero warnings in it. When I go to the Edit Schemes options and change the Run scheme to be a Release build with the Debug Executable unchecked I get a compiler error: Command SwiftCompile failed with a nonzero exit code I've attempted this Release Run with the following target devices in XCode: My iPhone 15 Pro Max (iOS 18.2 Beta 3) MacBook Air (M1) (15.2 Beta) iPhone 16 Simulator (iOS 18.1) Any iOS Simulator Device (arm64, x86_64) All 3 of these target have the same issue. Normally I would just debug the error from the logs but when I look at the build output I can't see any information in the log to tell me what happened. It looks like the source files are sent into the SwiftCompiler and the compiler fails without bubbling up the issue. I've provided the full error log export as a Gist HERE due to it's size. Is there anything in the log I'm missing? Is there a way for me to turn on more verbose logging during compilation of a Release Build? I created a brand new Multiplatform App in XCode and I added all of my source files to it. No project configuration settings were changed. I could build it successfully with the debug configuration. I then changed it to the Release configuration and experienced the same error. I can create another fresh project and make the same release configuration with none of my source files in it and get a successful build. I t seems there is something wrong with my source files and the release configuration but the compiler doesn't indicate what. I'm lost at this point as I can't figure out how to get a release build and can't seem to find any indication as to why.
6
0
119
3d
Time to Have Membership Completed?
Hello - Asking a question that's probably been asked, and maybe a couple more. I bought a membership yesterday and received the email, I'm assuming it's "approved", but when I log in on developer account it says "PENDING". I will be the only user on my account. I already have the app, it's been tested by another party and all I need do is make some minor changes. So that's done, now I need to create a "debug or release testing distribution", but when I do that I get this error in xCode. Is this normal...until my status changes from "PENDING" to (guessing) APPROVED? And one further question. I am the only developer, and this app will only be used by one person as it's specialized for a single purpose. What are the option for that person to install the app? Is there a special section on the app store for such an app? Thanks, Gary
4
0
89
3d
Sign in with Apple credential always revoked on iOS18/18.1 Simulator
Hi there - I maintain the react-native-apple-authentication module which allows react native developers to implement sign in with Apple When testing we noticed that code working perfectly in iOS17 Simulators now fails on iOS18/18.1 Simulators. Specifically, the credential status is always revoked when testing on an iOS18+ Simulator. The same code works perfectly on a real device running iOS18 or 18.1 so this appears to be a Simulator bug. This is problematic because App review is frequently performed on a Simulator, so there are false-negative test results for Sign In With Apple from reviewers when they use iOS18 emulators, resulting in App submission rejections. We're tracking this here, with some results posted and an example app in-repo that demonstrates the issue: https://github.com/invertase/react-native-apple-authentication/issues/356 It would be great to see the Simulator fixed so that it works correctly with Sign In With Apple again. Thanks
5
0
67
3d
Issue downloading app versions in Organizer
Since about two weeks Xcode has been unable to download other app versions than the pre-selected set of versions shown in Organizer for any of the sub selections like Crashes or Feedback. I can see some crashes and feedback for the versions that were already there but when i choose "More versions..." in the version selector the popup shows but after about a minute i get a message that the versions failed to load due to a network error. I've tried every few days, on multiple networks (all with good fiber connections), for two different team accounts and for multiple apps, but in none of these scenario's Xcode is able to download new versions so i'm pretty sure there is something broken on Apple's side but i don't see many reports online about this nor anything here on the forum. Is anybody else experiencing these issues?
0
0
49
3d