wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.02k stars 2.68k forks source link

Error when using Images.xcassets for backgroundImage and rootBackgroundImage #4012

Open L-Yeiser opened 5 years ago

L-Yeiser commented 5 years ago

Issue Description

V1 allowed use of image names in Images.xcassets for backgroundImage and rootBackgroundImage. After V2 upgrade I see the following error. img_4261

Steps to Reproduce / Code Snippets / Screenshots

V1 configuration:

static navigatorStyle = {
  screenBackgroundImageName: 'authBackground',
}

V2

 static get options() {
    return {
      backgroundImage:  'authBackground,
    };
  }

using require works

  static get options() {
    return {
      backgroundImage: require('../../assets/images/auth-background.png'),
    };
  }

Environment

"react-native-navigation": "^2.0.2556",
"react-native": "^0.56.0",
stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

stale[bot] commented 5 years ago

The issue has been closed for inactivity.

L-Yeiser commented 5 years ago

This is still an issue. It would be swell to be able to use native assets for the backgroundImage and rootBackgroundImage.

GioLogist commented 4 years ago

Experiencing this issue as well. According to the docs this is still supported.

alexnaiman commented 3 years ago

Hello! Can I try to tackle this issue for the Hacktoberfest2020? If so, can you assign it to me?

mrousavy commented 3 years ago

@alexnaiman I've assigned you, but I don't think you have to be assigned to the issue for hacktoberfest, no?

mateioprea commented 3 years ago

@alexnaiman if you have any questions, join us on discord and we can discuss them. https://discord.gg/DhkZjq2

joeshub commented 3 years ago

This is working for me, though I'm using the functional component style of assigning default options.