iOS 26: remove old AssetsLibrary API and fix runtime crash#368
Merged
numandev1 merged 3 commits intonumandev1:mainfrom Sep 19, 2025
Merged
iOS 26: remove old AssetsLibrary API and fix runtime crash#368numandev1 merged 3 commits intonumandev1:mainfrom
numandev1 merged 3 commits intonumandev1:mainfrom
Conversation
The commit was a quick fix for iOS 14.3, but it is not a robust or forward-compatible solution. On iOS 18–26 / Swift 6, it can produce different paths or invalid URLs, which explains your problem.
|
@numandev1 Can you please review and merge ? |
|
@numandev1 Awesome - look forward to the new release on npm! |
Owner
|
released in 1.13.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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, tested 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.
EDIT:
While testing on iOS 26 there was a breaking change in URL handling in swift 6.
The generated url was
file://file://I've added an extra commit taking care of that, that should be backward compatible
Here is my chat that helped me investigate: https://chatgpt.com/share/68cc145e-ac88-8005-a07c-f1e45a1642c5
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
EDIT:
Fixed a runtime crash on iOS 26
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/FIX] - Remove deprecated API usage
Test Plan
Build with XCode 26 and see if that work