You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Xcode 16 with the iOS 18 SDK, the build fails because react-native-compressor imports the removed AssetsLibrary framework and references ALAssetsLibrary. The compiler suggests using PHPhotoLibrary. This blocks archives on current Apple toolchains.
Expected behavior
It should work
Platform
[] Android
iOS
React Native Version
"react-native": "0.81.4",
React Native Compressor Version
"react-native-compressor": "^1.12.0",
Reproducible Steps And Demo
Reacted by Shahil Mangroliya, felixspitzer, Thomas Zinnbauer, johnsnaply, Nhan Phan (HDWEBSOFT), 서현석, Ayo Paradis Adesanya, Gustavo G. Kozoroski, Mutovkin Yurii, Pablo De Las Heras and 4 more
Reacted by Mutovkin Yurii, Bohdan Pomohaibo, Pablo De Las Heras and Abdul Moiz
diff --git a/node_modules/react-native-compressor/ios/Image/ImageCompressor.swift b/node_modules/react-native-compressor/ios/Image/ImageCompressor.swift
index 6b7cc49..e2f551a 100644
--- a/node_modules/react-native-compressor/ios/Image/ImageCompressor.swift+++ b/node_modules/react-native-compressor/ios/Image/ImageCompressor.swift@@ -370,8 +370,10 @@ class ImageCompressor {
var results: PHFetchResult<PHAsset>?
if imageURL?.scheme?.caseInsensitiveCompare("assets-library") == .orderedSame {
- assetID = imageURL?.absoluteString ?? ""- results = PHAsset.fetchAssets(withALAssetURLs: [imageURL!], options: nil)+ // ALAsset URLs are no longer supported in iOS 18++ // Return an error or handle gracefully+ print("Warning: ALAsset URLs are no longer supported in iOS 18+. Please use PHAsset local identifiers instead.")+ return
} else {
assetID = imagePath.replacingOccurrences(of: "ph://", with: "")
results = PHAsset.fetchAssets(withLocalIdentifiers: [assetID], options: nil)
diff --git a/node_modules/react-native-compressor/ios/Video/VideoMain.swift b/node_modules/react-native-compressor/ios/Video/VideoMain.swift
index 6fe5e9c..af8a0b5 100644
--- a/node_modules/react-native-compressor/ios/Video/VideoMain.swift+++ b/node_modules/react-native-compressor/ios/Video/VideoMain.swift@@ -1,5 +1,4 @@
import Foundation
-import AssetsLibrary
import AVFoundation
import Photos
import MobileCoreServices
Reacted by Thomas Zinnbauer, Jaime Barreto, Twan L, David Esteban, Gautham Vijayan, Gustavo G. Kozoroski, Pablo De Las Heras, Meena Bassem, Rubén Sospedra, Lucas Neves and 1 more
Reacted by David Esteban, Gautham Vijayan and Meena Bassem
this issue is occuring for package 'react-native-compressor' package when buidling the react native ios app. My issue was resolved when i updated the package to latest version '1.13'.
Activity
github-actions commentedon Sep 17, 2025
👋 @ShahilMangroliya
Thanks for opening your issue here! If you find this package useful hit the star🌟!
felixspitzer commentedon Sep 17, 2025
Running into the same issue
ymc-thzi commentedon Sep 17, 2025
Same issue, app cannot build anymore in XCode 26 because of obsolete AssetsLibrary used in
react-native-compressorShahilMangroliya commentedon Sep 17, 2025
Fix
johnsnaply commentedon Sep 17, 2025
+1 same here
DvzZDev commentedon Sep 17, 2025
Same error here, @numandev1 any fix?
(Edit: The patch above from @ShahilMangroliya works, used
patch-package)TwanLuttik commentedon Sep 17, 2025
Dealing with the same error and this patch works perfectly, I use
patch-packageto apply thisroidayan1 commentedon Sep 18, 2025
fixing patch:
react-native-compressor+1.12.0.patch
AyoParadis commentedon Sep 18, 2025
hope this gets merged asap
garshythoel commentedon Sep 18, 2025
@numandev1 Please fix
ursnj commentedon Sep 19, 2025
@numandev1 Any plans for fixing this ?
mohammadamin16 commentedon Sep 20, 2025
it seems to be fixed in the new version: 1.13
petrbela commentedon Sep 21, 2025
I can confirm it is fixed in 1.13.0
shubhamdev098 commentedon Sep 30, 2025
this issue is occuring for package 'react-native-compressor' package when buidling the react native ios app. My issue was resolved when i updated the package to latest version '1.13'.
ShantIssa commentedon Oct 3, 2025
Confirming as well that it is fixed in
1.13.0.XChikuX commentedon Jul 14, 2026
@numandev1 Safe to close