0

The react native app icons are put in ios\VietVanHocTro\Images.xcassets\AppIcon.appiconset and android\app\src\main\res\mipmap-... folders.

How can I use these icons in the application without duplicating them?

Can I use isOS ? require('.../android-icon') : require('../ios-icon')?

I've tried require('../ios/app/Images.xcassets/AppIcon.appiconset/icon-20.png') but it gives me undefined as the error.

tarzen chugh
  • 10,561
  • 4
  • 20
  • 30
o0omycomputero0o
  • 3,316
  • 4
  • 31
  • 45

1 Answers1

1

you can use assets from native image location by using the hybrid app resource method - <Image source={{uri: 'icon-20.png''}} style={{width: 40, height: 40}} />

Alon Bar David
  • 1,757
  • 14
  • 15