-
Notifications
You must be signed in to change notification settings - Fork 8
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
Native Image as local asset #34
Comments
https://github.com/ScalablyTyped/Demos/blob/master/pixi/src/main/scala/demo/assets.scala Does duplicating the setup there work? Try to keep |
I had seen the Pixi demo.
unfortunately does not work. In the ReactNative docs it says:
|
ok, this actually gives a hint:
The image is resolved relative to |
the |
Perfect, 👍, is working! Hope that solving all this dumb stuff will make life easier for someone else in the future 😄. (By the way I am inching towards the release of a first app in the stores, almost there!) |
I have another doubt before merging... I had to use a custom Image class since the demo seems to be on Slinky 0.6.5 instead of 0.6.6 (where shadaj/slinky#411 has been fixed and merged). Upgrading to 0.6.6 the only reference I found in build.sbt Line 54 in 89fbd0d
does not seem solve the issue. Where I should upgrade to 0.6.6? |
Great!
Cool, looking forward to see what you're working on 👍
Honestly the best place is a PR here https://github.com/ScalablyTyped/Converter/blob/master/scalajs/src/main/scala/org/scalablytyped/converter/internal/scalajs/Versions.scala#L8 |
Done, see ScalablyTyped/Converter@351b7ad |
After this ScalablyTyped/Converter#207 has been solved, is there anything to be done on this repo to make it available? I am trying right now, but 0.6.6 seems not available yet. |
Well I still need to make a release of the converter and bump the release here. I'll do it within a day or two. meanwhile if you want to continue here it's no problem to just add slinky 0.6.6 youself in the meantime |
No hurry, I can wait, thank you! |
I released the new version now :) |
Done, merged a PR with the added image. (In the meanwhile I have a further strange behavior to investigate, in my projects I have a local SVG image that is showing in the Android simulator but not in the packaged app on the store...) |
I am reopening the issue, since I strongly suspect that the app bundled by Expo, even if it is showing the image
in the Android simulator, will not show it once published on Expo. We can verify this by publishing a new version, substituting the currently outdated https://expo.io/@scalablytyped/projects/scalably-typed-react-native. The issue happens for sure in my projects. Any idea on what it might be going on? |
Unfortunately no...
My doubts:
|
@oyvindberg sorry I edited your post, while I wanted to quote your questions and reply them in a new one... |
It should be easy, but it is not... so I think having it solved in the demo could be quite useful for others.
How to show in React Native a local image?
I am working on a solution in the react-native-assets branch... But I cannot find where to place the asset in order to
JSImport
it.I keep getting
Unable to resolve "assets/scala-logo.png" from "target/scala-2.13/react-native-fastopt.js"
or
"./assets/scala-logo.png"
I tried to put the
assets
directory underreact-native
, underreact-native/src
, underreact-native/src/main
andreact-native/src/main/js
, but no success.Any suggestion?
The text was updated successfully, but these errors were encountered: