I think the issue here is Sequoia. Builds from Xcode 16 RC running on Sonoma (even on Xcode cloud) submit fine but builds from Sequoia RC do not.
hopefully apple willl fix it π€
Post
Replies
Boosts
Views
Activity
Great, thanks for the explanation, this was really helpful and gave me the confidence to use unchecked Sendable in this instance.
I understand how it got here now but it's an awkward API that is pretty hard to use safely out of the box from Swift 6.
I have experimented a little more. I can reproduce this issue by:
create a new project in Xcode 16 beta 6 with default settings
Include any reference to NSDecimalRound()
Build an Archive build from Xcode
Launch the App.
Here is the code I am adding to trigger the crash:
public extension Decimal {
func rounded(_ roundingMode: Decimal.RoundingMode = .plain) -> Decimal {
var result = Decimal()
var number = self
NSDecimalRound(&result, &number, 0, roundingMode)
return result
}
}
This seems very bad so I have filed FB14900250 but this is a pretty big blocker for us to be able to ship anything right now.
Thanks for getting back to me.
I'm not sure if you missed something or I wasn't clear enough above but I am building with Xcode 16 beta 6 already.
Here is some more complete info on the environments I see the crash:
Xcode cloud - macOS 14.5 + Xcode 16 b6 - distributed via TestFlight:
CRASHES on macOS 14.5.1
launches on macOS 15 beta
Intel Mac - macOS 14.5 + Xcode 16 b6 - Xcode attached debug build:
launches on macOS 14.5.1
Intel Mac - macOS 14.5 + Xcode 16 b6 - Local Archive build launched locally
CRASHES on macOS 14.5.1
launches on macOS 15 beta
Intel Mac - macOS 14.5 + Xcode 16 b6 - Local Archive build distributed via TestFlight
CRASHES on macOS 14.5.1
launches on macOS 15 beta
So it seems like the issue is not tied directly to Xcode cloud or TestFlight but is in fact present in all archive builds built on macOS 14.5.1 + Xcode 16 b6 and run on macOS 14.5.1.
Hopefully that makes the situation clearer.
I also note that the crash includes Foundation14NSDecimalRound. I audited our code and we do make calls to NSDecimalRound and include references to Decimal.RoundingMode from inside an SPM module within the the same codebase.
I've had a play and I don't think my sending proposal would help here either because of the previous call to audioFile.read() the compiler won't allow it to be sent.
For now I have boxed the buffer inside an @unchecked Sendable but I wish there was a nicer way to make this API work.
This seems to be fixed in Xcode 16 beta 5 π
We are also seeing this error.
Unfortunately the workaround doesn't quite work for us because we are using GRDBQuery, which itself has a dependency on GRDB.swift which is outside of our direct control.
Hopefully it can be fixed properly in Xcode soon!
I'm also hitting this issue, exactly as described when trying to add a new widget target to an existing Multiplatform app.
Did you ever find a solution?
checking the signedDate field I can see that the specific example transaction I am looking at was signed 2023-09-12. So I guess technically the certificate was valid when it was signed. I would need some more time to investigate signed dates of other transactions that were failing.
The problem is that this is for an annual subscription that is valid for 10 more months so the server may very likely re-check the transaction again if it is sent up from the client. I just assumed that either transactions would get re-signed or that the certificate expiry would be far enough in the future that this wouldn't be an issue.
If I am understanding correctly it seems like we need to be checking that the signedDate is within the window of certificate validity rather than the current date. Does that sound right?
Yep we are seeing this too. It's still present in Xcode beta 6 / macOS Sonoma beta 3. I filed feedback as FB12883392 if anyone wants to cross reference.
as suggested by @treastrain_dev switching the OS version to Ventura seems to resolve the issue for now for us as well, thanks for the tip.
I have submitted this to Apple as FB12509606 - "Transaction.updates stream closes immediately and Transactions missing"
I have a suspicion that this might be a different manifestation of the same problem discussed in this SO post
We also are seeing something similar to this. On macOS it seems like for some customers that the Transaction.updates sequence returns immediately. The result of this is that they must then restore purchases to regain access.
Using code similar to the below:
Task.detached(priority: .background) {
logger.log("starting listening for transaction updates")
defer { logger.warning("stopped listening for transaction updates") }
for await verificationResult in Transaction.updates {
logger.log("processing transaction update")
...
}
}
}
I can see this in logs from some customers that "stopped listening for transaction updates" gets logged almost immediately after "starting listening for transaction updates". I can't see any errors thrown so I'm still unable to to figure out under what conditions this happens. My first guess was maybe them being signed out of the App Store but I was unable to reproduce this at all in testing.
Yes, we are also facing this issue, hopefully there is a workable solution.
Thanks Quinn, this helped me get it working.
Just to note two additional things that I found confusing in the process.
The defaults command line tool doesn't really help here, as far as I can work out it can't be used with App groups. When using defaults read group.UUU myKey I get The domain/default pair of (group.UUU, myKey) does not exist Is that expected?
The Mac Native side logs a scary message when trying to access values, but does in-fact seem to find the value still. Not sure how concerned I should be able this.
[User Defaults] Couldn't read values in CFPrefsPlistSource<0x600003978680> (Domain: group.UUU, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd
We now maintain a patched version of opusfile that supports decoding of up-to 16 channels and I can confirm it works great on iOS.