Fixed in macOS 14.3 (23D56).
Post
Replies
Boosts
Views
Activity
You can download the runtimes directly from the here and for 2022 and later Apple platforms you can use the xcrun simctl runtime add command:
xcrun simctl runtime add iOS_16_Simulator_Runtime.dmg
Simulator runtimes for earlier versions can be installed with the xcodes tool.
The speed issues seem to have been resolved.
The xcrun simctl runtime add command only works with 2022 and later Apple platforms:
xcrun simctl runtime add iOS_16_Simulator_Runtime.dmg
Simulator runtimes for earlier versions can be installed with xcodes.
The problem seems to be introduced in tvOS 15, I can reproduce it on tvOS 15.4 but cannot download the tvOS 15.0 Simulator at the moment as the downloads keep failing.
The following code is enough to trigger the issue:
let path = Bundle.main.path(forResource: "Example", ofType: "png")!
let _ = UIImage(contentsOfFile: path)
Reported as FB11892233.
Looks like the issue is back with missing symbols for watchOS 7.6.1:
Could not download and install Symbols for watchOS 7.6.1 (18U70). Failed to download package from ADC.
Domain: DVTDownloadableErrors
Code: -1
Failure Reason: There are no valid accounts registered with Xcode that have the ability to access this resource.
Recovery Suggestion: Contact Apple Developer Program Support to resolve account access issues.
User Info: {
DVTDeviceErrorIsProxied = 1;
}
--
Failed with HTTP status 403: forbidden
A temporary hack to use the watchOS 7.6 symbols:
cp -R ~/Library/Developer/Xcode/watchOS\ DeviceSupport/Watch6,1\ 7.6\ \(18U63\) ~/Library/Developer/Xcode/watchOS\ DeviceSupport/Watch6,1\ 7.6.1\ \(18U70\)
I modified the contentsOfDirectory(at:…) arguments as the code comment - https://github.com/apple/swift-corelibs-foundation/blob/main/Sources/Foundation/FileManager.swift#L54 suggests to "only receive the URLs and no other attributes":
swift
let u = URL(fileURLWithPath: "/Users/user")
_ = try! FileManager.default.contentsOfDirectory(atPath: u.path)
mkdir("/Users/user/Test1", 0o755)
_ = try! FileManager.default.contentsOfDirectory(atPath: u.path)
mkdir("/Users/user/Test2", 0o755)
_ = try! FileManager.default.contentsOfDirectory(at: u, includingPropertiesForKeys: [], options: FileManager.DirectoryEnumerationOptions(rawValue: 0))
mkdir("/Users/user/Test3", 0o755)
The output of fs_usage when contentsOfDirectory(at:…) throws a fatal error:
mkdir [ 1] /Users/user/Test1
stat64 /Users/user
getattrlist /Users/user
getattrlist /Users/user
getattrlist /Users/user
open F=4 (R__________X) /Users/user
fstat64 F=4
getattrlistbulk
getattrlist [ 5] /Users/user/mount
getattrlistbulk
getattrlistbulk
close F=4
mkdir [ 1] /Users/user/Test2
getattrlist /Users/user
getattrlist /Users/user
open F=4 (R__________X) /Users/user
fstat64 F=4
getattrlistbulk
getattrlist [ 5] /Users/user/mount
getattrlistbulk
close F=4
The problem is the former.
I assumed the behavior of the methods would be comparable as the documentation seems to be almost the same.
It looks as though they are fundamentally different though, contentsOfDirectory(atPath:…) performs a shallow read and contentsOfDirectory(at:…) seems to perform a stat call on all the entries. Based on the following code comment - https://github.com/apple/swift-corelibs-foundation/blob/main/Sources/Foundation/FileManager.swift#L54 I thought it might be possible to avoid the stat call but it seems to happen in all cases:
If you wish to only receive the URLs and no other attributes, then pass '0' for 'options' and an empty NSArray ('[NSArray array]') for 'keys'. If you wish to have the property caches of the vended URLs pre-populated with a default set of attributes, then pass '0' for 'options' and 'nil' for 'keys'.
You need to trigger the Input/output error - https://github.com/osxfuse/osxfuse/issues/45 first. This can be achieved with ifuse - https://github.com/libimobiledevice/ifuse and connecting an iOS device:
brew install ifuse
mkdir iphone
ifuse iphone
Now disconnecting the iOS device will result in the "Input/output error".
This is the output when running the above code in Xcode 12.4:
content directory contents
error Error Domain=NSCocoaErrorDomain Code=256 "The file “mount” couldn’t be opened." UserInfo={NSURL=file:///Users/user/mount, NSFilePath=/Users/user/mount, NSUnderlyingError=0x600002b69d10 {Error Domain=NSPOSIXErrorDomain Code=5 "Input/output error"}}
error Error Domain=NSCocoaErrorDomain Code=256 "The file “mount” couldn’t be opened." UserInfo={NSURL=file:///Users/user/mount, NSFilePath=/Users/user/mount, NSUnderlyingError=0x600002b6e0a0 {Error Domain=NSPOSIXErrorDomain Code=5 "Input/output error"}}