write() not working in OS betas for files in App Group, from app and extension

We have an App Group defined in our entitlements file so that two pieces of our software, a management GUI and a VPN extension, can write files to the same location.

This is not just for regular log files. There's data we want to record which isn't appropriate for the system logs.

What we're seeing on the iOS and macOS betas is that the write() file always fails, and we end up with \0s written to the file instead of the data.

This is true both with the shipping versions of our applications on the App Store and with builds made with Xcode 15 and run on the devices in the debugger.

  • Happens from both the Network Extension and the management application.
  • Both macOS and iOS.
  • Shipping apps and freshly built with latest tools.

There's nothing we see in the Console logs that would appear to explain this.

I didn't see anything in the release notes that would address this, but I could easily have missed something.

Anyone else seen this?

I've been amending the feedback issues mentioned earlier in the thread, but I suppose this should be created as a new feedback.

The behavior of write() still seems wrong as well. No matter what I'm trying to write, the file size & contents shouldn't be changing if there's a failure return.

It looks like write is updating the file size and then trying to write data, so when there's a problem at that stage we still see a modified file. Should be checking for data to write first.

but I suppose this should be created as a new feedback.

Yes please. Date formatting issues are handled by a completely separate team.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

write() not working in OS betas for files in App Group, from app and extension
 
 
Q