Post

Replies

Boosts

Views

Activity

UTType always return nil when testing on M1 Mac simulator with x86 arch
(environment: macOS 11.4, Xcode 12.4, iOS simulator 14.4) The below test does not passed when a project's architectures for "Any iOS Simulator SDK" contains X86_64 only. (Open a new project with architectures arm64 passes) import UniformTypeIdentifiers class UTTypeTests: XCTestCase {     func testThatItConvertsFromMIMEType() {         if #available(iOS 14.0, *) {             guard let mp4Type = UTType(mimeType: "video/mp4") else {                 return XCTFail("Could not decode from MIME type.")             }                          XCTAssertEqual(mp4Type, UTType.mpeg4Movie)         } else {         }   } } similar issue happens on deprecated method UTTypeCopyPreferredTagWithClass
4
0
3.3k
Jul ’21