chore: remove old AssetsLibrary API #368
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DISCLAIMER: AI GENERATED CODE
I used Cursor to make that PR. I've re-read everything but I prefer transparency!
Summary
This update removes all dependencies on the deprecated AssetsLibrary framework from the iOS implementation of react-native-compressor. The library now exclusively uses the modern Photos framework for accessing device photo library assets, ensuring better compatibility with current and future iOS versions while eliminating deprecated API usage.
Key Changes:
Removed AssetsLibrary import from video compression module
Eliminated legacy assets-library:// URL scheme support
Simplified asset handling logic to use only ph:// URLs
Cleaned up unused constants and dead code
Maintained full backward compatibility for modern photo library access
Impact:
✅ No breaking changes for existing functionality
✅ Improved iOS compatibility with modern frameworks
✅ Reduced bundle size by removing unused dependencies
✅ Future-proof implementation aligned with Apple's recommendations
Changelog
[iOS] [CLEANUP] - Remove deprecated API usage
Test Plan
Build with XCode 26 and see if that work