I was also unable to download the container from my iPhone 13 Pro on iOS 17.4.1, using Xcode 15.3. Here is the brute force solution I used...
I added this temporary code to my AppDelegate didFinishLaunchingWithOptions, which removes the folder containing the non-transferable file and exits (gracefully, but using a private API).
if true {
if let directoryURL = FileManager.default
.urls(for: .libraryDirectory, in: .userDomainMask)
.first?.appendingPathComponent("WebKit") {
do {
try FileManager.default.removeItem(at: directoryURL)
let selector = Selector("terminateWithSuccess")
UIApplication.shared.perform(selector,
with: UIApplication.shared, afterDelay: 0)
} catch {
/* can’t remove item \(error)" */
}
}
}
The container can now be downloaded until such time as the application uses the WebKit again, which will re-create this non-transferable file. Come on, Apple !
👉 Make sure you switch from true to false before uploading your app to the App Store !