Posts

Post not yet marked as solved
3 Replies
0 Views
This test passes on iOS 15.1 so it seems it is fixed at that version The test still fails for iOS 15.0
Post not yet marked as solved
2 Replies
0 Views
That shouldn't have been an answer, missed the comment button. Anyway, I have replicated the issue in a single test. For me the issue manifests itself in iOS 15, if I run the test on a device running ios 14, the test passes. Here is the full code for a test, you'll need to supply your own image and change a tag that exists for you: func testCGImageDestinationCopyImageSource() throws {     guard let imageURL = Bundle(for: self.classForCoder).url(forResource: "Image_000001", withExtension: "jpg") else {       XCTFail()       return     }     // Work with the image data     let originalData = try Data(contentsOf: imageURL)     // Create source from data     guard let imageSource = CGImageSourceCreateWithData(originalData as CFData, nil) else {       XCTFail()       return     }     guard let UTI: CFString = CGImageSourceGetType(imageSource) else {       XCTFail()       return     }     // Setup a new destination to copy data too     let imageData: CFMutableData = CFDataCreateMutable(nil, 0)     guard let destination = CGImageDestinationCreateWithData(imageData as CFMutableData, UTI, 1, nil) else {       XCTFail()       return     }     // Get the metadata     var mutableMetadata: CGMutableImageMetadata     if let imageMetadata = CGImageSourceCopyMetadataAtIndex(imageSource, 0, nil) {       mutableMetadata = CGImageMetadataCreateMutableCopy(imageMetadata) ?? CGImageMetadataCreateMutable()     } else {       mutableMetadata = CGImageMetadataCreateMutable()     }     // Inspect and check the old value     guard let tag = CGImageMetadataCopyTagMatchingImageProperty(mutableMetadata,                                   kCGImagePropertyExifDictionary,                                   kCGImagePropertyExifLensModel) else {       XCTFail()       return     }     guard let originalValue = CGImageMetadataTagCopyValue(tag) as? String else {       XCTFail()       return     }     XCTAssertEqual(originalValue, "iOS.0")     // Set a new value in the metadata     CGImageMetadataSetValueMatchingImageProperty(mutableMetadata,                            kCGImagePropertyExifDictionary,                            kCGImagePropertyExifLensModel, "iOS" as CFString)     // Ensure new value is set in the metadata     guard let newTag = CGImageMetadataCopyTagMatchingImageProperty(mutableMetadata,                                   kCGImagePropertyExifDictionary,                                   kCGImagePropertyExifLensModel) else {       XCTFail()       return     }     guard let newValue = CGImageMetadataTagCopyValue(newTag) as? String else {       XCTFail()       return     }     XCTAssertEqual(newValue, "iOS")     // Combine the new metadata with the original image     let options = [       kCGImageDestinationMetadata as String : mutableMetadata,       kCGImageDestinationMergeMetadata as String : true       ] as [String : Any]     guard CGImageDestinationCopyImageSource(destination, imageSource, options as CFDictionary, nil) else {       XCTFail()       return     }     // Create a new source from the copied to data     guard let newSource = CGImageSourceCreateWithData(imageData as CFData, nil) else {       XCTFail()       return     } // Get the metadata from the copied to data     var mutableMetadata2: CGMutableImageMetadata     if let imageMetadata2 = CGImageSourceCopyMetadataAtIndex(newSource, 0, nil) {       mutableMetadata2 = CGImageMetadataCreateMutableCopy(imageMetadata2) ?? CGImageMetadataCreateMutable()     } else {       mutableMetadata2 = CGImageMetadataCreateMutable()     }     // Inspect and check the value in the copied to data     guard let updatedTag = CGImageMetadataCopyTagMatchingImageProperty(mutableMetadata2,                                   kCGImagePropertyExifDictionary,                                   kCGImagePropertyExifLensModel) else {       XCTFail()       return     }     guard let updatedValue = CGImageMetadataTagCopyValue(updatedTag) as? String else {       XCTFail()       return     }     XCTAssertEqual(updatedValue, "iOS")   }
Post not yet marked as solved
2 Replies
0 Views
I think I'm also running into this problem but on iOS 15. I use CGImageDestinationCopyImageSource to update some metadata. I ran an XCode test to make sure it was correctly set, but since I updated to XCode 13 and iOS 15, the test fails and the metadata is not updated in the file
Post not yet marked as solved
4 Replies
0 Views
We have started experiencing this bug on real devices since iOS 14.4 We are trying to export a zip file to the Files App, and get the same logs as above, except the reason is given as "not a directory" If we export via something like Airdrop, the export completes But when a user selects the files app, the dialog to the Files app allowing you to choose the location to export to say "0 Items" at the top, where we used to expect to see the file being exported
Post not yet marked as solved
2 Replies
0 Views
I can tell you ARKit's built in image detection did not work for me with QR codes, they are not dissimilar enough from each other. Your best approach would probably be to pass video frames from ARKit to the Vision Framework and use that to detect QR codes, it has built in QR detection via VNDetectBarcodesRequest Vision Docs - https://developer.apple.com/documentation/vision
Post marked as solved
1 Replies
0 Views
We resolved this, the euler angles may have be calculated differently to what we were doing and that caused us some confusion, we just work with the simdWorldTransform now and it's behaving as expected
Post marked as solved
2 Replies
0 Views
Kind of embarrasing, I just noticed that repeat had been set... A function I never ever use or even look at and had forgotten even existed
Post marked as solved
2 Replies
0 Views
Just noticed it's not just shuffle, songs just play twice, tried playing an album, and it plays every song in the album twice
Post not yet marked as solved
2 Replies
0 Views
I'm starting to play around with larger obj files and would like a way ahead of time to determine if a file can be loaded.In metal you can query the recommended max working size and the largest alowed buffer using recommendedMaxWorkingSetSize and maxBufferLength on MTLDevice, but it would be very helpful to analyse a file to determine if it will fill it