Skip to content

Comments

🚧 Fix - Resolve app crash on missing function#3

Merged
nirodhaperera-ifs merged 3 commits intomasterfrom
fix/LM-9227-app-crash
Feb 25, 2026
Merged

🚧 Fix - Resolve app crash on missing function#3
nirodhaperera-ifs merged 3 commits intomasterfrom
fix/LM-9227-app-crash

Conversation

@nirodhaperera-ifs
Copy link

This update DOES NOT INCLUDE native updates

Description

This PR includes a fix where with React Native 0.79, it can no longer be imported separately. Instead it is now referenced via the Image component.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the react-native-photo-view library to maintain compatibility with React Native 0.79, where the resolveAssetSource function can no longer be imported directly from the internal React Native path. Instead, it must be accessed through the Image component as Image.resolveAssetSource. This is a breaking change fix that prevents app crashes when using the library with React Native 0.79.

Changes:

  • Updated version from 1.6.0 to 1.7.0 in both package.json and package-lock.json
  • Migrated from require('react-native/Libraries/Image/resolveAssetSource') to Image.resolveAssetSource API
  • Applied changes consistently to both iOS and Android implementations

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
package.json Version bumped from 1.6.0 to 1.7.0
package-lock.json Version bumped from 1.5.3 to 1.7.0
PhotoView.ios.js Updated import to include Image, removed direct resolveAssetSource require, and updated resolveAssetSource calls to use Image.resolveAssetSource
PhotoView.android.js Updated import to include Image, removed direct resolveAssetSource require, and updated resolveAssetSource calls to use Image.resolveAssetSource

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@AndrewFinlay AndrewFinlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty straight forward, but looking at the original lib it looks old and unmaintained. With that in mind we should really be moving off react-native-photo-view soon. Do you know if there's any other options?

@nirodhaperera-ifs
Copy link
Author

Looks pretty straight forward, but looking at the original lib it looks old and unmaintained. With that in mind we should really be moving off react-native-photo-view soon. Do you know if there's any other options?

Agree. I didn’t come across any straightforward replacements for this library that are well maintained, but we should be able to implement a custom solution using existing dependencies. I’ll create a separate task for it so we can look into that.

@nirodhaperera-ifs
Copy link
Author

Looks pretty straight forward, but looking at the original lib it looks old and unmaintained. With that in mind we should really be moving off react-native-photo-view soon. Do you know if there's any other options?

Agree. I didn’t come across any straightforward replacements for this library that are well maintained, but we should be able to implement a custom solution using existing dependencies. I’ll create a separate task for it so we can look into that.

Created tech debt task:
Tech Debt | Mobile | Replace @lighthouse/react-native-photo-view usage

@nirodhaperera-ifs nirodhaperera-ifs merged commit 7ade74e into master Feb 25, 2026
4 checks passed
@nirodhaperera-ifs nirodhaperera-ifs deleted the fix/LM-9227-app-crash branch February 25, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants