The very nice "Hello Compose" app generated from t...
# multiplatform
p
The very nice "Hello Compose" app generated from the Kotlin Multiplatform Wizard combines the UI (Compose) and non-UI code into a single module. What would be the steps to split out the UI code into a separate module? Especially to handle resources. A reference to an example project that does exactly this would be highly appreciated!
f
look at Rijksmuseum's core:designsystem/common module. the build-logic module is interesting as well.
p
@F your app is impressive both from a software and content perspective (based on README.md) I was able to build it but all I see is "No Arts for now!" centered on the device. While I am mainly interested in your app structure, it would be nice if I could also show off the app with real art from the Rijksmuseum. Is that possible?
f
It’s hard to tell whats going wrong. If you have logs/error please share them. Make sure to get an api key from https://data.rijksmuseum.nl/object-metadata/api/.
p
I do have an api key but I did not configure a signing store assuming that I do not need one for running in debug mode. Can you confirm that this assumption is OK with your app?
f
You don't need no signing store/config for the debug build. With an internet connection you should be able to see the arts. Anything that is going wrong should be caught here. try to debug or just see printed logs/errors.
p
I followed the "No arts..." message back to the ArtsScreen.kt code and it looks like the ArtsUiState is empty, which makes sense to me since I did nothing to make it non-empty. Is this reasoning sound? If it were my app, I might have an onboarding screen to seed the app with some content. Please advise. Thanks.
f
If there are any error while fetching the arts we return an empty list. Try to catch the error here. you don't have to do anything to make it non-empty.
p
Good suggestion. Apparently I have an invalid key: Illegal input: Unexpected JSON token at offset 0: Expected start of the object '{', but had '"' instead at path: $ JSON input: "Invalid key" Here is my secrets.properties file: rijksmuseum.access.key=zXkjMRjn
I did verify the access key at the web site, fwiw.
f
try this branch
Your key is valid btw.
p
Same behavior. I'll do another debug session later today and post results/questions in this thread.
f
I see what went wrong. try to pull, it should work now. https://github.com/fethij/Rijksmuseum/pull/8
change
rijksmuseum.access.key
to
rijksmuseum.api.key
in
secrets.properties
file
p
Well that will teach me to follow instructions ... 🙂
I just noticed "unspecified" used as a version reference for your *MP convention plugins. I've not seen this before. What's going on there? I'll gladly follow a link or reference.
Is this tantamount to "just use the most recent version available"?