Files
iNaturalistReactNative/patches/react-native-vision-camera+4.5.2.patch
Johannes Klein d034e15eea Update vision camera and plugin (#2949)
* Update package.json

* Update package-lock.json

* Update Podfile.lock

* Update vision camera patch (that removes branded metadate)

* Remove camera orientation prop and patch

* Remove frame processor orientation patch

No longer needed, and accepted by the vision-plugin

* Remove rotationLocalPhotoPatch as it is not used

* Do not rotate freshly taken photos anymore to save in a temporary folder

I have not yet removed the actual making of a copy of the photo into the temp folder. It is only no longer rotated.

* Remove unused deviceOrientation param

* Rename file

* Change function name as it no longer rotates

* Move image resize logic to the existing helper function

Instead of calling it a "patch"

* Move helper function to the only file it is imported into

* Latest camera library versions

* Revert "Latest camera library versions"

This reverts commit da6b2f7c28.

* Remove iPad camera orientation patch

* Update import

* Update Podfile.lock
2025-06-11 08:15:01 +02:00

46 lines
2.2 KiB
Diff

diff --git a/node_modules/react-native-vision-camera/ios/Core/MetadataProvider.swift b/node_modules/react-native-vision-camera/ios/Core/MetadataProvider.swift
index 4855d31..ece8024 100644
--- a/node_modules/react-native-vision-camera/ios/Core/MetadataProvider.swift
+++ b/node_modules/react-native-vision-camera/ios/Core/MetadataProvider.swift
@@ -26,12 +26,6 @@ class MetadataProvider: NSObject, AVCapturePhotoFileDataRepresentationCustomizer
func replacementMetadata(for photo: AVCapturePhoto) -> [String: Any]? {
var properties = photo.metadata
- // Add branding info
- if var exifDictionary = properties[kCGImagePropertyExifDictionary as String] as? [String: Any] {
- exifDictionary[kCGImagePropertyExifUserComment as String] = "Captured with VisionCamera by mrousavy"
- properties[kCGImagePropertyExifDictionary as String] = exifDictionary
- }
-
// Add GPS Location EXIF info
if let locationProvider,
let location = locationProvider.location {
@@ -47,10 +41,6 @@ class MetadataProvider: NSObject, AVCapturePhotoFileDataRepresentationCustomizer
func createVideoMetadata() -> [AVMetadataItem] {
var metadata: [AVMetadataItem] = []
- // Add branding metadata
- let brandingMetadata = createBrandingMetadaItem()
- metadata.append(brandingMetadata)
-
if let location = locationProvider?.location {
// Add GPS Location metadata
let locationMetadata = createLocationMetadataItem(location: location)
@@ -60,16 +50,6 @@ class MetadataProvider: NSObject, AVCapturePhotoFileDataRepresentationCustomizer
return metadata
}
- private func createBrandingMetadaItem() -> AVMetadataItem {
- let metadataItem = AVMutableMetadataItem()
- metadataItem.keySpace = .quickTimeMetadata
- metadataItem.key = AVMetadataKey.quickTimeMetadataKeyInformation as NSString
- metadataItem.identifier = .quickTimeMetadataInformation
- metadataItem.value = "Captured with VisionCamera by mrousavy" as NSString
- metadataItem.dataType = kCMMetadataBaseDataType_UTF8 as String
- return metadataItem
- }
-
private func createLocationMetadataItem(location: CLLocation) -> AVMetadataItem {
let metadataItem = AVMutableMetadataItem()
metadataItem.keySpace = .quickTimeMetadata