Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the Demo for iOS about how to use WebP format for 6.0.0 version #488

Merged
merged 4 commits into from
Jul 3, 2019

Conversation

dreampiggy
Copy link
Contributor

@dreampiggy dreampiggy commented Jun 2, 2019

Seems after I create the PR for upgrating the iOS integrate dependency SDWebImage to 5.0.0 via #454, some people find it hard to start how to use WebP format in v6.0.0 version. Like #476

So, I update the current demo. To show how to integrate your exist React Native project, with the 6.0.0 version, to support external image format used by SDWebImage. SDWebImage now support external format beyond the limit of Apple's system library. Check all of available external image format here

This PR change only iOS demo, contains both two cases:

  • react-native-fast-image-example, don't use CocoaPods. User who need WebP on iOS, should consider to use Carthage, or manual clone the Git submodule and add the library. This time I use the Git submodule, but it's recommanded to use Carthage instead (another CLI util on iOS development), which is easy to use if you're not familiar to Xcode build settings.
  • react-native-fast-image-example-cocoapods, use CocoaPods. The most easy way to use WebP. Just add one line pod 'SDWebImageWebPCoder'

I run both of two examples locally and it works.

@DylanVann Maybe we need some wiki or readme, to show how to add new image format support ? Does Android's Glide support external format like iOS's SDWebImage ?

@codecov
Copy link

codecov bot commented Jun 2, 2019

Codecov Report

Merging #488 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #488   +/-   ##
=======================================
  Coverage   94.73%   94.73%           
=======================================
  Files           1        1           
  Lines          19       19           
=======================================
  Hits           18       18           
  Misses          1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2847936...38a706f. Read the comment docs.

@codecov
Copy link

codecov bot commented Jun 2, 2019

Codecov Report

Merging #488 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #488   +/-   ##
=======================================
  Coverage   94.73%   94.73%           
=======================================
  Files           1        1           
  Lines          19       19           
=======================================
  Hits           18       18           
  Misses          1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f080bf...f7ea9ed. Read the comment docs.

@DylanVann
Copy link
Owner

That's weird. I tested WebP on that PR and it worked without modifications. Maybe a caching issue 😆

@dreampiggy
Copy link
Contributor Author

@DylanVann That PR did not update the Demo. It still using the react-native-fast-image 5.x version.
WebP is not supported by Apple's built-in framework. It must incldue a external third party library, which increase the binary size. This is why we remove that dependency in SDWebImage 5.x version. Make it modular.

@DylanVann
Copy link
Owner

I understand. Glide can display WebP if the system can, similar situation to SDWebImage.

I think for now people would be better off sticking to well supported image formats.

@DylanVann DylanVann merged commit efbb012 into DylanVann:master Jul 3, 2019
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