React-native-navigation: Error when using Images.xcassets for backgroundImage and rootBackgroundImage

Created on 21 Sep 2018  ·  8Comments  ·  Source: wix/react-native-navigation

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",
  • Platform(s): iOs
  • Device info: iPhone X
hacktoberfest iOS acceptebug good first task 📌 pinned

Most helpful comment

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

All 8 comments

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.

The issue has been closed for inactivity.

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

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

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

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

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

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

Was this page helpful?
0 / 5 - 0 ratings